[asterisk-commits] oej: branch oej/codename-pineapple r47312 - /team/oej/codename-pineapple/chan...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 8 00:59:38 MST 2006


Author: oej
Date: Wed Nov  8 01:59:38 2006
New Revision: 47312

URL: http://svn.digium.com/view/asterisk?rev=47312&view=rev
Log:
If you want to destroy things, do it properly. 

Modified:
    team/oej/codename-pineapple/channels/chan_sip3.c

Modified: team/oej/codename-pineapple/channels/chan_sip3.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/channels/chan_sip3.c?rev=47312&r1=47311&r2=47312&view=diff
==============================================================================
--- team/oej/codename-pineapple/channels/chan_sip3.c (original)
+++ team/oej/codename-pineapple/channels/chan_sip3.c Wed Nov  8 01:59:38 2006
@@ -3568,7 +3568,7 @@
 
 			if (!match) {
 				ast_mutex_unlock(&sip_dialog_ptr->lock);
-				break;
+				continue;
 			}
 
 			if (option_debug > 3 && totag)				 
@@ -7674,16 +7674,10 @@
 	while (p) {
 		pl = p;
 		p = p->next;
-		/* Free associated memory */
-		ast_mutex_destroy(&pl->lock);
-		if (pl->chanvars) {
-			ast_variables_destroy(pl->chanvars);
-			pl->chanvars = NULL;
-		}
-		free(pl);
-	}
+		__sip_destroy(pl, TRUE, TRUE);
+	}
+	dialoglist_unlock();
 	dialoglist = NULL;
-	dialoglist_unlock();
 
 	/* Free memory for local network address mask */
 	ast_free_ha(sipnet.localaddr);



More information about the asterisk-commits mailing list