[Asterisk-cvs] asterisk/channels chan_iax2.c,1.130,1.131

markster at lists.digium.com markster at lists.digium.com
Mon Apr 26 07:32:25 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv28396/channels

Modified Files:
	chan_iax2.c 
Log Message:
Hold call structure longer iwth find_callno


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- chan_iax2.c	26 Apr 2004 05:08:30 -0000	1.130
+++ chan_iax2.c	26 Apr 2004 11:38:21 -0000	1.131
@@ -814,7 +814,6 @@
 			return -1;
 		}
 		iaxs[x] = new_iax(sin, lockpeer);
-		ast_mutex_unlock(&iaxsl[x]);
 		update_max_nontrunk();
 		if (iaxs[x]) {
 			if (option_debug)
@@ -833,8 +832,10 @@
 			strncpy(iaxs[x]->accountcode, accountcode, sizeof(iaxs[x]->accountcode)-1);
 		} else {
 			ast_log(LOG_WARNING, "Out of resources\n");
+			ast_mutex_unlock(&iaxsl[x]);
 			return 0;
 		}
+		ast_mutex_unlock(&iaxsl[x]);
 		res = x;
 	}
 	return res;




More information about the svn-commits mailing list