[svn-commits] murf: branch murf/bug11210 r93147 - /team/murf/bug11210/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Dec 14 23:22:19 CST 2007


Author: murf
Date: Fri Dec 14 23:22:19 2007
New Revision: 93147

URL: http://svn.digium.com/view/asterisk?view=rev&rev=93147
Log:
resolve some conflicts

Modified:
    team/murf/bug11210/channels/chan_sip.c

Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=93147&r1=93146&r2=93147
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Fri Dec 14 23:22:19 2007
@@ -3925,15 +3925,15 @@
 	}
 
 	/* Remove link from peer to subscription of MWI */
-	if (p->relatedpeer && p->relatedpeer->mwipvt) 
+	if (p->relatedpeer && p->relatedpeer->mwipvt)
 		p->relatedpeer->mwipvt = dialog_unref(p->relatedpeer->mwipvt, "delete ->relatedpeer->mwipvt");
-
+	
 	if (p->registry) {
 		if (p->registry->call == p)
 			p->registry->call = dialog_unref(p->registry->call,"nulling out the registry's call dialog field in unlink_all");
 		p->registry = registry_unref(p->registry, "delete p->registry");
 	}
-
+	
 	if (dumphistory)
 		sip_dump_history(p);
 
@@ -3946,17 +3946,17 @@
 		ast_sched_del(sched, p->waitid);
 
 	if (p->initid > -1) {
-		if (ast_sched_del(sched, p->initid)==0)
+		/* Don't auto congest anymore since we've gotten something useful back */
+		if (ast_sched_del(sched, p->initid) == 0)
 			dialog_unref(p,"when you delete the initid sched, you should dec the refcount for the stored dialog ptr");
 		p->initid = -1;
 	}
-	
 	if (p->autokillid > -1) {
 		if (ast_sched_del(sched, p->autokillid)==0)
 			dialog_unref(p,"when you delete the autokillid sched, you should dec the refcount for the stored dialog ptr");
 		p->autokillid = -1;
 	}
-
+	
 	if (p->rtp)
 		ast_rtp_destroy(p->rtp);
 	if (p->vrtp)
@@ -3987,7 +3987,7 @@
 	while((cp = p->packets)) {
 		p->packets = p->packets->next;
 		if (cp->retransid > -1)
-			ast_sched_del(sched, cp->retransid);  /* HUH??? */
+			ast_sched_del(sched, cp->retransid); /* HUH??? */
 		cp->owner = dialog_unref(cp->owner,"free cp->owner dialog before freeing the pkt");
 		ast_free(cp);
 	}
@@ -19992,20 +19992,16 @@
 	/* Free memory for local network address mask */
 	ast_free_ha(localaddr);
 
+	clear_realm_authentication(authl);
+
+	ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
+	ASTOBJ_CONTAINER_DESTROY(&regl);
+
 	ao2_ref(peers, -1, "unref the peers table");
 	ao2_ref(peers_by_ip, -1, "unref the peers_by_ip table");
 	ao2_ref(users, -1, "unref the users table");
 	ao2_ref(dialogs, -1, "unref the dialogs table");
-#ifdef NO_MORE	
-	ASTOBJ_CONTAINER_DESTROYALL(&userl, sip_destroy_user);
-	ASTOBJ_CONTAINER_DESTROY(&userl);
-	ASTOBJ_CONTAINER_DESTROYALL(&peerl, sip_destroy_peer);
-	ASTOBJ_CONTAINER_DESTROY(&peerl);
-#endif
-	ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
-	ASTOBJ_CONTAINER_DESTROY(&regl);
-
-	clear_realm_authentication(authl);
+
 	clear_sip_domains();
 	close(sipsock);
 	sched_context_destroy(sched);




More information about the svn-commits mailing list