[asterisk-commits] oej: branch oej/sip-subscribe-ng-1.2 r73007 - /team/oej/sip-subscribe-ng-1.2/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 3 05:13:16 CDT 2007
Author: oej
Date: Tue Jul 3 05:13:15 2007
New Revision: 73007
URL: http://svn.digium.com/view/asterisk?view=rev&rev=73007
Log:
Adding proper destruction.
Modified:
team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c
Modified: team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c?view=diff&rev=73007&r1=73006&r2=73007
==============================================================================
--- team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c (original)
+++ team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c Tue Jul 3 05:13:15 2007
@@ -2189,6 +2189,7 @@
free(hist);
}
+ /* First look in the general list */
cur = iflist;
while(cur) {
if (cur == p) {
@@ -2201,8 +2202,25 @@
prev = cur;
cur = cur->next;
}
+ /* Then start looking in the subscription list */
+ if (!cur) {
+ ast_log(LOG_DEBUG, "====== Checking subscription list! \n");
+ cur = subscribelist;
+ while(cur) {
+ if (cur == p) {
+ if (prev)
+ prev->next = cur->next;
+ else
+ subscribelist = cur->next;
+ break;
+ }
+ prev = cur;
+ cur = cur->next;
+ }
+ }
if (!cur) {
ast_log(LOG_WARNING, "Trying to destroy \"%s\", not found in dialog list?!?! \n", p->callid);
+
return;
}
while((cp = p->packets)) {
@@ -3198,11 +3216,13 @@
p->next = subscribelist;
subscribelist = p;
ast_mutex_unlock(&subscribelock);
+ ast_log(LOG_DEBUG, "======= Adding pvt to subscribe list \n");
} else {
ast_mutex_lock(&iflock);
p->next = iflist;
iflist = p;
ast_mutex_unlock(&iflock);
+ ast_log(LOG_DEBUG, "======= Adding pvt to default list \n");
}
if (option_debug)
ast_log(LOG_DEBUG, "Allocating new SIP dialog for %s - %s (%s)\n", callid ? callid : "(No Call-ID)", sip_methods[intended_method].text, p->rtp ? "With RTP" : "No RTP");
More information about the asterisk-commits
mailing list