[asterisk-commits] dlee: branch dlee/record r389660 - in /team/dlee/record: ./ res/ res/parking/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 23 20:27:22 CDT 2013


Author: dlee
Date: Thu May 23 20:27:18 2013
New Revision: 389660

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389660
Log:
Merged revisions 389618-389639 from http://svn.asterisk.org/svn/asterisk/trunk

Modified:
    team/dlee/record/   (props changed)
    team/dlee/record/res/parking/parking_bridge.c
    team/dlee/record/res/res_stasis_http.c

Propchange: team/dlee/record/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 23 20:27:18 2013
@@ -1,1 +1,1 @@
-/trunk:1-389612
+/trunk:1-389659

Modified: team/dlee/record/res/parking/parking_bridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/res/parking/parking_bridge.c?view=diff&rev=389660&r1=389659&r2=389660
==============================================================================
--- team/dlee/record/res/parking/parking_bridge.c (original)
+++ team/dlee/record/res/parking/parking_bridge.c Thu May 23 20:27:18 2013
@@ -29,6 +29,7 @@
 #include "asterisk/astobj2.h"
 #include "asterisk/features.h"
 #include "asterisk/say.h"
+#include "asterisk/term.h"
 
 struct ast_bridge_parking
 {
@@ -56,15 +57,7 @@
 
 static void bridge_parking_dissolving(struct ast_bridge_parking *self)
 {
-	struct parking_lot *lot = self->lot;
-
-	/* Unlink the parking bridge from the parking lot that owns it */
-	lot->parking_bridge = NULL;
-	ao2_ref(lot, -1);
-
-	/* Disassociate the bridge from the parking lot as well. */
 	self->lot = NULL;
-
 	ast_bridge_base_v_table.dissolving(&self->base);
 }
 
@@ -199,6 +192,8 @@
 	RAII_VAR(char *, comeback_override, NULL, ast_free);
 
 	ast_bridge_base_v_table.push(&self->base, bridge_channel, swap);
+
+	ast_assert(self->lot != NULL);
 
 	/* Answer the channel if needed */
 	if (ast_channel_state(bridge_channel->chan) != AST_STATE_UP) {
@@ -227,6 +222,12 @@
 
 		parking_set_duration(bridge_channel->features, pu);
 
+		/* BUGBUG Adding back local channel swapping made us not hear music on hold for the channel that got swapped
+		 * into the parking lot. Setting the roels back up gets around that, but we still need to deal with the ringing option
+		 * to the park application here somehow.
+		 */
+		parking_channel_set_roles(bridge_channel->chan, self->lot, 0);
+
 		return 0;
 	}
 
@@ -283,6 +284,11 @@
 
 	/* Set this to the bridge pvt so that we don't have to refind the parked user associated with this bridge channel again. */
 	bridge_channel->bridge_pvt = pu;
+
+	ast_verb(3, "Parking '" COLORIZE_FMT "' in '" COLORIZE_FMT "' at space %d\n",
+		COLORIZE(COLOR_BRMAGENTA, 0, ast_channel_name(bridge_channel->chan)),
+		COLORIZE(COLOR_BRMAGENTA, 0, self->lot->name),
+		pu->parking_space);
 
 	return 0;
 }

Modified: team/dlee/record/res/res_stasis_http.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/res/res_stasis_http.c?view=diff&rev=389660&r1=389659&r2=389660
==============================================================================
--- team/dlee/record/res/res_stasis_http.c (original)
+++ team/dlee/record/res/res_stasis_http.c Thu May 23 20:27:18 2013
@@ -311,7 +311,7 @@
 void stasis_http_response_ok(struct stasis_http_response *response,
 			     struct ast_json *message)
 {
-	response->message = message;
+	response->message = ast_json_ref(message);
 	response->response_code = 200;
 	response->response_text = "OK";
 }
@@ -333,7 +333,7 @@
 void stasis_http_response_created(struct stasis_http_response *response,
 	const char *url, struct ast_json *message)
 {
-	response->message = message;
+	response->message = ast_json_ref(message);
 	response->response_code = 201;
 	response->response_text = "Created";
 	ast_str_append(&response->headers, 0, "Location: %s\r\n", url);




More information about the asterisk-commits mailing list