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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 14:28:44 CST 2008


Author: qwell
Date: Wed Jan  9 14:28:43 2008
New Revision: 97622

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97622
Log:
Correctly display a message if a command could not be found.
Also fix a comment which may have led to this happening.

Issue 11718, reported by kshumard.

Modified:
    branches/1.4/main/cli.c

Modified: branches/1.4/main/cli.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cli.c?view=diff&rev=97622&r1=97621&r2=97622
==============================================================================
--- branches/1.4/main/cli.c (original)
+++ branches/1.4/main/cli.c Wed Jan  9 14:28:43 2008
@@ -1724,10 +1724,9 @@
 }
 
 
-/*! \brief helper for help_workhorse and final part of
- * handle_help. if locked = 0 it's just help_workhorse,
- * otherwise assume the list is already locked and print
- * an error message if not found.
+/*! \brief helper for help_workhorse and final part of handle_help
+ * if locked = 0 it's just help_workhorse, otherwise assume the
+ * list is already locked.
  */
 static int help1(int fd, char *match[], int locked)
 {
@@ -1757,7 +1756,7 @@
 	}
 	if (!locked)
 		AST_LIST_UNLOCK(&helpers);
-	if (!locked && !found && matchstr[0])
+	if (!found && matchstr[0])
 		ast_cli(fd, "No such command '%s'.\n", matchstr);
 	return RESULT_SUCCESS;
 }




More information about the asterisk-commits mailing list