提交 65fd5343 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix seg in complete del with no arg

上级 a6085508
......@@ -1880,7 +1880,11 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_complete(const char *string)
status = SWITCH_STATUS_SUCCESS;
} else if (!strcasecmp(argv[0], "del")) {
char *what = argv[1];
if (!strcasecmp(what, "*")) {
if (zstr(what)) {
switch_safe_free(mystream.data);
switch_safe_free(mydata);
return SWITCH_STATUS_FALSE;
} else if (!strcasecmp(what, "*")) {
mystream.write_function(&mystream, "delete from complete where hostname='%s'", switch_core_get_hostname());
switch_core_sql_exec(mystream.data);
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论