[asterisk-commits] oej: branch oej/sip-subscribe-ng-1.2 r73882 - /team/oej/sip-subscribe-ng-1.2/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jul 8 06:57:31 CDT 2007


Author: oej
Date: Sun Jul  8 06:57:30 2007
New Revision: 73882

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73882
Log:
Cleaning up the is_subscription option.

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=73882&r1=73881&r2=73882
==============================================================================
--- team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c (original)
+++ team/oej/sip-subscribe-ng-1.2/channels/chan_sip.c Sun Jul  8 06:57:30 2007
@@ -11594,10 +11594,7 @@
 	}
 	parse_request(&req);
 	req.method = find_sip_method(req.rlPart1);
-	if (req.method == SIP_RESPONSE) {
-		/* We need to find out the type of response we have - to what ? */
-	}
-	is_subscription = (req.method == SIP_SUBSCRIBE);
+	is_subscription = (req.method == SIP_SUBSCRIBE || req.resp_method == SIP_SUBSCRIBE);
 	
 	if (ast_test_flag(&req, SIP_PKT_DEBUG)) {
 		ast_verbose("--- (%d headers %d lines)%s ---\n", req.headers, req.lines, (req.headers + req.lines == 0) ? " Nat keepalive" : "");
@@ -11613,8 +11610,8 @@
 retrylock:
 	ast_mutex_lock(&netlock);
 	p = find_call(&req, &sin, req.method, is_subscription);
-	if (!p && req.resp_method == SIP_NOTIFY)
-		p = find_call(&req, &sin, req.method, !is_subscription);
+	//if (!p && req.resp_method == SIP_NOTIFY)
+		//p = find_call(&req, &sin, req.method, !is_subscription);
 	if (p) {
 		/* Go ahead and lock the owner if it has one -- we may need it */
 		if (p->owner && ast_mutex_trylock(&p->owner->lock)) {




More information about the asterisk-commits mailing list