[asterisk-commits] rizzo: branch rizzo/astobj2 r47563 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 13 11:16:33 MST 2006


Author: rizzo
Date: Mon Nov 13 12:16:32 2006
New Revision: 47563

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47563
Log:
mark with XXX a dubious set_destroy() (probably harmless, but
seems useless).

minor formatting changes.

Need to look at this for trunk.


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47563&r1=47562&r2=47563
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Mon Nov 13 12:16:32 2006
@@ -2186,7 +2186,6 @@
 	for (cur = p->packets; cur; prev = cur, cur = cur->next) {
 		if (cur->seqno != seqno || ast_test_flag(cur, FLAG_RESPONSE) != resp)
 			continue;
-		/* XXX need to tokenize packets, rather than doing a stcasecmp */
 		if (ast_test_flag(cur, FLAG_RESPONSE) || cur->method == sipmethod) {
 			msg = "Found";
 			if (!resp && (seqno == p->pendinginvite)) {
@@ -7313,7 +7312,7 @@
 		r->register_pvt = NULL;
 		if (p->registry)
 			unref_registry(p->registry);
-		set_destroy(p);	
+		set_destroy(p);	/* XXX why do that if we are going to kill it in a moment ? */
 		/* Pretend to ACK anything just in case */
 		__sip_pretend_ack(p); /* XXX we need p locked, not sure we have */
 		sip_destroy(p);	/* reference goes away */
@@ -12208,7 +12207,6 @@
 		}
 		break;
 
-
 	case 500:   /* Server error */
 	case 501:   /* Method not implemented */
 		/* Return to the current call onhold */
@@ -12217,6 +12215,7 @@
 		set_destroy(p);
 		p->refer->status = REFER_FAILED;
 		break;
+
 	case 603:   /* Transfer declined */
 		ast_log(LOG_NOTICE, "SIP transfer to %s declined, call miserably fails. \n", p->refer->refer_to);
 		p->refer->status = REFER_FAILED;
@@ -12236,7 +12235,7 @@
 		if (p->authtries == MAX_AUTHTRIES || do_register_auth(p, req, resp)) {
 			ast_log(LOG_NOTICE, "Failed to authenticate on REGISTER to '%s@%s' (Tries %d)\n", p->registry->username, p->registry->hostname, p->authtries);
 			set_destroy(p);
-			}
+		}
 		break;
 	case 403:	/* Forbidden */
 		ast_log(LOG_WARNING, "Forbidden - wrong password on authentication for REGISTER for '%s' to '%s'\n", p->registry->username, p->registry->hostname);



More information about the asterisk-commits mailing list