[asterisk-commits] rizzo: branch rizzo/astobj2 r47533 - /team/rizzo/astobj2/main/cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 13 03:35:04 MST 2006


Author: rizzo
Date: Mon Nov 13 04:35:03 2006
New Revision: 47533

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47533
Log:
generator wrapper for new-style internal CLI API


Modified:
    team/rizzo/astobj2/main/cli.c

Modified: team/rizzo/astobj2/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/main/cli.c?view=diff&rev=47533&r1=47532&r2=47533
==============================================================================
--- team/rizzo/astobj2/main/cli.c (original)
+++ team/rizzo/astobj2/main/cli.c Mon Nov 13 04:35:03 2006
@@ -1525,6 +1525,12 @@
 			 */
 			if (e->generator)
 				ret = e->generator(matchstr, word, argindex, state);
+			else if (e->new_style_buf) {	/* new style command */
+				struct ast_cli_args a = {
+					.e = e, .line = matchstr, .word = word,
+					.pos = argindex, .n = state };
+				ret = (char *)e->handler(-1, CLI_GENERATE, (char **)&a);
+			}
 			break;
 		}
 	}



More information about the asterisk-commits mailing list