[asterisk-commits] tilghman: branch 1.6.2 r235826 - in /branches/1.6.2: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 21 11:11:50 CST 2009


Author: tilghman
Date: Mon Dec 21 11:11:47 2009
New Revision: 235826

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

................
  r235822 | tilghman | 2009-12-21 11:00:46 -0600 (Mon, 21 Dec 2009) | 15 lines
  
  Merged revisions 235821 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r235821 | tilghman | 2009-12-21 10:45:03 -0600 (Mon, 21 Dec 2009) | 8 lines
    
    Send parking lot announcement to the channel which parked the call, not the park-ee.
    (closes issue #16234)
     Reported by: yeshuawatso
     Patches: 
           20091210__issue16234.diff.txt uploaded by tilghman (license 14)
           20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
     Tested by: yeshuawatso
  ........
................

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

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

Modified: branches/1.6.2/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/features.c?view=diff&rev=235826&r1=235825&r2=235826
==============================================================================
--- branches/1.6.2/main/features.c (original)
+++ branches/1.6.2/main/features.c Mon Dec 21 11:11:47 2009
@@ -577,10 +577,10 @@
 			ast_log(LOG_DEBUG, "Found chanvar Parkinglot: %s\n", parkinglotname);
 		parkinglot = find_parkinglot(parkinglotname);	
 	}
-	if (!parkinglot)
-		parkinglot = default_parkinglot;
-
-	parkinglot_addref(parkinglot);
+	if (!parkinglot) {
+		parkinglot = parkinglot_addref(default_parkinglot);
+	}
+
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Parkinglot: %s\n", parkinglot->name);
 
@@ -594,7 +594,7 @@
 	AST_LIST_LOCK(&parkinglot->parkings);
 	/* Check for channel variable PARKINGEXTEN */
 	ast_channel_lock(chan);
-	parkingexten = pbx_builtin_getvar_helper(chan, "PARKINGEXTEN");
+	parkingexten = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "PARKINGEXTEN"), ""));
 	ast_channel_unlock(chan);
 	if (!ast_strlen_zero(parkingexten)) {
 		/*!\note The API forces us to specify a numeric parking slot, even
@@ -613,10 +613,10 @@
         snprintf(pu->parkingexten, sizeof(pu->parkingexten), "%d", parking_space);
 
 		if (ast_exists_extension(NULL, parkinglot->parking_con, pu->parkingexten, 1, NULL)) {
+			ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parkinglot->parking_con);
 			AST_LIST_UNLOCK(&parkinglot->parkings);
 			parkinglot_unref(parkinglot);
 			ast_free(pu);
-			ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parkinglot->parking_con);
 			return NULL;
 		}
 	} else {
@@ -665,7 +665,7 @@
 
 	pu->notquiteyet = 1;
 	pu->parkingnum = parking_space;
-	pu->parkinglot = parkinglot;
+	pu->parkinglot = parkinglot_addref(parkinglot);
 	AST_LIST_INSERT_TAIL(&parkinglot->parkings, pu, list);
 	parkinglot_unref(parkinglot);
 
@@ -870,7 +870,7 @@
 	}
 
 	if (!play_announcement && args == &park_args) {
-		args->orig_chan_name = ast_strdupa(chan->name);
+		args->orig_chan_name = ast_strdupa(peer->name);
 	}
 
 	park_status = park_call_full(chan, peer, args);




More information about the asterisk-commits mailing list