From: Sean Bright Date: Wed, 27 May 2009 13:54:35 +0000 (+0000) Subject: Fix handling of the 'state_interface' option of the 'queue add member' CLI X-Git-Tag: 1.4.26~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2fd7f4e477ac62de7b5fd19731ed4d08132fb09;p=thirdparty%2Fasterisk.git Fix handling of the 'state_interface' option of the 'queue add member' CLI command. This change relates to r184980, which was a backport of the state interface changes to app_queue from trunk. trunk and all of the 1.6.x branches are not affected. 'queue add member' allows for specifying an interface to use for device state when adding a queue member via CLI, but the validation code was not properly updated to reflect this optional argument. (closes issue #15198) Reported by: loloski Patches: 05272009_app_queue.diff uploaded by seanbright (license 71) Tested by: loloski git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197024 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 3660573266..6cbba3103f 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4950,7 +4950,7 @@ static int handle_queue_add_member(int fd, int argc, char *argv[]) char *queuename, *interface, *membername = NULL, *state_interface = NULL; int penalty; - if ((argc != 6) && (argc != 8) && (argc != 10)) { + if ((argc != 6) && (argc != 8) && (argc != 10) && (argc != 12)) { return RESULT_SHOWUSAGE; } else if (strcmp(argv[4], "to")) { return RESULT_SHOWUSAGE; @@ -4958,6 +4958,8 @@ static int handle_queue_add_member(int fd, int argc, char *argv[]) return RESULT_SHOWUSAGE; } else if ((argc == 10) && strcmp(argv[8], "as")) { return RESULT_SHOWUSAGE; + } else if ((argc == 12) && strcmp(argv[10], "state_interface")) { + return RESULT_SHOWUSAGE; } queuename = argv[5];