[asterisk-commits] kmoore: branch kmoore/stasis-bridging-channel_events r385994 - /team/kmoore/s...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 18 09:03:58 CDT 2013
Author: kmoore
Date: Thu Apr 18 09:03:54 2013
New Revision: 385994
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385994
Log:
Pull forward some inevitable naming changes
Modified:
team/kmoore/stasis-bridging-channel_events/res/res_stasis.c
Modified: team/kmoore/stasis-bridging-channel_events/res/res_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/res/res_stasis.c?view=diff&rev=385994&r1=385993&r2=385994
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/res/res_stasis.c (original)
+++ team/kmoore/stasis-bridging-channel_events/res/res_stasis.c Thu Apr 18 09:03:54 2013
@@ -301,7 +301,7 @@
handler->type = NULL;
}
-static struct ast_json *app_event_create(
+static struct ast_json *app_channel_event_create(
const char *event_name,
const struct ast_channel_snapshot *snapshot,
const struct ast_json *extra_info)
@@ -390,7 +390,7 @@
if (snapshot == NULL) {
return -1;
}
- msg = app_event_create("stasis-end", snapshot, NULL);
+ msg = app_channel_event_create("stasis-end", snapshot, NULL);
if (!msg) {
return -1;
}
@@ -429,7 +429,7 @@
}
/*! \brief Typedef for callbacks that get called on channel snapshot updates */
-typedef struct ast_json *(*snapshot_monitor)(
+typedef struct ast_json *(*channel_snapshot_monitor)(
struct ast_channel_snapshot *old_snapshot,
struct ast_channel_snapshot *new_snapshot);
@@ -459,7 +459,7 @@
return NULL;
}
- return app_event_create(event_name, new_snapshot ? new_snapshot : old_snapshot, json);
+ return app_channel_event_create(event_name, new_snapshot ? new_snapshot : old_snapshot, json);
}
static struct ast_json *channel_dialplan(
@@ -489,7 +489,7 @@
return NULL;
}
- return app_event_create("channel-event-dialplan", new_snapshot, json);
+ return app_channel_event_create("channel-event-dialplan", new_snapshot, json);
}
static struct ast_json *channel_callerid(
@@ -514,7 +514,7 @@
return NULL;
}
- return app_event_create("channel-event-callerid", new_snapshot, json);
+ return app_channel_event_create("channel-event-callerid", new_snapshot, json);
}
static struct ast_json *channel_snapshot(
@@ -525,10 +525,10 @@
return NULL;
}
- return app_event_create("channel-snapshot", new_snapshot, NULL);
-}
-
-snapshot_monitor monitors[] = {
+ return app_channel_event_create("channel-snapshot", new_snapshot, NULL);
+}
+
+channel_snapshot_monitor channel_monitors[] = {
channel_snapshot,
channel_state,
channel_dialplan,
@@ -560,10 +560,10 @@
return;
}
- for (i = 0; i < ARRAY_LEN(monitors); ++i) {
+ for (i = 0; i < ARRAY_LEN(channel_monitors); ++i) {
RAII_VAR(struct ast_json *, msg, NULL, ast_json_unref);
- msg = monitors[i](old_snapshot, new_snapshot);
+ msg = channel_monitors[i](old_snapshot, new_snapshot);
if (msg) {
ao2_callback(watching_apps, OBJ_NODATA, app_send_cb, msg);
}
@@ -739,7 +739,7 @@
RAII_VAR(struct ast_json *, msg, NULL, ast_json_unref);
SCOPED_LOCK(app_lock, app, ao2_lock, ao2_unlock);
- msg = app_event_create("application-replaced", NULL, NULL);
+ msg = app_channel_event_create("application-replaced", NULL, NULL);
app->handler(app->data, app_name, msg);
app->handler = handler;
@@ -790,7 +790,7 @@
return NULL;
}
- return app_event_create("channel-event-dtmf-received", obj->snapshot, extra);
+ return app_channel_event_create("channel-event-dtmf-received", obj->snapshot, extra);
}
static struct ast_json *handle_blob_generic(struct ast_channel_blob *obj)
@@ -799,7 +799,7 @@
ast_str_set(&event_name, 0, "channel-event-%s", ast_channel_blob_json_type(obj));
- return app_event_create(ast_str_buffer(event_name), obj->snapshot, obj->blob);
+ return app_channel_event_create(ast_str_buffer(event_name), obj->snapshot, obj->blob);
}
static void register_blob_handler(const char *blob_type, blob_handler_cb blob_type_handler_cb)
More information about the asterisk-commits
mailing list