FS-4882: fix potential seg

This commit is contained in:
Michael Jerris 2012-11-29 16:49:05 -05:00
parent 35f98c1350
commit b4d7c2ab2c
1 changed files with 2 additions and 1 deletions

View File

@ -4781,7 +4781,8 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
gateway->ping = switch_epoch_time_now(NULL) + gateway->ping_freq; gateway->ping = switch_epoch_time_now(NULL) + gateway->ping_freq;
sofia_reg_release_gateway(gateway); sofia_reg_release_gateway(gateway);
gateway->pinging = 0; gateway->pinging = 0;
} else if (sofia_test_pflag(profile, PFLAG_UNREG_OPTIONS_FAIL) && (status != 200 && status != 486) && sip && sip->sip_to && strchr(sip->sip_call_id->i_id, '_')) { } else if (sofia_test_pflag(profile, PFLAG_UNREG_OPTIONS_FAIL) && (status != 200 && status != 486) &&
sip && sip->sip_to && sip->sip_call_id && sip->sip_call_id->i_id && strchr(sip->sip_call_id->i_id, '_')) {
char *sql; char *sql;
time_t now = switch_epoch_time_now(NULL); time_t now = switch_epoch_time_now(NULL);
const char *call_id = strchr(sip->sip_call_id->i_id, '_') + 1; const char *call_id = strchr(sip->sip_call_id->i_id, '_') + 1;