mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 10:26:41 +00:00
fix seg in complete del with no arg
This commit is contained in:
parent
d7c3ec582d
commit
e6b8b3e4f2
@ -1881,7 +1881,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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user