Fix app_chanisavail if there are invalid arguments (bug #1130)
authorJames Golovich <james@gnuinter.net>
Sun, 29 Feb 2004 18:30:48 +0000 (18:30 +0000)
committerJames Golovich <james@gnuinter.net>
Sun, 29 Feb 2004 18:30:48 +0000 (18:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2277 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_chanisavail.c

index 57f6e6f..44a2a23 100755 (executable)
@@ -76,8 +76,8 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
                        tech = cur;
                        number = strchr(tech, '/');
                        if (!number) {
-                               ast_log(LOG_WARNING, "ChanIsAvail argument takes format (Zap/[device])\n");
-                               continue;
+                               ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n");
+                               return -1;
                        }
                        *number = '\0';
                        number++;