[asterisk-commits] kmoore: branch kmoore/stasis-mwi r382291 - in /team/kmoore/stasis-mwi: ./ mai...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 28 15:17:10 CST 2013
Author: kmoore
Date: Thu Feb 28 15:17:06 2013
New Revision: 382291
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382291
Log:
Multiple revisions 382283,382286
........
r382283 | dlee | 2013-02-28 14:19:07 -0600 (Thu, 28 Feb 2013) | 1 line
Addressing opticron's review comments.
........
r382286 | dlee | 2013-02-28 14:26:56 -0600 (Thu, 28 Feb 2013) | 1 line
fixed a typ
........
Merged revisions 382283,382286 from http://svn.asterisk.org/svn/asterisk/team/dlee/stasis-core
Modified:
team/kmoore/stasis-mwi/ (props changed)
team/kmoore/stasis-mwi/main/channel.c
team/kmoore/stasis-mwi/main/manager.c
team/kmoore/stasis-mwi/main/stasis.c
team/kmoore/stasis-mwi/tests/test_stasis.c
Propchange: team/kmoore/stasis-mwi/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb 28 15:17:06 2013
@@ -1,1 +1,1 @@
-/team/dlee/stasis-core:1-382276
+/team/dlee/stasis-core:1-382290
Modified: team/kmoore/stasis-mwi/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/main/channel.c?view=diff&rev=382291&r1=382290&r2=382291
==============================================================================
--- team/kmoore/stasis-mwi/main/channel.c (original)
+++ team/kmoore/stasis-mwi/main/channel.c Thu Feb 28 15:17:06 2013
@@ -272,6 +272,10 @@
}
event->variable = ast_strdup(name);
event->value = ast_strdup(value);
+ if (event->channel_name == NULL || event->uniqueid == 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/kmoore/stasis-mwi/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/main/manager.c?view=diff&rev=382291&r1=382290&r2=382291
==============================================================================
--- team/kmoore/stasis-mwi/main/manager.c (original)
+++ team/kmoore/stasis-mwi/main/manager.c Thu Feb 28 15:17:06 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/kmoore/stasis-mwi/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/main/stasis.c?view=diff&rev=382291&r1=382290&r2=382291
==============================================================================
--- team/kmoore/stasis-mwi/main/stasis.c (original)
+++ team/kmoore/stasis-mwi/main/stasis.c Thu Feb 28 15:17:06 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/kmoore/stasis-mwi/tests/test_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-mwi/tests/test_stasis.c?view=diff&rev=382291&r1=382290&r2=382291
==============================================================================
--- team/kmoore/stasis-mwi/tests/test_stasis.c (original)
+++ team/kmoore/stasis-mwi/tests/test_stasis.c Thu Feb 28 15:17:06 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