提交 77056e3c authored 作者: Anthony Minessale's avatar Anthony Minessale

fix seg in alias del

上级 fb7fa3d6
...@@ -1920,7 +1920,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string) ...@@ -1920,7 +1920,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string)
switch_cache_db_handle_t *db = NULL; switch_cache_db_handle_t *db = NULL;
char *sql = NULL; char *sql = NULL;
if (!strcmp(argv[1], argv[2])) { if (argc > 2 && !strcmp(argv[1], argv[2])) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Alias and command cannot be the same, this will cause loop!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Alias and command cannot be the same, this will cause loop!\n");
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论