[asterisk-commits] qwell: branch qwell/ari-originate2 r391831 - in /team/qwell/ari-originate2: ....
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 14 12:08:09 CDT 2013
Author: qwell
Date: Fri Jun 14 12:08:04 2013
New Revision: 391831
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391831
Log:
Multiple revisions 391732,391776-391777,391828
........
r391732 | mjordan | 2013-06-13 16:53:45 -0500 (Thu, 13 Jun 2013) | 9 lines
Make the utils directory compile... again.
Utils is a source folder that lies,
eventually all developers will cry,
"I know I must maintain it,
But really with this last commit
I can kiss my software ethics good-bye."
........
r391776 | kmoore | 2013-06-14 11:08:55 -0500 (Fri, 14 Jun 2013) | 6 lines
Publish bridge snapshots more often
Bridge snapshot events were missing some important transitions that
were noticed in subsequent snapshots. Snapshots will now be published
on all bridge reconfigurations.
........
r391777 | kmoore | 2013-06-14 11:12:44 -0500 (Fri, 14 Jun 2013) | 5 lines
Fix a crash in CEL bridge snapshot handling
Properly search for bridge association structures so that they are
found when expected and handle cases where they don't exist.
........
r391828 | jrose | 2013-06-14 11:32:43 -0500 (Fri, 14 Jun 2013) | 14 lines
app_mixmonitor: Fix crashes caused by unloading app_mixmonitor
Unloading app_mixmonitor while active mixmonitors were running would
cause a segfault. This patch fixes that by making it impossible to
unload app_mixmonitor while mixmonitors are active.
Review: https://reviewboard.asterisk.org/r/2624/
........
Merged revisions 391778 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 391794 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 391732,391776-391777,391828 from http://svn.asterisk.org/svn/asterisk/trunk
Modified:
team/qwell/ari-originate2/ (props changed)
team/qwell/ari-originate2/apps/app_mixmonitor.c
team/qwell/ari-originate2/main/bridging.c
team/qwell/ari-originate2/main/cel.c
team/qwell/ari-originate2/utils/ael_main.c
team/qwell/ari-originate2/utils/check_expr.c
team/qwell/ari-originate2/utils/conf2ael.c
team/qwell/ari-originate2/utils/refcounter.c
Propchange: team/qwell/ari-originate2/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Propchange: team/qwell/ari-originate2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 14 12:08:04 2013
@@ -1,1 +1,1 @@
-/trunk:1-391702
+/trunk:1-391830
Modified: team/qwell/ari-originate2/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/apps/app_mixmonitor.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/apps/app_mixmonitor.c (original)
+++ team/qwell/ari-originate2/apps/app_mixmonitor.c Fri Jun 14 12:08:04 2013
@@ -744,6 +744,8 @@
}
mixmonitor_free(mixmonitor);
+
+ ast_module_unref(ast_module_info->self);
return NULL;
}
@@ -783,7 +785,7 @@
return 0;
}
-static void launch_monitor_thread(struct ast_channel *chan, const char *filename,
+static int launch_monitor_thread(struct ast_channel *chan, const char *filename,
unsigned int flags, int readvol, int writevol,
const char *post_process, const char *filename_write,
char *filename_read, const char *uid_channel_var,
@@ -810,33 +812,33 @@
/* Pre-allocate mixmonitor structure and spy */
if (!(mixmonitor = ast_calloc(1, sizeof(*mixmonitor)))) {
- return;
+ return -1;
}
/* Now that the struct has been calloced, go ahead and initialize the string fields. */
if (ast_string_field_init(mixmonitor, 512)) {
mixmonitor_free(mixmonitor);
- return;
+ return -1;
}
/* Setup the actual spy before creating our thread */
if (ast_audiohook_init(&mixmonitor->audiohook, AST_AUDIOHOOK_TYPE_SPY, mixmonitor_spy_type, 0)) {
mixmonitor_free(mixmonitor);
- return;
+ return -1;
}
/* Copy over flags and channel name */
mixmonitor->flags = flags;
if (!(mixmonitor->autochan = ast_autochan_setup(chan))) {
mixmonitor_free(mixmonitor);
- return;
+ return -1;
}
if (setup_mixmonitor_ds(mixmonitor, chan, &datastore_id)) {
ast_autochan_destroy(mixmonitor->autochan);
mixmonitor_free(mixmonitor);
ast_free(datastore_id);
- return;
+ return -1;
}
if (!ast_strlen_zero(uid_channel_var)) {
@@ -905,13 +907,13 @@
mixmonitor_spy_type, ast_channel_name(chan));
ast_audiohook_destroy(&mixmonitor->audiohook);
mixmonitor_free(mixmonitor);
- return;
+ return -1;
}
/* reference be released at mixmonitor destruction */
mixmonitor->callid = ast_read_threadstorage_callid();
- ast_pthread_create_detached_background(&thread, NULL, mixmonitor_thread, mixmonitor);
+ return ast_pthread_create_detached_background(&thread, NULL, mixmonitor_thread, mixmonitor);
}
/* a note on filename_parse: creates directory structure and assigns absolute path from relative paths for filenames */
@@ -1032,7 +1034,10 @@
}
pbx_builtin_setvar_helper(chan, "MIXMONITOR_FILENAME", args.filename);
- launch_monitor_thread(chan,
+
+ /* If launch_monitor_thread works, the module reference must not be released until it is finished. */
+ ast_module_ref(ast_module_info->self);
+ if (launch_monitor_thread(chan,
args.filename,
flags.flags,
readvol,
@@ -1041,7 +1046,9 @@
filename_write,
filename_read,
uid_channel_var,
- recipients);
+ recipients)) {
+ ast_module_unref(ast_module_info->self);
+ }
return 0;
}
Modified: team/qwell/ari-originate2/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/main/bridging.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/main/bridging.c (original)
+++ team/qwell/ari-originate2/main/bridging.c Fri Jun 14 12:08:04 2013
@@ -2083,7 +2083,7 @@
* \details
* After a series of bridge_channel_push and
* bridge_channel_pull calls, you need to call this function
- * to cause the bridge to complete restruturing for the change
+ * to cause the bridge to complete restructuring for the change
* in the channel makeup of the bridge.
*
* \note On entry, the bridge is already locked.
@@ -2109,6 +2109,7 @@
}
check_bridge_play_sounds(bridge);
set_bridge_peer_vars(bridge);
+ ast_bridge_publish_state(bridge);
}
/*!
Modified: team/qwell/ari-originate2/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/main/cel.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/main/cel.c (original)
+++ team/qwell/ari-originate2/main/cel.c Fri Jun 14 12:08:04 2013
@@ -1187,7 +1187,6 @@
{
struct bridge_assoc *assoc = obj;
char *bridge_id = arg;
- ast_assert(flags & OBJ_KEY);
if (!strcmp(bridge_id, assoc->bridge_id)) {
return CMP_MATCH;
}
@@ -1197,7 +1196,7 @@
static struct bridge_assoc *find_bridge_primary_by_bridge_id(const char *bridge_id)
{
char *dup_id = ast_strdupa(bridge_id);
- return ao2_callback(bridge_primaries, OBJ_KEY, bridge_match_cb, dup_id);
+ return ao2_callback(bridge_primaries, 0, bridge_match_cb, dup_id);
}
static void clear_bridge_primary(const char *bridge_id)
@@ -1251,6 +1250,10 @@
if ((old_snapshot->capabilities & (AST_BRIDGE_CAPABILITY_1TO1MIX | AST_BRIDGE_CAPABILITY_NATIVE))
&& (new_snapshot->capabilities & AST_BRIDGE_CAPABILITY_MULTIMIX)) {
assoc = find_bridge_primary_by_bridge_id(new_snapshot->uniqueid);
+ if (!assoc) {
+ ast_log(LOG_ERROR, "No association found for bridge %s\n", new_snapshot->uniqueid);
+ return;
+ }
/* this bridge will no longer be treated like a bridge, so mark the bridge_assoc as such */
assoc->track_as_conf = 1;
Modified: team/qwell/ari-originate2/utils/ael_main.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/utils/ael_main.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/utils/ael_main.c (original)
+++ team/qwell/ari-originate2/utils/ael_main.c Fri Jun 14 12:08:04 2013
@@ -20,6 +20,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/backtrace.h"
#include "asterisk/channel.h"
#include "asterisk/ast_expr.h"
#include "asterisk/module.h"
@@ -621,12 +622,12 @@
{
}
-int ast_bt_get_addresses(struct ast_bt *bt)
+int __ast_bt_get_addresses(struct ast_bt *bt)
{
return 0;
}
-char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+char **__ast_bt_get_symbols(void **addresses, size_t num_frames)
{
char **foo = calloc(num_frames, sizeof(char *) + 1);
if (foo) {
Modified: team/qwell/ari-originate2/utils/check_expr.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/utils/check_expr.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/utils/check_expr.c (original)
+++ team/qwell/ari-originate2/utils/check_expr.c Fri Jun 14 12:08:04 2013
@@ -71,14 +71,14 @@
/* not a lot to do in a standalone w/o threading! */
}
-int ast_bt_get_addresses(struct ast_bt *bt);
-int ast_bt_get_addresses(struct ast_bt *bt)
+int __ast_bt_get_addresses(struct ast_bt *bt);
+int __ast_bt_get_addresses(struct ast_bt *bt)
{
/* Suck it, you stupid utils directory! */
return 0;
}
-char **ast_bt_get_symbols(void **addresses, size_t num_frames);
-char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+char **__ast_bt_get_symbols(void **addresses, size_t num_frames);
+char **__ast_bt_get_symbols(void **addresses, size_t num_frames)
{
char **foo = calloc(num_frames, sizeof(char *) + 1);
if (foo) {
Modified: team/qwell/ari-originate2/utils/conf2ael.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/utils/conf2ael.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/utils/conf2ael.c (original)
+++ team/qwell/ari-originate2/utils/conf2ael.c Fri Jun 14 12:08:04 2013
@@ -750,12 +750,12 @@
{
}
-int ast_bt_get_addresses(struct ast_bt *bt)
+int __ast_bt_get_addresses(struct ast_bt *bt)
{
return 0;
}
-char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+char **__ast_bt_get_symbols(void **addresses, size_t num_frames)
{
char **foo = calloc(num_frames, sizeof(char *) + 1);
if (foo) {
Modified: team/qwell/ari-originate2/utils/refcounter.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ari-originate2/utils/refcounter.c?view=diff&rev=391831&r1=391830&r2=391831
==============================================================================
--- team/qwell/ari-originate2/utils/refcounter.c (original)
+++ team/qwell/ari-originate2/utils/refcounter.c Fri Jun 14 12:08:04 2013
@@ -280,20 +280,20 @@
{
}
#ifdef HAVE_BKTR
-struct ast_bt *ast_bt_create(void);
-struct ast_bt *ast_bt_create(void)
+struct ast_bt *__ast_bt_create(void);
+struct ast_bt *__ast_bt_create(void)
{
return NULL;
}
-int ast_bt_get_addresses(struct ast_bt *bt);
-int ast_bt_get_addresses(struct ast_bt *bt)
+int __ast_bt_get_addresses(struct ast_bt *bt);
+int __ast_bt_get_addresses(struct ast_bt *bt)
{
return 0;
}
-char **ast_bt_get_symbols(void **addresses, size_t num_frames);
-char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+char **__ast_bt_get_symbols(void **addresses, size_t num_frames);
+char **__ast_bt_get_symbols(void **addresses, size_t num_frames)
{
char **foo = calloc(num_frames, sizeof(char *) + 1);
if (foo) {
@@ -305,8 +305,8 @@
return foo;
}
-void *ast_bt_destroy(struct ast_bt *bt);
-void *ast_bt_destroy(struct ast_bt *bt)
+void *__ast_bt_destroy(struct ast_bt *bt);
+void *__ast_bt_destroy(struct ast_bt *bt)
{
return NULL;
}
More information about the asterisk-commits
mailing list