Fix app_chanisavail if there are invalid arguments (bug #1130)
[asterisk/asterisk.git] / 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++;