[Freeswitch-svn] [commit] r12942 - freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua

FreeSWITCH SVN mikej at freeswitch.org
Tue Apr 7 14:34:31 PDT 2009


Author: mikej
Date: Tue Apr  7 16:34:31 2009
New Revision: 12942

Log:
temporary hack to avoid segfaults on 503 w/ retry-after and 423 responses to CANCEL (and maybe others) (SFSIP-134)

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c	Tue Apr  7 16:34:31 2009
@@ -1140,7 +1140,7 @@
   if (status == 423) {
     unsigned my_expires = 0;
 
-    if (cr->cr_sip->sip_expires)
+    if (cr->cr_sip && cr->cr_sip->sip_expires)
       my_expires = cr->cr_sip->sip_expires->ex_delta;
 
     if (sip->sip_min_expires &&
@@ -1195,7 +1195,8 @@
     }
   }
 
-  if (0 && 500 <= status && status < 600 &&
+  if (500 <= status && status < 600 &&
+	  cr->cr_sip &&
       sip->sip_retry_after &&
       sip->sip_retry_after->af_delta < 32) {
     su_timer_t *timer;



More information about the Freeswitch-svn mailing list