From: Michael Jerris Date: Sat, 19 Mar 2011 14:14:50 +0000 (-0400) Subject: don't strcasecmp on null string X-Git-Tag: v1.2-rc1~171^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c885d09f23b89a50a0fd2abc701aa9b829d5b245;p=thirdparty%2Ffreeswitch.git don't strcasecmp on null string --- diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 766c6ceee1..6963bd3c12 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -1124,8 +1124,8 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand } } - if ((v_contact_str = switch_event_get_header(*v_event, "sip-force-contact")) || auto_connectile) { - if ((!strcasecmp(v_contact_str, "NDLB-connectile-dysfunction-2.0")) || auto_connectile) { + if (auto_connectile || (v_contact_str = switch_event_get_header(*v_event, "sip-force-contact"))) { + if (auto_connectile || (!strcasecmp(v_contact_str, "NDLB-connectile-dysfunction-2.0"))) { char *path_encoded; size_t path_encoded_len; char my_contact_str[1024];