[svn-commits] rizzo: trunk r47318 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Nov 8 06:59:33 MST 2006


Author: rizzo
Date: Wed Nov  8 07:59:32 2006
New Revision: 47318

URL: http://svn.digium.com/view/asterisk?rev=47318&view=rev
Log:
merge from team/rizzo/astobj2 rev.47271

avoid doing p > 0 when p is a pointer;
move a lock closer to the place where it is needed

Approved By: oej


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=47318&r1=47317&r2=47318&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Nov  8 07:59:32 2006
@@ -8535,12 +8535,12 @@
 {
 	struct sip_pvt *sip_pvt_ptr;
 
-	dialoglist_lock();
 
 	if (option_debug > 3 && totag)
 		ast_log(LOG_DEBUG, "Looking for callid %s (fromtag %s totag %s)\n", callid, fromtag ? fromtag : "<no fromtag>", totag ? totag : "<no totag>");
 
 	/* Search dialogs and find the match */
+	dialoglist_lock();
 	for (sip_pvt_ptr = dialoglist; sip_pvt_ptr; sip_pvt_ptr = sip_pvt_ptr->next) {
 		if (!strcmp(sip_pvt_ptr->callid, callid)) {
 			int match = 1;
@@ -15013,7 +15013,7 @@
 		peer->call = NULL;
 		return 0;
 	}
-	if (peer->call > 0) {
+	if (peer->call) {
 		if (sipdebug)
 			ast_log(LOG_NOTICE, "Still have a QUALIFY dialog active, deleting\n");
 		sip_destroy(peer->call);



More information about the svn-commits mailing list