[asterisk-commits] jpeeler: branch 1.6.1 r147957 - in /branches/1.6.1: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 9 14:28:32 CDT 2008


Author: jpeeler
Date: Thu Oct  9 14:28:31 2008
New Revision: 147957

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147957
Log:
Merged revisions 147952 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r147952 | jpeeler | 2008-10-09 14:27:32 -0500 (Thu, 09 Oct 2008) | 6 lines

(closes issue #13139)
Reported by: krisk84
Tested by: krisk84

This change prevents a call that is placed in the parkinglot to be picked up before the PBX is finished. If another extension dials the parking extension before the PBX thread has completed at minimum warnings will occur about the PBX not properly being terminated. At worst, a crash could occur.

........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/features.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/features.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/features.c?view=diff&rev=147957&r1=147956&r2=147957
==============================================================================
--- branches/1.6.1/main/features.c (original)
+++ branches/1.6.1/main/features.c Thu Oct  9 14:28:31 2008
@@ -2857,6 +2857,10 @@
 	AST_LIST_LOCK(&parkinglot->parkings);
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&parkinglot->parkings, pu, list) {
 		if (!data || pu->parkingnum == park) {
+			if (pu->chan->pbx) { /* do not allow call to be picked up until the PBX thread is finished */
+				AST_LIST_UNLOCK(&parkinglot->parkings);
+				return -1;
+			}
 			AST_LIST_REMOVE_CURRENT(list);
 			break;
 		}




More information about the asterisk-commits mailing list