Wed Apr 23 14:30:07 EDT 2008 first.last@nokia.com

* nua_notifier.c: fixed crash with event fetch



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8182 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-04-23 18:38:25 +00:00
parent 6b46b8e0b6
commit 267aeb5f84
2 changed files with 7 additions and 4 deletions

View File

@ -1 +1 @@
Wed Apr 23 14:36:09 EDT 2008
Wed Apr 23 14:38:18 EDT 2008

View File

@ -340,7 +340,8 @@ int nua_subscribe_server_report(nua_server_request_t *sr, tagi_t const *tags)
{
nua_handle_t *nh = sr->sr_owner;
nua_dialog_state_t *ds = nh->nh_ds;
struct notifier_usage *nu = nua_dialog_usage_private(sr->sr_usage);
nua_dialog_usage_t *du = sr->sr_usage;
struct notifier_usage *nu = nua_dialog_usage_private(du);
enum nua_substate substate = nua_substate_terminated;
int notify = 0;
int retval;
@ -365,16 +366,18 @@ int nua_subscribe_server_report(nua_server_request_t *sr, tagi_t const *tags)
else
#endif
notify = 1;
notify = notify && du->du_cr != NULL;
}
retval = nua_base_server_treport(sr, NUTAG_SUBSTATE(substate), TAG_END());
if (retval >= 2 || nu == NULL)
if (retval >= 2 || du == NULL)
return retval;
if (notify) {
/* Send NOTIFY (and terminate subscription, when needed) */
nua_dialog_usage_refresh(nh, ds, sr->sr_usage, sip_now());
nua_dialog_usage_refresh(nh, ds, du, sip_now());
}
return retval;