[mod_sofia] Unit-test: Fix strcmp null argument.
This commit is contained in:
parent
a8dee4b2ff
commit
9f5c2a1619
|
@ -48,7 +48,7 @@ static void test_wait_for_uuid(char *uuid)
|
|||
SWITCH_STANDARD_STREAM(stream);
|
||||
switch_api_execute("show", "channels", NULL, &stream);
|
||||
|
||||
if (!strncmp((char *)stream.data, "uuid,", 5)) {
|
||||
if (stream.data && !strncmp((char *)stream.data, "uuid,", 5)) {
|
||||
channel_data = switch_mprintf("%s", (char *)stream.data);
|
||||
switch_safe_free(stream.data);
|
||||
break;
|
||||
|
@ -76,7 +76,9 @@ static const char *test_wait_for_chan_var(switch_channel_t *channel, const char
|
|||
int loop_count = 50;
|
||||
const char *var=NULL;
|
||||
do {
|
||||
if (!strcmp(switch_channel_get_variable(channel, "sip_cseq"),seq)){
|
||||
const char *sip_cseq = switch_channel_get_variable(channel, "sip_cseq");
|
||||
|
||||
if (sip_cseq && seq && !strcmp(sip_cseq, seq)){
|
||||
switch_sleep(100 * 1000);
|
||||
var = switch_channel_get_variable(channel, "rtp_local_sdp_str");
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue