[asterisk-commits] qwell: branch 1.4 r50921 - /branches/1.4/main/asterisk.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 15 11:23:22 MST 2007


Author: qwell
Date: Mon Jan 15 12:23:21 2007
New Revision: 50921

URL: http://svn.digium.com/view/asterisk?view=rev&rev=50921
Log:
re-add deprecated "show version" CLI command.

Modified:
    branches/1.4/main/asterisk.c

Modified: branches/1.4/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=50921&r1=50920&r2=50921
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Mon Jan 15 12:23:21 2007
@@ -1368,6 +1368,16 @@
 "Usage: core show version\n"
 "       Shows Asterisk version information.\n";
 
+static int handle_version_deprecated(int fd, int argc, char *argv[])
+{
+	if (argc != 2)
+		return RESULT_SHOWUSAGE;
+	ast_cli(fd, "Asterisk %s built by %s @ %s on a %s running %s on %s\n",
+		ASTERISK_VERSION, ast_build_user, ast_build_hostname,
+		ast_build_machine, ast_build_os, ast_build_date);
+	return RESULT_SUCCESS;
+}
+
 static int handle_version(int fd, int argc, char *argv[])
 {
 	if (argc != 3)
@@ -1519,6 +1529,11 @@
 
 #define ASTERISK_PROMPT2 "%s*CLI> "
 
+static struct ast_cli_entry cli_show_version_deprecated = {
+	{ "show", "version", NULL },
+	handle_version_deprecated, "Display version info",
+	version_help };
+
 #if !defined(LOW_MEMORY)
 static struct ast_cli_entry cli_show_version_files_deprecated = {
 	{ "show", "version", "files", NULL },
@@ -1574,7 +1589,7 @@
 
 	{ { "core", "show", "version", NULL },
 	handle_version, "Display version info",
-	version_help },
+	version_help, NULL, &cli_show_version_deprecated },
 
 	{ { "!", NULL },
 	handle_bang, "Execute a shell command",



More information about the asterisk-commits mailing list