]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add Asterisk Version to core show locks
authorAlec L Davis <sivad.a@paradise.net.nz>
Thu, 2 May 2013 06:45:31 +0000 (06:45 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Thu, 2 May 2013 06:45:31 +0000 (06:45 +0000)
Assist with reporting 'core show locks' when submitting bug reports.

Example below:

===========================
== SVN-branch-1.8-...
== Currently Held Locks
===========================

(closes issue ASTERISK-21743)

Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
........

Merged revisions 387294 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@387295 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/utils.c

index 5118cdda57d91dd6c290df63f8023428e8c57e18..2c3537a8fe5eaca3228ac874fd59b904afab4561 100644 (file)
@@ -47,6 +47,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #endif
 
 #include "asterisk/network.h"
+#include "asterisk/ast_version.h"
 
 #define AST_API_MODULE         /* ensure that inlinable API functions will be built in lock.h if required */
 #include "asterisk/lock.h"
@@ -985,11 +986,12 @@ static char *handle_show_locks(struct ast_cli_entry *e, int cmd, struct ast_cli_
 
        ast_str_append(&str, 0, "\n"
                       "=======================================================================\n"
-                      "=== Currently Held Locks ==============================================\n"
+                      "=== %s\n"
+                      "=== Currently Held Locks\n"
                       "=======================================================================\n"
                       "===\n"
                       "=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked)\n"
-                      "===\n");
+                      "===\n", ast_get_version());
 
        if (!str)
                return CLI_FAILURE;