[svn-commits] trunk r35209 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jun 21 00:13:21 MST 2006


Author: oej
Date: Wed Jun 21 02:13:20 2006
New Revision: 35209

URL: http://svn.digium.com/view/asterisk?rev=35209&view=rev
Log:
Finally fix parking and go back to metermaids

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=35209&r1=35208&r2=35209&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jun 21 02:13:20 2006
@@ -11967,6 +11967,10 @@
 	copy_request(&req, &d->req);
 	free(d);
 
+	if (!transferee || !transferer) {
+		ast_log(LOG_ERROR, "Missing channels for parking! Transferer %s Transferee %s\n", transferer ? "<available>" : "<missing>", transferee ? "<available>" : "<missing>" );
+		return;
+	}
 	if (option_debug > 3) 
 		ast_log(LOG_DEBUG, "SIP Park: Transferer channel %s, Transferee %s\n", transferer->name, transferee->name);
 
@@ -12088,7 +12092,8 @@
 		d->chan1 = transferee;	/* Transferee */
 		d->chan2 = transferer;	/* Transferer */
 		d->seqno = seqno;
-		if (!ast_pthread_create(&th, NULL, sip_park_thread, d)) {
+		if (ast_pthread_create(&th, NULL, sip_park_thread, d) < 0) {
+			/* Could not start thread */
 			free(d);	/* We don't need it anymore. If thread is created, d will be free'd
 					   by sip_park_thread() */
 			return 0;



More information about the svn-commits mailing list