[Freeswitch-svn] [commit] r10873 - freeswitch/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
anthm at freeswitch.org
Thu Dec 18 12:33:21 PST 2008
Author: anthm
Date: Thu Dec 18 15:33:21 2008
New Revision: 10873
Log:
prevent seg in sofia dialog refresh on null dialog
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Thu Dec 18 15:33:21 2008
@@ -1210,7 +1210,9 @@
unsigned delta = (unsigned) (exptime * -1);
switch_snprintf(sstr, sizeof(sstr), "active;expires=%u", delta);
switch_snprintf(expires_str, sizeof(expires_str), "%u", delta);
- nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, delta, delta);
+ if (nh && nh->nh_ds && nh->nh_ds->ds_usage) {
+ nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, delta, delta);
+ }
}
nua_notify(nh,
@@ -1661,9 +1663,9 @@
}
-
- nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, exp_delta + SUB_OVERLAP, exp_delta + SUB_OVERLAP);
-
+ if (nh && nh->nh_ds && nh->nh_ds->ds_usage) {
+ nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, exp_delta + SUB_OVERLAP, exp_delta + SUB_OVERLAP);
+ }
nua_respond(nh, SIP_202_ACCEPTED, SIPTAG_CONTACT_STR(contact_str), NUTAG_WITH_THIS(nua),
SIPTAG_SUBSCRIPTION_STATE_STR(sstr),
More information about the Freeswitch-svn
mailing list