mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-08 05:54:45 +00:00
mod_hash: fix null check on API
This commit is contained in:
parent
dc37716a29
commit
52c278c2e1
@ -572,10 +572,13 @@ SWITCH_STANDARD_API(hash_remote_function)
|
|||||||
char *argv[10];
|
char *argv[10];
|
||||||
char *dup = NULL;
|
char *dup = NULL;
|
||||||
|
|
||||||
if (!zstr(cmd)) {
|
if (zstr(cmd)) {
|
||||||
dup = strdup(cmd);
|
stream->write_function(stream, "-ERR Usage: "HASH_REMOTE_SYNTAX"\n");
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dup = strdup(cmd);
|
||||||
|
|
||||||
argc = switch_split(dup, ' ', argv);
|
argc = switch_split(dup, ' ', argv);
|
||||||
if (argv[0] && !strcmp(argv[0], "list")) {
|
if (argv[0] && !strcmp(argv[0], "list")) {
|
||||||
switch_hash_index_t *hi;
|
switch_hash_index_t *hi;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user