mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 04:03:53 +00:00
fix crash on zstr
This commit is contained in:
parent
7081f11ab2
commit
e09cdf9c3a
@ -70,9 +70,16 @@ SWITCH_STANDARD_APP(sonar_app)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
char *tone = "%(500,0,1004)";
|
||||
int loops = atoi(data);
|
||||
|
||||
if ( ! loops ) {
|
||||
const char *arg = (char *) data;
|
||||
int loops;
|
||||
|
||||
if (zstr(arg)) {
|
||||
loops = 5;
|
||||
} else {
|
||||
loops = atoi(data);
|
||||
}
|
||||
|
||||
if (loops < 0) {
|
||||
loops = 5;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user