[asterisk-commits] trunk r16829 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Mar 31 17:44:37 MST 2006
Author: oej
Date: Fri Mar 31 18:44:36 2006
New Revision: 16829
URL: http://svn.digium.com/view/asterisk?rev=16829&view=rev
Log:
Don't add ast_extension_state on re-subscribes
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=16829&r1=16828&r2=16829&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Mar 31 18:44:36 2006
@@ -10985,6 +10985,7 @@
char *event = get_header(req, "Event"); /* Get Event package name */
char *accept = get_header(req, "Accept");
char *eventparam;
+ int resubscribe = (p->subscribed != NONE);
if (p->initreq.headers) {
/* We already have a dialog */
@@ -10996,7 +10997,7 @@
ast_log(LOG_DEBUG, "Got a subscription within the context of another call, can't handle that - %s (Method %s)\n", p->callid, sip_methods[p->initreq.method].text);
return 0;
} else if (debug) {
- if (p->subscribed != NONE)
+ if (resubscribe)
ast_log(LOG_DEBUG, "Got a re-subscribe on existing subscription %s\n", p->callid);
else
ast_log(LOG_DEBUG, "Got a new subscription %s (possibly with auth)\n", p->callid);
@@ -11109,7 +11110,7 @@
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
return 0;
}
- if (p->subscribed != MWI_NOTIFICATION)
+ if (p->subscribed != MWI_NOTIFICATION && !resubscribe)
p->stateid = ast_extension_state_add(p->context, p->exten, cb_extensionstate, p);
}
More information about the asterisk-commits
mailing list