mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
fix segfault thanks bblack
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4889 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9d340f2aac
commit
2bb347ddfd
@ -27,6 +27,7 @@
|
|||||||
* Michael Jerris <mike@jerris.com>
|
* Michael Jerris <mike@jerris.com>
|
||||||
* Johny Kadarisman <jkr888@gmail.com>
|
* Johny Kadarisman <jkr888@gmail.com>
|
||||||
* Paul Tinsley <jackhammer@gmail.com>
|
* Paul Tinsley <jackhammer@gmail.com>
|
||||||
|
* Marcel Barbulescu <marcelbarbulescu@gmail.com>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* mod_commands.c -- Misc. Command Module
|
* mod_commands.c -- Misc. Command Module
|
||||||
@ -901,19 +902,21 @@ static switch_status_t show_function(char *data, switch_core_session_t *session,
|
|||||||
int help = 0;
|
int help = 0;
|
||||||
char *mydata, *argv[5] = {0};
|
char *mydata, *argv[5] = {0};
|
||||||
int argc;
|
int argc;
|
||||||
char *cmd, *as = NULL;
|
char *cmd = NULL, *as = NULL;
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mydata = strdup(data))) {
|
if (data) {
|
||||||
argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
if ((mydata = strdup(data))) {
|
||||||
}
|
argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||||
|
}
|
||||||
|
|
||||||
cmd = argv[0];
|
cmd = argv[0];
|
||||||
if (argv[2] && !strcasecmp(argv[1], "as")) {
|
if (argv[2] && !strcasecmp(argv[1], "as")) {
|
||||||
as = argv[2];
|
as = argv[2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!as && stream->event) {
|
if (!as && stream->event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user