[asterisk-commits] mmichelson: branch mmichelson/more_transfer r388897 - in /team/mmichelson/mor...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 15 16:15:07 CDT 2013


Author: mmichelson
Date: Wed May 15 16:15:04 2013
New Revision: 388897

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388897
Log:
Resolve conflict.


Added:
    team/mmichelson/more_transfer/include/asterisk/stasis_app_impl.h
      - copied unchanged from r388895, team/mmichelson/transfer/include/asterisk/stasis_app_impl.h
    team/mmichelson/more_transfer/res/res_stasis_answer.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_answer.c
    team/mmichelson/more_transfer/res/res_stasis_json_asterisk.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_asterisk.c
    team/mmichelson/more_transfer/res/res_stasis_json_asterisk.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_asterisk.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_bridges.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_bridges.c
    team/mmichelson/more_transfer/res/res_stasis_json_bridges.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_bridges.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_channels.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_channels.c
    team/mmichelson/more_transfer/res/res_stasis_json_channels.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_channels.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_endpoints.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_endpoints.c
    team/mmichelson/more_transfer/res/res_stasis_json_endpoints.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_endpoints.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_events.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_events.c
    team/mmichelson/more_transfer/res/res_stasis_json_events.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_events.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_playback.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_playback.c
    team/mmichelson/more_transfer/res/res_stasis_json_playback.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_playback.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_recordings.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_recordings.c
    team/mmichelson/more_transfer/res/res_stasis_json_recordings.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_recordings.exports.in
    team/mmichelson/more_transfer/res/res_stasis_json_sounds.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_sounds.c
    team/mmichelson/more_transfer/res/res_stasis_json_sounds.exports.in
      - copied unchanged from r388895, team/mmichelson/transfer/res/res_stasis_json_sounds.exports.in
    team/mmichelson/more_transfer/res/stasis/   (props changed)
      - copied from r388895, team/mmichelson/transfer/res/stasis/
    team/mmichelson/more_transfer/res/stasis/app.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis/app.c
    team/mmichelson/more_transfer/res/stasis/app.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis/app.h
    team/mmichelson/more_transfer/res/stasis/command.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis/command.c
    team/mmichelson/more_transfer/res/stasis/command.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis/command.h
    team/mmichelson/more_transfer/res/stasis/control.c
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis/control.c
    team/mmichelson/more_transfer/res/stasis/control.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis/control.h
    team/mmichelson/more_transfer/res/stasis_json/
      - copied from r388895, team/mmichelson/transfer/res/stasis_json/
    team/mmichelson/more_transfer/res/stasis_json/resource_asterisk.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_asterisk.h
    team/mmichelson/more_transfer/res/stasis_json/resource_bridges.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_bridges.h
    team/mmichelson/more_transfer/res/stasis_json/resource_channels.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_channels.h
    team/mmichelson/more_transfer/res/stasis_json/resource_endpoints.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_endpoints.h
    team/mmichelson/more_transfer/res/stasis_json/resource_events.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_events.h
    team/mmichelson/more_transfer/res/stasis_json/resource_playback.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_playback.h
    team/mmichelson/more_transfer/res/stasis_json/resource_recordings.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_recordings.h
    team/mmichelson/more_transfer/res/stasis_json/resource_sounds.h
      - copied unchanged from r388895, team/mmichelson/transfer/res/stasis_json/resource_sounds.h
    team/mmichelson/more_transfer/rest-api-templates/res_stasis_json_resource.c.mustache
      - copied unchanged from r388895, team/mmichelson/transfer/rest-api-templates/res_stasis_json_resource.c.mustache
    team/mmichelson/more_transfer/rest-api-templates/res_stasis_json_resource.exports.mustache
      - copied unchanged from r388895, team/mmichelson/transfer/rest-api-templates/res_stasis_json_resource.exports.mustache
    team/mmichelson/more_transfer/rest-api-templates/stasis_json_resource.h.mustache
      - copied unchanged from r388895, team/mmichelson/transfer/rest-api-templates/stasis_json_resource.h.mustache
Modified:
    team/mmichelson/more_transfer/   (props changed)
    team/mmichelson/more_transfer/apps/app_stasis.c
    team/mmichelson/more_transfer/apps/app_voicemail.c
    team/mmichelson/more_transfer/configure
    team/mmichelson/more_transfer/configure.ac
    team/mmichelson/more_transfer/include/asterisk/astobj2.h
    team/mmichelson/more_transfer/include/asterisk/autoconfig.h.in
    team/mmichelson/more_transfer/include/asterisk/module.h
    team/mmichelson/more_transfer/include/asterisk/stasis.h
    team/mmichelson/more_transfer/include/asterisk/stasis_app.h
    team/mmichelson/more_transfer/include/asterisk/stasis_bridging.h
    team/mmichelson/more_transfer/main/app.c
    team/mmichelson/more_transfer/main/asterisk.c
    team/mmichelson/more_transfer/main/astobj2.c
    team/mmichelson/more_transfer/main/bridging.c
    team/mmichelson/more_transfer/main/devicestate.c
    team/mmichelson/more_transfer/main/lock.c
    team/mmichelson/more_transfer/main/logger.c
    team/mmichelson/more_transfer/main/manager_bridging.c
    team/mmichelson/more_transfer/main/named_acl.c
    team/mmichelson/more_transfer/main/presencestate.c
    team/mmichelson/more_transfer/main/stasis.c
    team/mmichelson/more_transfer/main/stasis_bridging.c
    team/mmichelson/more_transfer/main/stasis_cache.c
    team/mmichelson/more_transfer/main/stasis_endpoints.c
    team/mmichelson/more_transfer/main/test.c
    team/mmichelson/more_transfer/res/Makefile
    team/mmichelson/more_transfer/res/res_srtp.c
    team/mmichelson/more_transfer/res/res_stasis.c
    team/mmichelson/more_transfer/res/res_stasis_http_events.c
    team/mmichelson/more_transfer/res/res_stasis_test.c
    team/mmichelson/more_transfer/res/stasis_http/resource_asterisk.h
    team/mmichelson/more_transfer/res/stasis_http/resource_bridges.h
    team/mmichelson/more_transfer/res/stasis_http/resource_channels.h
    team/mmichelson/more_transfer/res/stasis_http/resource_endpoints.h
    team/mmichelson/more_transfer/res/stasis_http/resource_events.h
    team/mmichelson/more_transfer/res/stasis_http/resource_playback.h
    team/mmichelson/more_transfer/res/stasis_http/resource_recordings.h
    team/mmichelson/more_transfer/res/stasis_http/resource_sounds.h
    team/mmichelson/more_transfer/rest-api-templates/make_stasis_http_stubs.py
    team/mmichelson/more_transfer/rest-api-templates/res_stasis_http_resource.c.mustache
    team/mmichelson/more_transfer/rest-api-templates/stasis_http_resource.h.mustache
    team/mmichelson/more_transfer/tests/test_res_stasis.c

Propchange: team/mmichelson/more_transfer/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/mmichelson/more_transfer/
------------------------------------------------------------------------------
--- bridge_construction-integrated (original)
+++ bridge_construction-integrated Wed May 15 16:15:04 2013
@@ -1,1 +1,1 @@
-/trunk:1-388603
+/trunk:1-388840

Propchange: team/mmichelson/more_transfer/
------------------------------------------------------------------------------
--- more_transfer-integrated (original)
+++ more_transfer-integrated Wed May 15 16:15:04 2013
@@ -1,1 +1,1 @@
-/team/mmichelson/transfer:1-388666
+/team/mmichelson/transfer:1-388895

Propchange: team/mmichelson/more_transfer/
------------------------------------------------------------------------------
--- transfer-integrated (original)
+++ transfer-integrated Wed May 15 16:15:04 2013
@@ -1,1 +1,1 @@
-/team/group/bridge_construction:1-388650
+/team/group/bridge_construction:1-388894

Modified: team/mmichelson/more_transfer/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/apps/app_stasis.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/apps/app_stasis.c (original)
+++ team/mmichelson/more_transfer/apps/app_stasis.c Wed May 15 16:15:04 2013
@@ -35,7 +35,7 @@
 #include "asterisk/app.h"
 #include "asterisk/module.h"
 #include "asterisk/stasis.h"
-#include "asterisk/stasis_app.h"
+#include "asterisk/stasis_app_impl.h"
 
 /*** DOCUMENTATION
 	<application name="Stasis" language="en_US">

Modified: team/mmichelson/more_transfer/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/apps/app_voicemail.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/apps/app_voicemail.c (original)
+++ team/mmichelson/more_transfer/apps/app_voicemail.c Wed May 15 16:15:04 2013
@@ -15118,24 +15118,20 @@
 	mailbox_snapshot->folders = ARRAY_LEN(mailbox_folders);
 
 	for (i = 0; i < mailbox_snapshot->folders; i++) {
-		int combining_old = 0;
-		/* Assume we are combining folders if:
-		 *  - The current index is the old folder index OR
-		 *  - The current index is urgent and we were looking for INBOX or all folders OR
-		 *  - The current index is INBOX and we were looking for Urgent or all folders
+		int msg_folder_index = i;
+
+		/* We want this message in the snapshot if any of the following:
+		 *   No folder was specified.
+		 *   The specified folder matches the current folder.
+		 *   The specified folder is INBOX AND we were asked to combine messages AND the current folder is either Old or Urgent.
 		 */
-		if ((i == old_index ||
-			(i == urgent_index && (this_index_only == inbox_index || this_index_only == -1)) ||
-			(i == inbox_index && (this_index_only == urgent_index || this_index_only == -1))) && (combine_INBOX_and_OLD)) {
-			combining_old = 1;
-		}
-
-		/* This if statement is confusing looking.  Here is what it means in english.
-		 * - If a folder is given to the function and that folder's index is not the one we are iterating over, skip it...
-		 * - Unless the folder provided is the INBOX folder and the current index is the OLD folder and we are combining OLD and INBOX msgs.
-		 */
-		if ((this_index_only != -1) && (this_index_only != i) && !(combining_old && i == old_index && this_index_only == inbox_index)) {
+		if (!(this_index_only == -1 || this_index_only == i || (this_index_only == inbox_index && combine_INBOX_and_OLD && (i == old_index || i == urgent_index)))) {
 			continue;
+		}
+
+		/* Make sure that Old or Urgent messages are marked as being in INBOX. */
+		if (combine_INBOX_and_OLD && (i == old_index || i == urgent_index)) {
+			msg_folder_index = inbox_index;
 		}
 
 		memset(&vms, 0, sizeof(vms));
@@ -15152,7 +15148,7 @@
 
 		/* Iterate through each msg, storing off info */
 		if (vms.lastmsg != -1) {
-			if ((vm_msg_snapshot_create(vmu, &vms, mailbox_snapshot, combining_old ? inbox_index : i, i, descending, sort_val))) {
+			if ((vm_msg_snapshot_create(vmu, &vms, mailbox_snapshot, msg_folder_index, i, descending, sort_val))) {
 				ast_log(LOG_WARNING, "Failed to create msg snapshots for %s@%s\n", mailbox, context);
 				goto snapshot_cleanup;
 			}

Modified: team/mmichelson/more_transfer/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/configure.ac?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/configure.ac (original)
+++ team/mmichelson/more_transfer/configure.ac Wed May 15 16:15:04 2013
@@ -469,6 +469,7 @@
 AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
 AST_EXT_LIB_SETUP([SQLITE3], [SQLite], [sqlite3])
 AST_EXT_LIB_SETUP([SRTP], [Secure RTP], [srtp])
+AST_EXT_LIB_SETUP_OPTIONAL([SRTP_SHUTDOWN], [SRTP Library Shutdown Function], [SRTP], [srtp])
 AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer], [ssl])
 AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
 AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
@@ -2179,6 +2180,7 @@
     CFLAGS="${saved_cflags}"
 fi
 
+AST_EXT_LIB_CHECK([SRTP_SHUTDOWN], [srtp], [srtp_shutdown], [srtp/srtp.h])
 
 for ver in 2.0 2.2 2.4 2.6; do
 	AST_PKG_CONFIG_CHECK([GMIME], gmime-$ver)

Modified: team/mmichelson/more_transfer/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/include/asterisk/astobj2.h?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/include/asterisk/astobj2.h (original)
+++ team/mmichelson/more_transfer/include/asterisk/astobj2.h Wed May 15 16:15:04 2013
@@ -635,11 +635,20 @@
  *
  * \return Nothing
  */
+#ifdef REF_DEBUG
 #define ao2_t_global_obj_release(holder, tag)	\
 	__ao2_global_obj_release(&holder, (tag), __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 #define ao2_global_obj_release(holder)	\
 	__ao2_global_obj_release(&holder, "", __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 
+#else
+
+#define ao2_t_global_obj_release(holder, tag)	\
+	__ao2_global_obj_release(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#define ao2_global_obj_release(holder)	\
+	__ao2_global_obj_release(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#endif
+
 void __ao2_global_obj_release(struct ao2_global_obj *holder, const char *tag, const char *file, int line, const char *func, const char *name);
 
 /*!
@@ -657,11 +666,20 @@
  * \retval Reference to previous global ao2 object stored.
  * \retval NULL if no object available.
  */
+#ifdef REF_DEBUG
 #define ao2_t_global_obj_replace(holder, obj, tag)	\
 	__ao2_global_obj_replace(&holder, (obj), (tag), __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 #define ao2_global_obj_replace(holder, obj)	\
 	__ao2_global_obj_replace(&holder, (obj), "", __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 
+#else
+
+#define ao2_t_global_obj_replace(holder, obj, tag)	\
+	__ao2_global_obj_replace(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#define ao2_global_obj_replace(holder, obj)	\
+	__ao2_global_obj_replace(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#endif
+
 void *__ao2_global_obj_replace(struct ao2_global_obj *holder, void *obj, const char *tag, const char *file, int line, const char *func, const char *name);
 
 /*!
@@ -680,10 +698,20 @@
  * \retval 0 The global object was previously empty
  * \retval 1 The global object was not previously empty
  */
+#ifdef REF_DEBUG
 #define ao2_t_global_obj_replace_unref(holder, obj, tag)	\
 	__ao2_global_obj_replace_unref(&holder, (obj), (tag), __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 #define ao2_global_obj_replace_unref(holder, obj)	\
 	__ao2_global_obj_replace_unref(&holder, (obj), "", __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+
+#else
+
+#define ao2_t_global_obj_replace_unref(holder, obj, tag)	\
+	__ao2_global_obj_replace_unref(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#define ao2_global_obj_replace_unref(holder, obj)	\
+	__ao2_global_obj_replace_unref(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#endif
+
 int __ao2_global_obj_replace_unref(struct ao2_global_obj *holder, void *obj, const char *tag, const char *file, int line, const char *func, const char *name);
 
 /*!
@@ -696,10 +724,19 @@
  * \retval Reference to current ao2 object stored in the holder.
  * \retval NULL if no object available.
  */
+#ifdef REF_DEBUG
 #define ao2_t_global_obj_ref(holder, tag)	\
 	__ao2_global_obj_ref(&holder, (tag), __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 #define ao2_global_obj_ref(holder)	\
 	__ao2_global_obj_ref(&holder, "", __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+
+#else
+
+#define ao2_t_global_obj_ref(holder, tag)	\
+	__ao2_global_obj_ref(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#define ao2_global_obj_ref(holder)	\
+	__ao2_global_obj_ref(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
+#endif
 
 void *__ao2_global_obj_ref(struct ao2_global_obj *holder, const char *tag, const char *file, int line, const char *func, const char *name);
 

Modified: team/mmichelson/more_transfer/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/include/asterisk/autoconfig.h.in?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/include/asterisk/autoconfig.h.in (original)
+++ team/mmichelson/more_transfer/include/asterisk/autoconfig.h.in Wed May 15 16:15:04 2013
@@ -294,7 +294,7 @@
 /* Define if your system has the GLOB_NOMAGIC headers. */
 #undef HAVE_GLOB_NOMAGIC
 
-/* Define to 1 if you have the GMime library. */
+/* Define if your system has the GMIME libraries. */
 #undef HAVE_GMIME
 
 /* Define to indicate the GSM library */
@@ -306,7 +306,7 @@
 /* Define to indicate that gsm.h has no prefix for its location */
 #undef HAVE_GSM_HEADER
 
-/* Define to 1 if you have the gtk2 library. */
+/* Define if your system has the GTK2 libraries. */
 #undef HAVE_GTK2
 
 /* Define to 1 if you have the Hoard Memory Allocator library. */
@@ -324,7 +324,7 @@
 /* Define to 1 if you have the Iksemel Jabber library. */
 #undef HAVE_IKSEMEL
 
-/* Define to 1 if you have the System iLBC library. */
+/* Define if your system has the ILBC libraries. */
 #undef HAVE_ILBC
 
 /* Define if your system has the UW IMAP Toolkit c-client library. */
@@ -376,7 +376,7 @@
 /* Define to 1 if you have the OpenLDAP library. */
 #undef HAVE_LDAP
 
-/* Define to 1 if you have the NetBSD Editline library library. */
+/* Define if your system has the LIBEDIT libraries. */
 #undef HAVE_LIBEDIT
 
 /* Define to 1 if you have the <libintl.h> header file. */
@@ -551,7 +551,7 @@
 /* Define to indicate presence of the pg_encoding_to_char API. */
 #undef HAVE_PGSQL_pg_encoding_to_char
 
-/* Define to 1 if you have the PJPROJECT library. */
+/* Define if your system has the PJPROJECT libraries. */
 #undef HAVE_PJPROJECT
 
 /* Define to 1 if your system defines IP_PKTINFO. */
@@ -765,6 +765,9 @@
 /* Define to 1 if you have the Secure RTP library. */
 #undef HAVE_SRTP
 
+/* Define to 1 if SRTP has the SRTP Library Shutdown Function feature. */
+#undef HAVE_SRTP_SHUTDOWN
+
 /* Define to 1 if you have the ISDN SS7 library. */
 #undef HAVE_SS7
 
@@ -854,19 +857,19 @@
 /* Define to 1 if you have the `strtoq' function. */
 #undef HAVE_STRTOQ
 
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
 
-/* Define to 1 if `uid' is member of `struct sockpeercred'. */
+/* Define to 1 if `uid' is a member of `struct sockpeercred'. */
 #undef HAVE_STRUCT_SOCKPEERCRED_UID
 
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
-/* Define to 1 if `cr_uid' is member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_CR_UID
 
-/* Define to 1 if `uid' is member of `struct ucred'. */
+/* Define to 1 if `uid' is a member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_UID
 
 /* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1144,11 +1147,11 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
-
-/* Define to 1 if the C compiler supports function prototypes. */
-#undef PROTOTYPES
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1168,11 +1171,6 @@
 
 /* Define to the type of arg 5 for `select'. */
 #undef SELECT_TYPE_ARG5
-
-/* Define to 1 if the `setvbuf' function takes the buffering type as its
-   second argument and the buffer pointer as the third, as on System V before
-   release 3. */
-#undef SETVBUF_REVERSED
 
 /* The size of `char *', as computed by sizeof. */
 #undef SIZEOF_CHAR_P
@@ -1209,23 +1207,38 @@
 /* Define to a type of the same size as fd_set.fds_bits[[0]] */
 #undef TYPEOF_FD_SET_FDS_BITS
 
-/* Define to 1 if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
+/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-
-/* Define to 1 if running on Darwin. */
-#undef _DARWIN_UNLIMITED_SELECT
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to 1 if running on Darwin. */
+#undef _DARWIN_UNLIMITED_SELECT
+
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
 
 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
 #undef _LARGEFILE_SOURCE
@@ -1242,20 +1255,6 @@
 
 /* Define to 1 if you need to in order for `stat' and other things to work. */
 #undef _POSIX_SOURCE
-
-/* Enable extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
 
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const

Modified: team/mmichelson/more_transfer/include/asterisk/module.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/include/asterisk/module.h?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/include/asterisk/module.h (original)
+++ team/mmichelson/more_transfer/include/asterisk/module.h Wed May 15 16:15:04 2013
@@ -478,6 +478,9 @@
  */
 int ast_unregister_application(const char *app);
 
+/*! Macro to safely ref and unref the self module for the current scope */
+#define SCOPED_MODULE_USE(module) \
+	RAII_VAR(struct ast_module *, __self__ ## __LINE__, ast_module_ref(module), ast_module_unref)
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }

Modified: team/mmichelson/more_transfer/include/asterisk/stasis.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/include/asterisk/stasis.h?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/include/asterisk/stasis.h (original)
+++ team/mmichelson/more_transfer/include/asterisk/stasis.h Wed May 15 16:15:04 2013
@@ -565,10 +565,17 @@
  */
 #define STASIS_MESSAGE_TYPE_INIT(name)					\
 	({								\
+		ast_assert(_priv_ ## name == NULL);			\
 		_priv_ ## name = stasis_message_type_create(#name);	\
 			_priv_ ## name ? 0 : -1;			\
 	})
 
+/*!
+ * \brief Boiler-plate removing macro for cleaning up message types.
+ *
+ * \param name Name of message type.
+ * \since 12
+ */
 #define STASIS_MESSAGE_TYPE_CLEANUP(name)	\
 	({					\
 		ao2_cleanup(_priv_ ## name);	\

Modified: team/mmichelson/more_transfer/include/asterisk/stasis_app.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/include/asterisk/stasis_app.h?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/include/asterisk/stasis_app.h (original)
+++ team/mmichelson/more_transfer/include/asterisk/stasis_app.h Wed May 15 16:15:04 2013
@@ -53,27 +53,6 @@
 #include "asterisk/channel.h"
 #include "asterisk/json.h"
 
-struct ast_channel_snapshot;
-
-/*! @{ */
-
-/*!
- * \brief Control a channel using \c stasis_app.
- *
- * This function blocks until the channel hangs up, or
- * stasis_app_control_continue() is called on the channel's \ref
- * stasis_app_control struct.
- *
- * \param chan Channel to control with Stasis.
- * \param app_name Application controlling the channel.
- * \param argc Number of arguments for the application.
- * \param argv Arguments for the application.
- */
-int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
-	char *argv[]);
-
-/*! @} */
-
 /*! @{ */
 
 /*!
@@ -87,7 +66,7 @@
  * \param message Message to handle. (borrowed copy)
  */
 typedef void (*stasis_app_cb)(void *data, const char *app_name,
-			      struct ast_json *message);
+	struct ast_json *message);
 
 /*!
  * \brief Register a new Stasis application.
@@ -148,6 +127,16 @@
 	const char *channel_id);
 
 /*!
+ * \brief Returns the uniqueid of the channel associated with this control
+ *
+ * \param control Control object.
+ * \return Uniqueid of the associate channel.
+ * \return \c NULL if \a control is \c NULL.
+ */
+const char *stasis_app_control_get_channel_id(
+	const struct stasis_app_control *control);
+
+/*!
  * \brief Exit \c res_stasis and continue execution in the dialplan.
  *
  * If the channel is no longer in \c res_stasis, this function does nothing.
@@ -160,20 +149,30 @@
  * \brief Answer the channel associated with this control.
  * \param control Control for \c res_stasis.
  * \return 0 for success.
- * \return -1 for error.
+ * \return Non-zero for error.
  */
 int stasis_app_control_answer(struct stasis_app_control *control);
 
-/*! @} */
-
-/*! @{ */
+/*!
+ * \brief Returns the most recent snapshot for the associated channel.
+ *
+ * The returned pointer is AO2 managed, so ao2_cleanup() when you're done.
+ *
+ * \param control Control for \c res_stasis.
+ * \return Most recent snapshot. ao2_cleanup() when done.
+ * \return \c NULL if channel isn't in cache.
+ */
+struct ast_channel_snapshot *stasis_app_control_get_snapshot(
+	const struct stasis_app_control *control);
 
 /*!
- * \brief Build a JSON object from a \ref ast_channel_snapshot.
- * \return JSON object representing channel snapshot.
- * \return \c NULL on error
+ * \brief Publish a message to the \a control's channel's topic.
+ *
+ * \param control Control to publish to
+ * \param message Message to publish
  */
-struct ast_json *ast_channel_snapshot_to_json(const struct ast_channel_snapshot *snapshot);
+void stasis_app_control_publish(
+	struct stasis_app_control *control, struct stasis_message *message);
 
 /*!
  * \brief Increment the res_stasis reference count.

Modified: team/mmichelson/more_transfer/include/asterisk/stasis_bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/include/asterisk/stasis_bridging.h?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/include/asterisk/stasis_bridging.h (original)
+++ team/mmichelson/more_transfer/include/asterisk/stasis_bridging.h Wed May 15 16:15:04 2013
@@ -149,11 +149,19 @@
 
 /*!
  * \since 12
- * \brief Message type for \ref ast_bridge_blob messages.
- *
- * \retval Message type for \ref ast_bridge_blob messages.
- */
-struct stasis_message_type *ast_bridge_blob_type(void);
+ * \brief Message type for \ref channel enter bridge blob messages.
+ *
+ * \retval Message type for \ref channel enter bridge blob messages.
+ */
+struct stasis_message_type *ast_channel_entered_bridge_type(void);
+
+/*!
+ * \since 12
+ * \brief Message type for \ref channel leave bridge blob messages.
+ *
+ * \retval Message type for \ref channel leave bridge blob messages.
+ */
+struct stasis_message_type *ast_channel_left_bridge_type(void);
 
 /*!
  * \since 12
@@ -168,9 +176,10 @@
  * \return \ref ast_bridge_blob message.
  * \return \c NULL on error
  */
-struct stasis_message *ast_bridge_blob_create(struct ast_bridge *bridge,
-					struct ast_channel *chan,
-					struct ast_json *blob);
+struct stasis_message *ast_bridge_blob_create(struct stasis_message_type *type,
+	struct ast_bridge *bridge,
+	struct ast_channel *chan,
+	struct ast_json *blob);
 
 /*!
  * \since 12

Modified: team/mmichelson/more_transfer/main/app.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/main/app.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/main/app.c (original)
+++ team/mmichelson/more_transfer/main/app.c Wed May 15 16:15:04 2013
@@ -84,8 +84,9 @@
 
 static struct stasis_topic *mwi_topic_all;
 static struct stasis_caching_topic *mwi_topic_cached;
-static struct stasis_message_type *mwi_state_type;
 static struct stasis_topic_pool *mwi_topic_pool;
+
+STASIS_MESSAGE_TYPE_DEFN(stasis_mwi_state_type);
 
 static void *shaun_of_the_dead(void *data)
 {
@@ -2659,11 +2660,6 @@
 	return mwi_topic_cached;
 }
 
-struct stasis_message_type *stasis_mwi_state_type(void)
-{
-	return mwi_state_type;
-}
-
 struct stasis_topic *stasis_mwi_topic(const char *uniqueid)
 {
 	return stasis_topic_pool_get_topic(mwi_topic_pool, uniqueid);
@@ -2732,8 +2728,7 @@
 	ao2_cleanup(mwi_topic_all);
 	mwi_topic_all = NULL;
 	mwi_topic_cached = stasis_caching_unsubscribe(mwi_topic_cached);
-	ao2_cleanup(mwi_state_type);
-	mwi_state_type = NULL;
+	STASIS_MESSAGE_TYPE_CLEANUP(stasis_mwi_state_type);
 	ao2_cleanup(mwi_topic_pool);
 	mwi_topic_pool = NULL;
 }
@@ -2748,8 +2743,7 @@
 	if (!mwi_topic_cached) {
 		return -1;
 	}
-	mwi_state_type = stasis_message_type_create("stasis_mwi_state");
-	if (!mwi_state_type) {
+	if (STASIS_MESSAGE_TYPE_INIT(stasis_mwi_state_type) != 0) {
 		return -1;
 	}
 	mwi_topic_pool = stasis_topic_pool_create(mwi_topic_all);

Modified: team/mmichelson/more_transfer/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/main/asterisk.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/main/asterisk.c (original)
+++ team/mmichelson/more_transfer/main/asterisk.c Wed May 15 16:15:04 2013
@@ -415,7 +415,7 @@
 static struct stasis_topic *system_topic;
 
 /*!\ brief The \ref stasis_message_type for network changes */
-static struct stasis_message_type *network_change_type;
+STASIS_MESSAGE_TYPE_DEFN(ast_network_change_type);
 
 #if !defined(LOW_MEMORY)
 struct file_version {
@@ -1063,18 +1063,12 @@
 	return system_topic;
 }
 
-struct stasis_message_type *ast_network_change_type(void)
-{
-	return network_change_type;
-}
-
 /*! \brief Cleanup the \ref stasis system level items */
 static void stasis_system_topic_cleanup(void)
 {
 	ao2_ref(system_topic, -1);
 	system_topic = NULL;
-	ao2_ref(network_change_type, -1);
-	network_change_type = NULL;
+	STASIS_MESSAGE_TYPE_CLEANUP(ast_network_change_type);
 }
 
 /*! \brief Initialize the system level items for \ref stasis */
@@ -1087,8 +1081,7 @@
 		return 1;
 	}
 
-	network_change_type = stasis_message_type_create("network_change");
-	if (!network_change_type) {
+	if (STASIS_MESSAGE_TYPE_INIT(ast_network_change_type) != 0) {
 		return -1;
 	}
 	return 0;

Modified: team/mmichelson/more_transfer/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/main/astobj2.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/main/astobj2.c (original)
+++ team/mmichelson/more_transfer/main/astobj2.c Wed May 15 16:15:04 2013
@@ -684,7 +684,11 @@
 
 	/* Release the held ao2 object. */
 	if (holder->obj) {
-		__ao2_ref_debug(holder->obj, -1, tag, file, line, func);
+		if (tag) {
+			__ao2_ref_debug(holder->obj, -1, tag, file, line, func);
+		} else {
+			__ao2_ref(holder->obj, -1);
+		}
 		holder->obj = NULL;
 	}
 
@@ -708,7 +712,11 @@
 	}
 
 	if (obj) {
-		__ao2_ref_debug(obj, +1, tag, file, line, func);
+		if (tag) {
+			__ao2_ref_debug(obj, +1, tag, file, line, func);
+		} else {
+			__ao2_ref(obj, +1);
+		}
 	}
 	obj_old = holder->obj;
 	holder->obj = obj;
@@ -724,7 +732,11 @@
 
 	obj_old = __ao2_global_obj_replace(holder, obj, tag, file, line, func, name);
 	if (obj_old) {
-		__ao2_ref_debug(obj_old, -1, tag, file, line, func);
+		if (tag) {
+			__ao2_ref_debug(obj_old, -1, tag, file, line, func);
+		} else {
+			__ao2_ref(obj_old, -1);
+		}
 		return 1;
 	}
 	return 0;
@@ -749,7 +761,11 @@
 
 	obj = holder->obj;
 	if (obj) {
-		__ao2_ref_debug(obj, +1, tag, file, line, func);
+		if (tag) {
+			__ao2_ref_debug(obj, +1, tag, file, line, func);
+		} else {
+			__ao2_ref(obj, +1);
+		}
 	}
 
 	__ast_rwlock_unlock(file, line, func, &holder->lock, name);

Modified: team/mmichelson/more_transfer/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/main/bridging.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/main/bridging.c (original)
+++ team/mmichelson/more_transfer/main/bridging.c Wed May 15 16:15:04 2013
@@ -3136,6 +3136,31 @@
 
 /*!
  * \internal
+ * \brief Point the bridge_channel to a new bridge.
+ * \since 12.0.0
+ *
+ * \param bridge_channel What is to point to a new bridge.
+ * \param new_bridge Where the bridge channel should point.
+ *
+ * \return Nothing
+ */
+static void bridge_channel_change_bridge(struct ast_bridge_channel *bridge_channel, struct ast_bridge *new_bridge)
+{
+	struct ast_bridge *old_bridge;
+
+	ao2_ref(new_bridge, +1);
+	ast_bridge_channel_lock(bridge_channel);
+	ast_channel_lock(bridge_channel->chan);
+	old_bridge = bridge_channel->bridge;
+	bridge_channel->bridge = new_bridge;
+	ast_channel_internal_bridge_set(bridge_channel->chan, new_bridge);
+	ast_channel_unlock(bridge_channel->chan);
+	ast_bridge_channel_unlock(bridge_channel);
+	ao2_ref(old_bridge, -1);
+}
+
+/*!
+ * \internal
  * \brief Do the merge of two bridges.
  * \since 12.0.0
  *
@@ -3184,6 +3209,7 @@
 			for (idx = 0; idx < num_kick; ++idx) {
 				if (bridge_channel == kick_me[idx]) {
 					ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
+					break;
 				}
 			}
 		}
@@ -3197,14 +3223,7 @@
 		}
 
 		/* Point to new bridge.*/
-		ao2_ref(dst_bridge, +1);
-		ast_bridge_channel_lock(bridge_channel);
-		ast_channel_lock(bridge_channel->chan);
-		bridge_channel->bridge = dst_bridge;
-		ast_channel_internal_bridge_set(bridge_channel->chan, dst_bridge);
-		ast_channel_unlock(bridge_channel->chan);
-		ast_bridge_channel_unlock(bridge_channel);
-		ao2_ref(src_bridge, -1);
+		bridge_channel_change_bridge(bridge_channel, dst_bridge);
 
 		if (bridge_channel_push(bridge_channel)) {
 			ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
@@ -3459,26 +3478,14 @@
 	}
 
 	/* Point to new bridge.*/
-	ao2_ref(dst_bridge, +1);
-	ast_bridge_channel_lock(bridge_channel);
-	ast_channel_lock(bridge_channel->chan);
-	bridge_channel->bridge = dst_bridge;
-	ast_channel_internal_bridge_set(bridge_channel->chan, dst_bridge);
-	ast_channel_unlock(bridge_channel->chan);
-	ast_bridge_channel_unlock(bridge_channel);
+	ao2_ref(orig_bridge, +1);/* Keep a ref in case the push fails. */
+	bridge_channel_change_bridge(bridge_channel, dst_bridge);
 
 	if (bridge_channel_push(bridge_channel)) {
 		/* Try to put the channel back into the original bridge. */
 		if (attempt_recovery && was_in_bridge) {
 			/* Point back to original bridge. */
-			ao2_ref(orig_bridge, +1);
-			ast_bridge_channel_lock(bridge_channel);
-			ast_channel_lock(bridge_channel->chan);
-			bridge_channel->bridge = orig_bridge;
-			ast_channel_internal_bridge_set(bridge_channel->chan, orig_bridge);
-			ast_channel_unlock(bridge_channel->chan);
-			ast_bridge_channel_unlock(bridge_channel);
-			ao2_ref(dst_bridge, -1);
+			bridge_channel_change_bridge(bridge_channel, orig_bridge);
 
 			if (bridge_channel_push(bridge_channel)) {
 				ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);

Modified: team/mmichelson/more_transfer/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/more_transfer/main/devicestate.c?view=diff&rev=388897&r1=388896&r2=388897
==============================================================================
--- team/mmichelson/more_transfer/main/devicestate.c (original)
+++ team/mmichelson/more_transfer/main/devicestate.c Wed May 15 16:15:04 2013
@@ -197,8 +197,9 @@
 
 static struct stasis_topic *device_state_topic_all;
 static struct stasis_caching_topic *device_state_topic_cached;
-static struct stasis_message_type *device_state_message_type;
 static struct stasis_topic_pool *device_state_topic_pool;
+
+STASIS_MESSAGE_TYPE_DEFN(ast_device_state_message_type);
 
 /* Forward declarations */
 static int getproviderstate(const char *provider, const char *address);
@@ -723,11 +724,6 @@
 	return device_state_topic_cached;
 }
 
-struct stasis_message_type *ast_device_state_message_type(void)
-{
-	return device_state_message_type;
-}
-
 struct stasis_topic *ast_device_state_topic(const char *device)
 {
 	return stasis_topic_pool_get_topic(device_state_topic_pool, device);
@@ -781,8 +777,7 @@
 	ao2_cleanup(device_state_topic_all);
 	device_state_topic_all = NULL;

[... 3120 lines stripped ...]



More information about the asterisk-commits mailing list