[asterisk-commits] jrose: branch jrose/bridge_projects r385549 - in /team/jrose/bridge_projects:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 12 16:48:36 CDT 2013


Author: jrose
Date: Fri Apr 12 16:48:33 2013
New Revision: 385549

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385549
Log:
Fix automerge for like the ten-thousandth time yeaaaargh.

Modified:
    team/jrose/bridge_projects/   (props changed)
    team/jrose/bridge_projects/include/asterisk/manager.h
    team/jrose/bridge_projects/main/manager_bridging.c
    team/jrose/bridge_projects/main/manager_channels.c

Propchange: team/jrose/bridge_projects/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/jrose/bridge_projects/
------------------------------------------------------------------------------
--- bridge_construction-integrated (original)
+++ bridge_construction-integrated Fri Apr 12 16:48:33 2013
@@ -1,1 +1,1 @@
-/trunk:1-385474
+/trunk:1-385522

Propchange: team/jrose/bridge_projects/
------------------------------------------------------------------------------
--- bridge_projects-integrated (original)
+++ bridge_projects-integrated Fri Apr 12 16:48:33 2013
@@ -1,1 +1,1 @@
-/team/group/bridge_construction:1-385509
+/team/group/bridge_construction:1-385544

Modified: team/jrose/bridge_projects/include/asterisk/manager.h
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/include/asterisk/manager.h?view=diff&rev=385549&r1=385548&r2=385549
==============================================================================
--- team/jrose/bridge_projects/include/asterisk/manager.h (original)
+++ team/jrose/bridge_projects/include/asterisk/manager.h Fri Apr 12 16:48:33 2013
@@ -316,7 +316,53 @@
  */
 struct ast_datastore *astman_datastore_find(struct mansession *s, const struct ast_datastore_info *info, const char *uid);
 
+/*! \brief Struct representing a snapshot of channel state */
 struct ast_channel_snapshot;
+
+/*!
+ * \brief Generate the AMI message body from a channel snapshot
+ * \since 12
+ *
+ * \param snapshot the channel snapshot for which to generate an AMI message
+ *                 body
+ * \param suffix the suffix to append to the channel fields
+ *
+ * \retval NULL on error
+ * \retval ast_str* on success (must be ast_freed by caller)
+ */
+struct ast_str *ast_manager_build_channel_state_string_suffix(
+		const struct ast_channel_snapshot *snapshot,
+		const char *suffix);
+
+/*!
+ * \brief Generate the AMI message body from a channel snapshot
+ * \since 12
+ *
+ * \param snapshot the channel snapshot for which to generate an AMI message
+ *                 body
+ *
+ * \retval NULL on error
+ * \retval ast_str* on success (must be ast_freed by caller)
+ */
+struct ast_str *ast_manager_build_channel_state_string(
+		const struct ast_channel_snapshot *snapshot);
+
+/*! \brief Struct representing a snapshot of bridge state */
+struct ast_bridge_snapshot;
+
+/*!
+ * \brief Generate the AMI message body from a bridge snapshot
+ * \since 12
+ *
+ * \param snapshot the bridge snapshot for which to generate an AMI message
+ *                 body
+ *
+ * \retval NULL on error
+ * \retval ast_str* on success (must be ast_freed by caller)
+ */
+struct ast_str *ast_manager_build_bridge_state_string(
+	const struct ast_bridge_snapshot *snapshot,
+	const char *suffix);
 
 /*! \brief Struct containing info for an AMI event to send out. */
 struct ast_manager_event_blob {
@@ -329,21 +375,6 @@
 
 /*!
  * \since 12
- * \brief Generate the AMI message body from a channel snapshot
- *
- * \param snapshot the channel snapshot for which to generate an AMI message
- *                 body
- * \param suffix Optional suffix string to attach to all of the channel state
- *               messages. Useful when dealing with multiple channel snapshots
- *               in a single event.
- *
- * \retval NULL on error
- * \retval ast_str* on success (must be ast_freed by caller)
- */
-struct ast_str *ast_manager_build_channel_state_string_suffix(const struct ast_channel_snapshot *snapshot, const char *suffix);
-
-/*!
- * \since 12
  * \brief Construct a \ref snapshot_manager_event.
  *
  * \param event_flags Flags the event should be raised with.

Modified: team/jrose/bridge_projects/main/manager_bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/main/manager_bridging.c?view=diff&rev=385549&r1=385548&r2=385549
==============================================================================
--- team/jrose/bridge_projects/main/manager_bridging.c (original)
+++ team/jrose/bridge_projects/main/manager_bridging.c Fri Apr 12 16:48:33 2013
@@ -108,17 +108,7 @@
 	</manager>
  ***/
 
-/*!
- * \brief Generate the AMI message body from a bridge snapshot
- * \internal
- *
- * \param snapshot the bridge snapshot for which to generate an AMI message
- *                 body
- *
- * \retval NULL on error
- * \retval ast_str* on success (must be ast_freed by caller)
- */
-static struct ast_str *manager_build_bridge_state_string(
+struct ast_str *ast_manager_build_bridge_state_string(
 	const struct ast_bridge_snapshot *snapshot,
 	const char *suffix)
 {
@@ -207,7 +197,7 @@
 		/* If we haven't already, build the channel event string */
 		if (!bridge_event_string) {
 			bridge_event_string =
-				manager_build_bridge_state_string(
+				ast_manager_build_bridge_state_string(
 					new_snapshot ? new_snapshot : old_snapshot, "");
 			if (!bridge_event_string) {
 				return;
@@ -231,8 +221,8 @@
 	ast_assert(merge_msg->to != NULL);
 	ast_assert(merge_msg->from != NULL);
 
-	to_text = manager_build_bridge_state_string(merge_msg->to, "");
-	from_text = manager_build_bridge_state_string(merge_msg->from, "From");
+	to_text = ast_manager_build_bridge_state_string(merge_msg->to, "");
+	from_text = ast_manager_build_bridge_state_string(merge_msg->from, "From");
 
 	/*** DOCUMENTATION
 		<managerEventInstance>
@@ -262,6 +252,7 @@
 	struct ast_bridge_blob *blob = stasis_message_data(message);
 	const char *type = ast_bridge_blob_json_type(blob);
 	RAII_VAR(struct ast_str *, bridge_text, NULL, ast_free);
+	RAII_VAR(struct ast_str *, channel_text, NULL, ast_free);
 	char *event;
 
 	if (!strcmp("leave", type)) {
@@ -272,13 +263,14 @@
 		return;
 	}
 
-	bridge_text = manager_build_bridge_state_string(blob->bridge, "");
+	bridge_text = ast_manager_build_bridge_state_string(blob->bridge, "");
+	channel_text = ast_manager_build_channel_state_string(blob->channel);
 
 	manager_event(EVENT_FLAG_CALL, event,
 		"%s"
-		"Uniqueid: %s\r\n",
+		"%s",
 		ast_str_buffer(bridge_text),
-		blob->channel->uniqueid);
+		ast_str_buffer(channel_text));
 }
 
 static int filter_bridge_type_cb(void *obj, void *arg, int flags)
@@ -294,7 +286,7 @@
 	struct ast_bridge_snapshot *snapshot = stasis_message_data(obj);
 	struct mansession *s = arg;
 	char *id_text = data;
-	RAII_VAR(struct ast_str *, bridge_info, manager_build_bridge_state_string(snapshot, ""), ast_free);
+	RAII_VAR(struct ast_str *, bridge_info, ast_manager_build_bridge_state_string(snapshot, ""), ast_free);
 
 	astman_append(s,
 		"Event: BridgeListItem\r\n"
@@ -390,7 +382,7 @@
 	}
 
 	snapshot = stasis_message_data(msg);
-	bridge_info = manager_build_bridge_state_string(snapshot, "");
+	bridge_info = ast_manager_build_bridge_state_string(snapshot, "");
 
 	ao2_callback_data(snapshot->channels, OBJ_NODATA, send_bridge_info_item_cb, s, ast_str_buffer(id_text));
 

Modified: team/jrose/bridge_projects/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/main/manager_channels.c?view=diff&rev=385549&r1=385548&r2=385549
==============================================================================
--- team/jrose/bridge_projects/main/manager_channels.c (original)
+++ team/jrose/bridge_projects/main/manager_channels.c Fri Apr 12 16:48:33 2013
@@ -233,8 +233,8 @@
  ***/
 
 struct ast_str *ast_manager_build_channel_state_string_suffix(
-	const struct ast_channel_snapshot *snapshot,
-	const char *suffix)
+		const struct ast_channel_snapshot *snapshot,
+		const char *suffix)
 {
 	struct ast_str *out = ast_str_create(1024);
 	int res = 0;
@@ -287,17 +287,7 @@
 	return out;
 }
 
-/*!
- * \brief Generate the AMI message body from a channel snapshot
- * \internal
- *
- * \param snapshot the channel snapshot for which to generate an AMI message
- *                 body
- *
- * \retval NULL on error
- * \retval ast_str* on success (must be ast_freed by caller)
- */
-static struct ast_str *manager_build_channel_state_string(
+struct ast_str *ast_manager_build_channel_state_string(
 		const struct ast_channel_snapshot *snapshot)
 {
 	return ast_manager_build_channel_state_string_suffix(snapshot, "");
@@ -481,7 +471,7 @@
 		/* If we haven't already, build the channel event string */
 		if (!channel_event_string) {
 			channel_event_string =
-				manager_build_channel_state_string(new_snapshot);
+				ast_manager_build_channel_state_string(new_snapshot);
 			if (!channel_event_string) {
 				return;
 			}
@@ -500,7 +490,7 @@
 	const char *value = ast_json_string_get(ast_json_object_get(obj->blob, "value"));
 
 	if (obj->snapshot) {
-		channel_event_string = manager_build_channel_state_string(obj->snapshot);
+		channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
 	} else {
 		channel_event_string = ast_str_create(35);
 		ast_str_set(&channel_event_string, 0,
@@ -542,7 +532,7 @@
 
 	eventname = ast_json_string_get(ast_json_object_get(obj->blob, "eventname"));
 	body = ast_json_string_get(ast_json_object_get(obj->blob, "body"));
-	channel_event_string = manager_build_channel_state_string(obj->snapshot);
+	channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
 
 	if (!channel_event_string) {
 		return;
@@ -582,7 +572,7 @@
 		return;
 	}
 
-	channel_event_string = manager_build_channel_state_string(obj->snapshot);
+	channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
 	if (!channel_event_string) {
 		return;
 	}
@@ -654,7 +644,7 @@
 	}
 
 	if (caller) {
-		caller_event_string = manager_build_channel_state_string(caller);
+		caller_event_string = ast_manager_build_channel_state_string(caller);
 		if (!caller_event_string) {
 			return;
 		}




More information about the asterisk-commits mailing list