[asterisk-commits] dlee: branch dlee/stasis-app r382284 - in /team/dlee/stasis-app: ./ main/ tests/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 28 14:19:37 CST 2013
Author: dlee
Date: Thu Feb 28 14:19:33 2013
New Revision: 382284
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382284
Log:
Addressing opticron's review comments.
........
Merged revisions 382283 from http://svn.asterisk.org/svn/asterisk/team/dlee/stasis-core
Modified:
team/dlee/stasis-app/ (props changed)
team/dlee/stasis-app/main/channel.c
team/dlee/stasis-app/main/manager.c
team/dlee/stasis-app/main/stasis.c
team/dlee/stasis-app/tests/test_stasis.c
Propchange: team/dlee/stasis-app/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb 28 14:19:33 2013
@@ -1,1 +1,1 @@
-/team/dlee/stasis-core:1-382272
+/team/dlee/stasis-core:1-382283
Modified: team/dlee/stasis-app/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-app/main/channel.c?view=diff&rev=382284&r1=382283&r2=382284
==============================================================================
--- team/dlee/stasis-app/main/channel.c (original)
+++ team/dlee/stasis-app/main/channel.c Thu Feb 28 14:19:33 2013
@@ -272,6 +272,10 @@
}
event->variable = ast_strdup(name);
event->value = ast_strdup(value);
+ if (event->channel_name == NULL || event->uniquid == NULL || event->variable == NULL || event->value == NULL) {
+ ast_log(LOG_ERROR, "Allocation failed\n");
+ return;
+ }
msg = stasis_message_create(ast_channel_varset_event(), event);
if (!msg) {
Modified: team/dlee/stasis-app/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-app/main/manager.c?view=diff&rev=382284&r1=382283&r2=382284
==============================================================================
--- team/dlee/stasis-app/main/manager.c (original)
+++ team/dlee/stasis-app/main/manager.c Thu Feb 28 14:19:33 2013
@@ -7482,7 +7482,7 @@
char *manager_event = NULL;
if (!new_snapshot) {
- /* Ignore cache clearing events; we'll se the hangup first */
+ /* Ignore cache clearing events; we'll see the hangup first */
return;
}
Modified: team/dlee/stasis-app/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-app/main/stasis.c?view=diff&rev=382284&r1=382283&r2=382284
==============================================================================
--- team/dlee/stasis-app/main/stasis.c (original)
+++ team/dlee/stasis-app/main/stasis.c Thu Feb 28 14:19:33 2013
@@ -309,7 +309,11 @@
SCOPED_AO2LOCK(lock, topic);
num_subscribers = topic->num_subscribers_current;
subscribers = ast_malloc(num_subscribers * sizeof(*subscribers));
- memcpy(subscribers, topic->subscribers, num_subscribers * sizeof(*subscribers));
+ if (subscribers) {
+ memcpy(subscribers,
+ topic->subscribers,
+ num_subscribers * sizeof(*subscribers));
+ }
}
if (!subscribers) {
@@ -327,7 +331,7 @@
dispatch = dispatch_create(publisher_topic, message, sub);
if (!dispatch) {
- ast_log(LOG_DEBUG, "Allocation failure; dropping message\n");
+ ast_log(LOG_DEBUG, "Allocation failure; dropping dispatch\n");
break;
}
Modified: team/dlee/stasis-app/tests/test_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-app/tests/test_stasis.c?view=diff&rev=382284&r1=382283&r2=382284
==============================================================================
--- team/dlee/stasis-app/tests/test_stasis.c (original)
+++ team/dlee/stasis-app/tests/test_stasis.c Thu Feb 28 14:19:33 2013
@@ -545,24 +545,6 @@
return AST_TEST_PASS;
}
-/*
-AST_TEST_DEFINE()
-{
- switch (cmd) {
- case TEST_INIT:
- info->name = __func__;
- info->category = test_category;
- info->summary = "";
- info->description = "";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
-
- return AST_TEST_PASS;
-}
-*/
-
static int unload_module(void)
{
AST_TEST_UNREGISTER(message_type);
More information about the asterisk-commits
mailing list