[svn-commits] snuffy: branch snuffy/ao2_jabber_take2 r203602 - in /team/snuffy/ao2_jabber_t...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 26 07:32:29 CDT 2009


Author: snuffy
Date: Fri Jun 26 07:32:17 2009
New Revision: 203602

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203602
Log:
UPDATE damn it..

Added:
    team/snuffy/ao2_jabber_take2/channels/chan_multicast_rtp.c
      - copied unchanged from r203569, trunk/channels/chan_multicast_rtp.c
    team/snuffy/ao2_jabber_take2/channels/sig_pri.c
      - copied unchanged from r203569, trunk/channels/sig_pri.c
    team/snuffy/ao2_jabber_take2/channels/sig_pri.h
      - copied unchanged from r203569, trunk/channels/sig_pri.h
    team/snuffy/ao2_jabber_take2/include/asterisk/syslog.h
      - copied unchanged from r203569, trunk/include/asterisk/syslog.h
    team/snuffy/ao2_jabber_take2/main/syslog.c
      - copied unchanged from r203569, trunk/main/syslog.c
    team/snuffy/ao2_jabber_take2/res/res_rtp_multicast.c
      - copied unchanged from r203569, trunk/res/res_rtp_multicast.c
Modified:
    team/snuffy/ao2_jabber_take2/CHANGES
    team/snuffy/ao2_jabber_take2/CREDITS
    team/snuffy/ao2_jabber_take2/Makefile
    team/snuffy/ao2_jabber_take2/apps/Makefile
    team/snuffy/ao2_jabber_take2/apps/app_chanspy.c
    team/snuffy/ao2_jabber_take2/apps/app_externalivr.c
    team/snuffy/ao2_jabber_take2/apps/app_fax.c
    team/snuffy/ao2_jabber_take2/apps/app_macro.c
    team/snuffy/ao2_jabber_take2/apps/app_meetme.c
    team/snuffy/ao2_jabber_take2/apps/app_minivm.c
    team/snuffy/ao2_jabber_take2/apps/app_mixmonitor.c
    team/snuffy/ao2_jabber_take2/apps/app_page.c
    team/snuffy/ao2_jabber_take2/apps/app_queue.c
    team/snuffy/ao2_jabber_take2/apps/app_read.c
    team/snuffy/ao2_jabber_take2/apps/app_readexten.c
    team/snuffy/ao2_jabber_take2/apps/app_rpt.c
    team/snuffy/ao2_jabber_take2/apps/app_skel.c
    team/snuffy/ao2_jabber_take2/apps/app_sms.c
    team/snuffy/ao2_jabber_take2/apps/app_url.c
    team/snuffy/ao2_jabber_take2/apps/app_voicemail.c
    team/snuffy/ao2_jabber_take2/autoconf/ast_gcc_attribute.m4
    team/snuffy/ao2_jabber_take2/cdr/cdr_adaptive_odbc.c
    team/snuffy/ao2_jabber_take2/cdr/cdr_manager.c
    team/snuffy/ao2_jabber_take2/cdr/cdr_pgsql.c
    team/snuffy/ao2_jabber_take2/cdr/cdr_sqlite3_custom.c
    team/snuffy/ao2_jabber_take2/cdr/cdr_tds.c
    team/snuffy/ao2_jabber_take2/channels/Makefile
    team/snuffy/ao2_jabber_take2/channels/chan_iax2.c
    team/snuffy/ao2_jabber_take2/channels/chan_misdn.c
    team/snuffy/ao2_jabber_take2/channels/h323/ast_h323.cxx
    team/snuffy/ao2_jabber_take2/channels/misdn/isdn_lib.c
    team/snuffy/ao2_jabber_take2/channels/sig_analog.c
    team/snuffy/ao2_jabber_take2/channels/sig_analog.h
    team/snuffy/ao2_jabber_take2/channels/xpmr/xpmr.c
    team/snuffy/ao2_jabber_take2/codecs/gsm/src/gsm_destroy.c
    team/snuffy/ao2_jabber_take2/configs/cdr_tds.conf.sample
    team/snuffy/ao2_jabber_take2/configs/iax.conf.sample
    team/snuffy/ao2_jabber_take2/doc/CODING-GUIDELINES
    team/snuffy/ao2_jabber_take2/doc/datastores.txt
    team/snuffy/ao2_jabber_take2/doc/tex/   (props changed)
    team/snuffy/ao2_jabber_take2/doc/tex/billing.tex
    team/snuffy/ao2_jabber_take2/doc/tex/cdrdriver.tex
    team/snuffy/ao2_jabber_take2/doc/tex/channelvariables.tex
    team/snuffy/ao2_jabber_take2/formats/format_wav_gsm.c
    team/snuffy/ao2_jabber_take2/funcs/func_cdr.c
    team/snuffy/ao2_jabber_take2/funcs/func_channel.c
    team/snuffy/ao2_jabber_take2/funcs/func_curl.c
    team/snuffy/ao2_jabber_take2/funcs/func_cut.c
    team/snuffy/ao2_jabber_take2/funcs/func_enum.c
    team/snuffy/ao2_jabber_take2/funcs/func_lock.c
    team/snuffy/ao2_jabber_take2/funcs/func_odbc.c
    team/snuffy/ao2_jabber_take2/funcs/func_realtime.c
    team/snuffy/ao2_jabber_take2/funcs/func_vmcount.c
    team/snuffy/ao2_jabber_take2/include/asterisk/app.h
    team/snuffy/ao2_jabber_take2/include/asterisk/autoconfig.h.in
    team/snuffy/ao2_jabber_take2/include/asterisk/calendar.h
    team/snuffy/ao2_jabber_take2/include/asterisk/channel.h
    team/snuffy/ao2_jabber_take2/include/asterisk/frame.h
    team/snuffy/ao2_jabber_take2/include/asterisk/linkedlists.h
    team/snuffy/ao2_jabber_take2/include/asterisk/module.h
    team/snuffy/ao2_jabber_take2/include/asterisk/rtp_engine.h
    team/snuffy/ao2_jabber_take2/main/app.c
    team/snuffy/ao2_jabber_take2/main/ast_expr2.fl
    team/snuffy/ao2_jabber_take2/main/ast_expr2f.c
    team/snuffy/ao2_jabber_take2/main/asterisk.c
    team/snuffy/ao2_jabber_take2/main/autoservice.c
    team/snuffy/ao2_jabber_take2/main/cdr.c
    team/snuffy/ao2_jabber_take2/main/channel.c
    team/snuffy/ao2_jabber_take2/main/cli.c
    team/snuffy/ao2_jabber_take2/main/config.c
    team/snuffy/ao2_jabber_take2/main/db.c
    team/snuffy/ao2_jabber_take2/main/devicestate.c
    team/snuffy/ao2_jabber_take2/main/event.c
    team/snuffy/ao2_jabber_take2/main/features.c
    team/snuffy/ao2_jabber_take2/main/file.c
    team/snuffy/ao2_jabber_take2/main/frame.c
    team/snuffy/ao2_jabber_take2/main/http.c
    team/snuffy/ao2_jabber_take2/main/image.c
    team/snuffy/ao2_jabber_take2/main/logger.c
    team/snuffy/ao2_jabber_take2/main/manager.c
    team/snuffy/ao2_jabber_take2/main/rtp_engine.c
    team/snuffy/ao2_jabber_take2/main/slinfactory.c
    team/snuffy/ao2_jabber_take2/main/xmldoc.c
    team/snuffy/ao2_jabber_take2/pbx/pbx_config.c
    team/snuffy/ao2_jabber_take2/pbx/pbx_dundi.c
    team/snuffy/ao2_jabber_take2/pbx/pbx_lua.c
    team/snuffy/ao2_jabber_take2/pbx/pbx_realtime.c
    team/snuffy/ao2_jabber_take2/res/ael/ael_lex.c
    team/snuffy/ao2_jabber_take2/res/res_calendar.c
    team/snuffy/ao2_jabber_take2/res/res_calendar_caldav.c
    team/snuffy/ao2_jabber_take2/res/res_calendar_exchange.c
    team/snuffy/ao2_jabber_take2/res/res_calendar_icalendar.c
    team/snuffy/ao2_jabber_take2/res/res_config_ldap.c
    team/snuffy/ao2_jabber_take2/res/res_config_odbc.c
    team/snuffy/ao2_jabber_take2/res/res_config_pgsql.c
    team/snuffy/ao2_jabber_take2/res/res_musiconhold.c
    team/snuffy/ao2_jabber_take2/res/res_rtp_asterisk.c
    team/snuffy/ao2_jabber_take2/res/res_smdi.c
    team/snuffy/ao2_jabber_take2/res/res_snmp.c
    team/snuffy/ao2_jabber_take2/utils/ael_main.c
    team/snuffy/ao2_jabber_take2/utils/conf2ael.c
    team/snuffy/ao2_jabber_take2/utils/extconf.c
    team/snuffy/ao2_jabber_take2/utils/stereorize.c

Modified: team/snuffy/ao2_jabber_take2/CHANGES
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/CHANGES?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/CHANGES (original)
+++ team/snuffy/ao2_jabber_take2/CHANGES Fri Jun 26 07:32:17 2009
@@ -27,6 +27,17 @@
    'rpid' and 'pai'. Setting sendrpid to 'rpid' will cause Remote-Party-ID
    header to be sent (equivalent to setting sendrpid=yes) and setting
    sendrpid to 'pai' will cause P-Asserted-Identity header to be sent.
+ * The 'ignoresdpversion' behavior has been made automatic when the SDP received
+   is in response to a T.38 re-INVITE that Asterisk initiated. In this situation,
+   since the call will fail if Asterisk does not process the incoming SDP, Asterisk
+   will accept the SDP even if the SDP version number is not properly incremented,
+   but will generate a warning in the log indicating that the SIP peer that sent
+   the SDP should have the 'ignoresdpversion' option set.
+
+IAX2 Changes
+-----------
+ * Added rtsavesysname option into iax.conf to allow the systname to be saved
+   on realtime updates.
 
 Applications
 ------------
@@ -39,6 +50,8 @@
    to cycle through the next avaliable channel.  By default this is still '*'.
  * Added x() option to app_chanspy.  This option allows DTMF to be set to
    exit the application.
+ * The Voicemail application has been improved to automatically ignore messages
+   that only contain silence.
 
 Dialplan Functions
 ------------------
@@ -151,6 +164,24 @@
 CDR
 ---
  * Multiple files and formats can now be specified in cdr_custom.conf.
+
+Calendaring for Asterisk
+------------------------
+ * A new set of modules were added supporing calendar integration with Asterisk.
+   Dialplan functions for reading from and writing to calendars are included,
+   as well as the ability to execute dialplan logic upon calendar event notifications.
+   iCalendar, CalDAV, and Exchange Server calendars are supported (Exchange support
+   only tested on Exchange Server 2003 with no support for forms-based authentication).
+
+Multicast RTP Support
+---------------------
+ * A new RTP engine and channel driver have been added which supports Multicast RTP.
+   The channel driver can be used with the Page application to perform multicast RTP
+   paging. The dial string format is: MulticastRTP/<type>/<destination>/<control address>
+   Type can be either basic or linksys.
+   Destination is the IP address and port for the RTP packets.
+   Control address is specific to the linksys type and is used for sending the control
+   packets unique to them.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2  -------------

Modified: team/snuffy/ao2_jabber_take2/CREDITS
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/CREDITS?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/CREDITS (original)
+++ team/snuffy/ao2_jabber_take2/CREDITS Fri Jun 26 07:32:17 2009
@@ -200,6 +200,10 @@
 Eliel C. Sardanons - XML documentation implementation, and various other contributions
      eliels(AT)gmail.com
 
+Sean Bright - Snom call pickup, newt interface for menuselect, cdr_tds rewrite,
+	countless other improvements, fixes, and good ideas.
+	sean(AT)malleable.com
+
 === OTHER CONTRIBUTIONS ===
 John Todd - Monkey sounds and associated teletorture prompt
 Michael Jerris - bug marshaling

Modified: team/snuffy/ao2_jabber_take2/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/Makefile?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/Makefile (original)
+++ team/snuffy/ao2_jabber_take2/Makefile Fri Jun 26 07:32:17 2009
@@ -326,6 +326,10 @@
 
 # comment to print directories during submakes
 #PRINT_DIR=yes
+
+ifneq ($(INSIDE_EMACS),)
+PRINT_DIR=yes
+endif
 
 SILENTMAKE:=$(MAKE) --quiet --no-print-directory
 ifneq ($(PRINT_DIR)$(NOISY_BUILD),)

Modified: team/snuffy/ao2_jabber_take2/apps/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/Makefile?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/Makefile (original)
+++ team/snuffy/ao2_jabber_take2/apps/Makefile Fri Jun 26 07:32:17 2009
@@ -18,11 +18,9 @@
 MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
 ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
   MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
-  MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
 endif
 ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
   MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
-  MENUSELECT_DEPENDS_app_directory+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
 endif
 
 all: _all

Modified: team/snuffy/ao2_jabber_take2/apps/app_chanspy.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_chanspy.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_chanspy.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_chanspy.c Fri Jun 26 07:32:17 2009
@@ -410,7 +410,7 @@
 static int spy_generate(struct ast_channel *chan, void *data, int len, int samples)
 {
 	struct chanspy_translation_helper *csth = data;
-	struct ast_frame *f = NULL;
+	struct ast_frame *f, *cur;
 
 	ast_audiohook_lock(&csth->spy_audiohook);
 	if (csth->spy_audiohook.status != AST_AUDIOHOOK_STATUS_RUNNING) {
@@ -426,14 +426,16 @@
 	if (!f)
 		return 0;
 
-	if (ast_write(chan, f)) {
-		ast_frfree(f);
-		return -1;
-	}
-
-	if (csth->fd) {
-		if (write(csth->fd, f->data.ptr, f->datalen) < 0) {
-			ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+	for (cur = f; cur; cur = AST_LIST_NEXT(cur, frame_list)) {
+		if (ast_write(chan, cur)) {
+			ast_frfree(f);
+			return -1;
+		}
+
+		if (csth->fd) {
+			if (write(csth->fd, cur->data.ptr, cur->datalen) < 0) {
+				ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+			}
 		}
 	}
 

Modified: team/snuffy/ao2_jabber_take2/apps/app_externalivr.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_externalivr.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_externalivr.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_externalivr.c Fri Jun 26 07:32:17 2009
@@ -95,11 +95,11 @@
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
 #define ast_chan_log(level, channel, format, ...) ast_log(level, "%s: " format, channel->name , ## __VA_ARGS__)
 
-enum {
+enum options_flags {
 	noanswer = (1 << 0),
 	ignore_hangup = (1 << 1),
 	run_dead = (1 << 2),
-} options_flags;
+};
 
 AST_APP_OPTIONS(app_opts, {
 	AST_APP_OPTION('n', noanswer),

Modified: team/snuffy/ao2_jabber_take2/apps/app_fax.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_fax.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_fax.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_fax.c Fri Jun 26 07:32:17 2009
@@ -351,7 +351,7 @@
 	return 0;
 }
 
-struct ast_generator generator = {
+static struct ast_generator generator = {
 	alloc:		fax_generator_alloc,
 	generate: 	fax_generator_generate,
 };
@@ -374,7 +374,7 @@
 	struct timeval now, start, state_change;
 	enum ast_control_t38 t38control;
 
-#if SPANDSP_RELEASE_DATE >= 20081012
+#if SPANDSP_RELEASE_DATE >= 20080725
         /* for spandsp shaphots 0.0.6 and higher */
         t30state = &fax.t30;
 #else
@@ -553,7 +553,7 @@
 	t30_state_t *t30state;
 	t38_core_state_t *t38state;
 
-#if SPANDSP_RELEASE_DATE >= 20081012
+#if SPANDSP_RELEASE_DATE >= 20080725
 	/* for spandsp shaphots 0.0.6 and higher */
 	t30state = &t38.t30;
 	t38state = &t38.t38_fe.t38;
@@ -710,6 +710,7 @@
 	int res = 0;
 	char *parse;
 	fax_session session;
+	char restore_digit_detect = 0;
 
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(file_name);
@@ -744,7 +745,31 @@
 	session.chan = chan;
 	session.finished = 0;
 
+	/* get current digit detection mode, then disable digit detection if enabled */
+	{
+		int dummy = sizeof(restore_digit_detect);
+
+		ast_channel_queryoption(chan, AST_OPTION_DIGIT_DETECT, &restore_digit_detect, &dummy, 0);
+	}
+
+	if (restore_digit_detect) {
+		char new_digit_detect = 0;
+
+		ast_channel_setoption(chan, AST_OPTION_DIGIT_DETECT, &new_digit_detect, sizeof(new_digit_detect), 0);
+	}
+
+	/* disable FAX tone detection if enabled */
+	{
+		char new_fax_detect = 0;
+
+		ast_channel_setoption(chan, AST_OPTION_FAX_DETECT, &new_fax_detect, sizeof(new_fax_detect), 0);
+	}
+
 	res = transmit(&session);
+
+	if (restore_digit_detect) {
+		ast_channel_setoption(chan, AST_OPTION_DIGIT_DETECT, &restore_digit_detect, sizeof(restore_digit_detect), 0);
+	}
 
 	return res;
 }
@@ -754,6 +779,7 @@
 	int res = 0;
 	char *parse;
 	fax_session session;
+	char restore_digit_detect = 0;
 
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(file_name);
@@ -788,7 +814,31 @@
 	session.chan = chan;
 	session.finished = 0;
 
+	/* get current digit detection mode, then disable digit detection if enabled */
+	{
+		int dummy = sizeof(restore_digit_detect);
+
+		ast_channel_queryoption(chan, AST_OPTION_DIGIT_DETECT, &restore_digit_detect, &dummy, 0);
+	}
+
+	if (restore_digit_detect) {
+		char new_digit_detect = 0;
+
+		ast_channel_setoption(chan, AST_OPTION_DIGIT_DETECT, &new_digit_detect, sizeof(new_digit_detect), 0);
+	}
+
+	/* disable FAX tone detection if enabled */
+	{
+		char new_fax_detect = 0;
+
+		ast_channel_setoption(chan, AST_OPTION_FAX_DETECT, &new_fax_detect, sizeof(new_fax_detect), 0);
+	}
+
 	res = transmit(&session);
+
+	if (restore_digit_detect) {
+		ast_channel_setoption(chan, AST_OPTION_DIGIT_DETECT, &restore_digit_detect, sizeof(restore_digit_detect), 0);
+	}
 
 	return res;
 }

Modified: team/snuffy/ao2_jabber_take2/apps/app_macro.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_macro.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_macro.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_macro.c Fri Jun 26 07:32:17 2009
@@ -159,7 +159,7 @@
 
 static void macro_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan);
 
-struct ast_datastore_info macro_ds_info = {
+static struct ast_datastore_info macro_ds_info = {
 	.type = "MACRO",
 	.chan_fixup = macro_fixup,
 };

Modified: team/snuffy/ao2_jabber_take2/apps/app_meetme.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_meetme.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_meetme.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_meetme.c Fri Jun 26 07:32:17 2009
@@ -3269,9 +3269,18 @@
 							}
 						}
 						if (conf->transframe[idx]) {
- 							if (conf->transframe[idx]->frametype != AST_FRAME_NULL) {
-	 							if (can_write(chan, confflags) && ast_write(chan, conf->transframe[idx])) {
-									ast_log(LOG_WARNING, "Unable to write frame to channel %s\n", chan->name);
+ 							if ((conf->transframe[idx]->frametype != AST_FRAME_NULL) &&
+							    can_write(chan, confflags)) {
+								struct ast_frame *cur;
+								
+								/* the translator may have returned a list of frames, so
+								   write each one onto the channel
+								*/
+								for (cur = conf->transframe[idx]; cur; cur = AST_LIST_NEXT(cur, frame_list)) {
+									if (ast_write(chan, cur)) {
+										ast_log(LOG_WARNING, "Unable to write frame to channel %s\n", chan->name);
+										break;
+									}
 								}
 							}
 						} else {

Modified: team/snuffy/ao2_jabber_take2/apps/app_minivm.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_minivm.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_minivm.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_minivm.c Fri Jun 26 07:32:17 2009
@@ -548,19 +548,19 @@
 
 
 
-enum {
+enum minivm_option_flags {
 	OPT_SILENT =	   (1 << 0),
 	OPT_BUSY_GREETING =    (1 << 1),
 	OPT_UNAVAIL_GREETING = (1 << 2),
 	OPT_TEMP_GREETING = (1 << 3),
 	OPT_NAME_GREETING = (1 << 4),
 	OPT_RECORDGAIN =  (1 << 5),
-} minivm_option_flags;
-
-enum {
+};
+
+enum minivm_option_args {
 	OPT_ARG_RECORDGAIN = 0,
 	OPT_ARG_ARRAY_SIZE = 1,
-} minivm_option_args;
+};
 
 AST_APP_OPTIONS(minivm_app_options, {
 	AST_APP_OPTION('s', OPT_SILENT),
@@ -670,7 +670,7 @@
 AST_MUTEX_DEFINE_STATIC(minivmlock);	/*!< Lock to protect voicemail system */
 AST_MUTEX_DEFINE_STATIC(minivmloglock);	/*!< Lock to protect voicemail system log file */
 
-FILE *minivmlogfile;			/*!< The minivm log file */
+static FILE *minivmlogfile;		/*!< The minivm log file */
 
 static int global_vmminmessage;		/*!< Minimum duration of messages */
 static int global_vmmaxmessage;		/*!< Maximum duration of message */

Modified: team/snuffy/ao2_jabber_take2/apps/app_mixmonitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_mixmonitor.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_mixmonitor.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_mixmonitor.c Fri Jun 26 07:32:17 2009
@@ -50,7 +50,8 @@
 /*** DOCUMENTATION
 	<application name="MixMonitor" language="en_US">
 		<synopsis>
-			Record a call and mix the audio during the recording.
+			Record a call and mix the audio during the recording.  Use of StopMixMonitor is required
+			to guarantee the audio file is available for processing during dialplan execution.
 		</synopsis>
 		<syntax>
 			<parameter name="file" required="true" argsep=".">
@@ -112,7 +113,7 @@
 	</application>
 	<application name="StopMixMonitor" language="en_US">
 		<synopsis>
-			Stop recording a call through MixMonitor.
+			Stop recording a call through MixMonitor, and free the recording's file handle.
 		</synopsis>
 		<syntax />
 		<description>
@@ -132,8 +133,6 @@
 
 static const char * const stop_app = "StopMixMonitor";
 
-struct module_symbols *me;
-
 static const char * const mixmonitor_spy_type = "MixMonitor";
 
 struct mixmonitor {
@@ -143,22 +142,23 @@
 	char *name;
 	unsigned int flags;
 	struct ast_autochan *autochan;
+	struct mixmonitor_ds *mixmonitor_ds;
 };
 
-enum {
+enum mixmonitor_flags {
 	MUXFLAG_APPEND = (1 << 1),
 	MUXFLAG_BRIDGED = (1 << 2),
 	MUXFLAG_VOLUME = (1 << 3),
 	MUXFLAG_READVOLUME = (1 << 4),
 	MUXFLAG_WRITEVOLUME = (1 << 5),
-} mixmonitor_flags;
-
-enum {
+};
+
+enum mixmonitor_args {
 	OPT_ARG_READVOLUME = 0,
 	OPT_ARG_WRITEVOLUME,
 	OPT_ARG_VOLUME,
 	OPT_ARG_ARRAY_SIZE,
-} mixmonitor_args;
+};
 
 AST_APP_OPTIONS(mixmonitor_opts, {
 	AST_APP_OPTION('a', MUXFLAG_APPEND),
@@ -168,6 +168,45 @@
 	AST_APP_OPTION_ARG('W', MUXFLAG_VOLUME, OPT_ARG_VOLUME),
 });
 
+struct mixmonitor_ds {
+	unsigned int destruction_ok;
+	ast_cond_t destruction_condition;
+	ast_mutex_t lock;
+
+	/* The filestream is held in the datastore so it can be stopped
+	 * immediately during stop_mixmonitor or channel destruction. */
+	int fs_quit;
+	struct ast_filestream *fs;
+
+};
+
+static void mixmonitor_ds_close_fs(struct mixmonitor_ds *mixmonitor_ds)
+{
+	ast_mutex_lock(&mixmonitor_ds->lock);
+	if (mixmonitor_ds->fs) {
+		ast_closestream(mixmonitor_ds->fs);
+		mixmonitor_ds->fs = NULL;
+		mixmonitor_ds->fs_quit = 1;
+		ast_verb(2, "MixMonitor close filestream\n");
+	}
+	ast_mutex_unlock(&mixmonitor_ds->lock);
+}
+
+static void mixmonitor_ds_destroy(void *data)
+{
+	struct mixmonitor_ds *mixmonitor_ds = data;
+
+	ast_mutex_lock(&mixmonitor_ds->lock);
+	mixmonitor_ds->destruction_ok = 1;
+	ast_cond_signal(&mixmonitor_ds->destruction_condition);
+	ast_mutex_unlock(&mixmonitor_ds->lock);
+}
+
+static struct ast_datastore_info mixmonitor_ds_info = {
+	.type = "mixmonitor",
+	.destroy = mixmonitor_ds_destroy,
+};
+
 static int startmon(struct ast_channel *chan, struct ast_audiohook *audiohook) 
 {
 	struct ast_channel *peer = NULL;
@@ -186,19 +225,32 @@
 
 #define SAMPLES_PER_FRAME 160
 
+static void mixmonitor_free(struct mixmonitor *mixmonitor)
+{
+	if (mixmonitor) {
+		if (mixmonitor->mixmonitor_ds) {
+			ast_mutex_destroy(&mixmonitor->mixmonitor_ds->lock);
+			ast_cond_destroy(&mixmonitor->mixmonitor_ds->destruction_condition);
+			ast_free(mixmonitor->mixmonitor_ds);
+		}
+		ast_free(mixmonitor);
+	}
+}
 static void *mixmonitor_thread(void *obj) 
 {
 	struct mixmonitor *mixmonitor = obj;
-	struct ast_filestream *fs = NULL;
+	struct ast_filestream **fs = NULL;
 	unsigned int oflags;
 	char *ext;
 	int errflag = 0;
 
 	ast_verb(2, "Begin MixMonitor Recording %s\n", mixmonitor->name);
-	
+
 	ast_audiohook_lock(&mixmonitor->audiohook);
 
-	while (mixmonitor->audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING) {
+	fs = &mixmonitor->mixmonitor_ds->fs;
+
+	while (mixmonitor->audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING && !mixmonitor->mixmonitor_ds->fs_quit) {
 		struct ast_frame *fr = NULL;
 
 		ast_audiohook_trigger_wait(&mixmonitor->audiohook);
@@ -210,25 +262,32 @@
 			continue;
 
 		if (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) || (mixmonitor->autochan->chan && ast_bridged_channel(mixmonitor->autochan->chan))) {
+			ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
 			/* Initialize the file if not already done so */
-			if (!fs && !errflag) {
+			if (!*fs && !errflag && !mixmonitor->mixmonitor_ds->fs_quit) {
 				oflags = O_CREAT | O_WRONLY;
 				oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
-				
+
 				if ((ext = strrchr(mixmonitor->filename, '.')))
 					*(ext++) = '\0';
 				else
 					ext = "raw";
-				
-				if (!(fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0666))) {
+
+				if (!(*fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0666))) {
 					ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
 					errflag = 1;
 				}
 			}
-			
-			/* Write out frame */
-			if (fs)
-				ast_writestream(fs, fr);
+
+			/* Write out the frame(s) */
+			if (*fs) {
+				struct ast_frame *cur;
+
+				for (cur = fr; cur; cur = AST_LIST_NEXT(cur, frame_list)) {
+					ast_writestream(*fs, cur);
+				}
+			}
+			ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock);
 		}
 		/* All done! free it. */
 		ast_frame_free(fr, 0);
@@ -239,10 +298,8 @@
 	ast_audiohook_unlock(&mixmonitor->audiohook);
 	ast_audiohook_destroy(&mixmonitor->audiohook);
 
-	ast_verb(2, "End MixMonitor Recording %s\n", mixmonitor->name);
-
-	if (fs)
-		ast_closestream(fs);
+	mixmonitor_ds_close_fs(mixmonitor->mixmonitor_ds);
+
 
 	if (mixmonitor->post_process) {
 		ast_verb(2, "Executing [%s]\n", mixmonitor->post_process);
@@ -250,9 +307,46 @@
 	}
 
 	ast_autochan_destroy(mixmonitor->autochan);
-	ast_free(mixmonitor);
-
+
+	ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
+	if (!mixmonitor->mixmonitor_ds->destruction_ok) {
+		ast_cond_wait(&mixmonitor->mixmonitor_ds->destruction_condition, &mixmonitor->mixmonitor_ds->lock);
+	}
+	ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock);
+
+
+	ast_verb(2, "End MixMonitor Recording %s\n", mixmonitor->name);
+	mixmonitor_free(mixmonitor);
 	return NULL;
+}
+
+static int setup_mixmonitor_ds(struct mixmonitor *mixmonitor, struct ast_channel *chan)
+{
+	struct ast_datastore *datastore = NULL;
+	struct mixmonitor_ds *mixmonitor_ds;
+
+	if (!(mixmonitor_ds = ast_calloc(1, sizeof(*mixmonitor_ds)))) {
+		return -1;
+	}
+
+	ast_mutex_init(&mixmonitor_ds->lock);
+	ast_cond_init(&mixmonitor_ds->destruction_condition, NULL);
+
+	if (!(datastore = ast_datastore_alloc(&mixmonitor_ds_info, NULL))) {
+		ast_mutex_destroy(&mixmonitor_ds->lock);
+		ast_cond_destroy(&mixmonitor_ds->destruction_condition);
+		ast_free(mixmonitor_ds);
+		return -1;
+	}
+
+	datastore->data = mixmonitor_ds;
+
+	ast_channel_lock(chan);
+	ast_channel_datastore_add(chan, datastore);
+	ast_channel_unlock(chan);
+
+	mixmonitor->mixmonitor_ds = mixmonitor_ds;
+	return 0;
 }
 
 static void launch_monitor_thread(struct ast_channel *chan, const char *filename, unsigned int flags,
@@ -289,6 +383,13 @@
 	/* Copy over flags and channel name */
 	mixmonitor->flags = flags;
 	if (!(mixmonitor->autochan = ast_autochan_setup(chan))) {
+		mixmonitor_free(mixmonitor);
+		return;
+	}
+
+	if (setup_mixmonitor_ds(mixmonitor, chan)) {
+		ast_autochan_destroy(mixmonitor->autochan);
+		mixmonitor_free(mixmonitor);
 		return;
 	}
 	mixmonitor->name = (char *) mixmonitor + sizeof(*mixmonitor);
@@ -408,6 +509,14 @@
 
 static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
 {
+	struct ast_datastore *datastore = NULL;
+
+	/* closing the filestream here guarantees the file is avaliable to the dialplan
+	 * after calling StopMixMonitor */
+	if ((datastore = ast_channel_datastore_find(chan, &mixmonitor_ds_info, NULL))) {
+		mixmonitor_ds_close_fs(datastore->data);
+	}
+
 	ast_audiohook_detach_source(chan, mixmonitor_spy_type);
 	return 0;
 }

Modified: team/snuffy/ao2_jabber_take2/apps/app_page.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_page.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_page.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_page.c Fri Jun 26 07:32:17 2009
@@ -101,13 +101,13 @@
  ***/
 static const char * const app_page= "Page";
 
-enum {
+enum page_opt_flags {
 	PAGE_DUPLEX = (1 << 0),
 	PAGE_QUIET = (1 << 1),
 	PAGE_RECORD = (1 << 2),
 	PAGE_SKIP = (1 << 3),
 	PAGE_IGNORE_FORWARDS = (1 << 4),
-} page_opt_flags;
+};
 
 AST_APP_OPTIONS(page_opts, {
 	AST_APP_OPTION('d', PAGE_DUPLEX),

Modified: team/snuffy/ao2_jabber_take2/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_queue.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_queue.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_queue.c Fri Jun 26 07:32:17 2009
@@ -977,7 +977,7 @@
 	AST_LIST_ENTRY(rule_list) list;
 };
 
-AST_LIST_HEAD_STATIC(rule_lists, rule_list);
+static AST_LIST_HEAD_STATIC(rule_lists, rule_list);
 
 static struct ao2_container *queues;
 

Modified: team/snuffy/ao2_jabber_take2/apps/app_read.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_read.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_read.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_read.c Fri Jun 26 07:32:17 2009
@@ -108,11 +108,11 @@
 	</application>
  ***/
 
-enum {
+enum read_option_flags {
 	OPT_SKIP = (1 << 0),
 	OPT_INDICATION = (1 << 1),
 	OPT_NOANSWER = (1 << 2),
-} read_option_flags;
+};
 
 AST_APP_OPTIONS(read_app_options, {
 	AST_APP_OPTION('s', OPT_SKIP),

Modified: team/snuffy/ao2_jabber_take2/apps/app_readexten.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_readexten.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_readexten.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_readexten.c Fri Jun 26 07:32:17 2009
@@ -111,11 +111,11 @@
 	</function>
  ***/
 
-enum {
+enum readexten_option_flags {
 	OPT_SKIP = (1 << 0),
 	OPT_INDICATION = (1 << 1),
 	OPT_NOANSWER = (1 << 2),
-} readexten_option_flags;
+};
 
 AST_APP_OPTIONS(readexten_app_options, {
 	AST_APP_OPTION('s', OPT_SKIP),

Modified: team/snuffy/ao2_jabber_take2/apps/app_rpt.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_rpt.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_rpt.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_rpt.c Fri Jun 26 07:32:17 2009
@@ -3937,7 +3937,7 @@
 struct	rpt *myrpt;
 struct	rpt_link *l,*l1,linkbase;
 struct	ast_channel *mychannel;
-int id_malloc, vmajor, vminor, m;
+int vmajor, vminor, m;
 char *p,*ct,*ct_copy,*ident, *nodename,*cp;
 time_t t;
 #ifdef	NEW_ASTERISK
@@ -3984,14 +3984,10 @@
                 	ast_free(mytele);
                 	pthread_exit(NULL);
         	}
-		else{
-			id_malloc = 1;
-		}
 	}
 	else
 	{
 		ident = "";
-		id_malloc = 0;
 	}
 	rpt_mutex_unlock(&myrpt->lock);
 		
@@ -4007,8 +4003,7 @@
 		ast_log(LOG_NOTICE,"Telemetry thread aborted at line %d, mode: %d\n",__LINE__, mytele->mode); /*@@@@@@@@@@@*/
 		rpt_mutex_unlock(&myrpt->lock);
 		ast_free(nodename);
-		if(id_malloc)
-			ast_free(ident);
+		ast_free(ident);
 		ast_free(mytele);		
 		pthread_exit(NULL);
 	}
@@ -4054,8 +4049,7 @@
 		rpt_mutex_unlock(&myrpt->lock);
 		ast_log(LOG_NOTICE,"Telemetry thread aborted at line %d, mode: %d\n",__LINE__, mytele->mode); /*@@@@@@@@@@@*/
 		ast_free(nodename);
-		if(id_malloc)
-			ast_free(ident);
+		ast_free(ident);
 		ast_free(mytele);		
 		ast_hangup(mychannel);
 		pthread_exit(NULL);
@@ -4249,8 +4243,7 @@
 				rpt_mutex_unlock(&myrpt->lock);
 				ast_log(LOG_NOTICE,"Telemetry thread aborted at line %d, mode: %d\n",__LINE__, mytele->mode); /*@@@@@@@@@@@*/
 				ast_free(nodename);
-				if(id_malloc)
-					ast_free(ident);
+				ast_free(ident);
 				ast_free(mytele);		
 				ast_hangup(mychannel);
 				pthread_exit(NULL);
@@ -4290,8 +4283,7 @@
 				rpt_mutex_unlock(&myrpt->lock);
 				ast_log(LOG_NOTICE,"Telemetry thread aborted at line %d, mode: %d\n",__LINE__, mytele->mode); /*@@@@@@@@@@@*/
 				ast_free(nodename);
-				if(id_malloc)
-					ast_free(ident);
+				ast_free(ident);
 				ast_free(mytele);		
 				ast_hangup(mychannel);
 				pthread_exit(NULL);
@@ -4813,8 +4805,7 @@
 				rpt_mutex_unlock(&myrpt->lock);
 				ast_log(LOG_NOTICE,"Telemetry thread aborted at line %d, mode: %d\n",__LINE__, mytele->mode); /*@@@@@@@@@@@*/
 				ast_free(nodename);
-				if(id_malloc)
-					ast_free(ident);
+				ast_free(ident);
 				ast_free(mytele);		
 				ast_hangup(mychannel);
 				pthread_exit(NULL);
@@ -5190,8 +5181,7 @@
 	myrpt->active_telem = NULL;
 	rpt_mutex_unlock(&myrpt->lock);
 	ast_free(nodename);
-	if(id_malloc)
-		ast_free(ident);
+	ast_free(ident);
 	ast_free(mytele);		
 	ast_hangup(mychannel);
 #ifdef  APP_RPT_LOCK_DEBUG

Modified: team/snuffy/ao2_jabber_take2/apps/app_skel.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_skel.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_skel.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_skel.c Fri Jun 26 07:32:17 2009
@@ -74,18 +74,18 @@
 
 static char *app = "Skel";
 
-enum {
+enum option_flags {
 	OPTION_A = (1 << 0),
 	OPTION_B = (1 << 1),
 	OPTION_C = (1 << 2),
-} option_flags;
+};
 
-enum {
+enum option_args {
 	OPTION_ARG_B = 0,
 	OPTION_ARG_C = 1,
 	/* This *must* be the last value in this enum! */
 	OPTION_ARG_ARRAY_SIZE = 2,
-} option_args;
+};
 
 AST_APP_OPTIONS(app_opts,{
 	AST_APP_OPTION('a', OPTION_A),

Modified: team/snuffy/ao2_jabber_take2/apps/app_sms.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_sms.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_sms.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_sms.c Fri Jun 26 07:32:17 2009
@@ -1832,19 +1832,19 @@
  *	- AST_APP_OPTIONS() to drive the parsing routine
  *	- in the function, AST_DECLARE_APP_ARGS(...) for the arguments.
  */
-enum {
+enum sms_flags {
 	OPTION_BE_SMSC	= (1 << 0),             /* act as sms center */
 	OPTION_ANSWER	= (1 << 1),             /* answer on incoming calls */
 	OPTION_TWO	= (1 << 2),                 /* Use Protocol Two */
 	OPTION_PAUSE	= (1 << 3),             /* pause before sending data, in ms */
 	OPTION_SRR	= (1 << 4),                 /* set srr */
 	OPTION_DCS	= (1 << 5),                 /* set dcs */
-} sms_flags;
-
-enum {
+};
+
+enum sms_opt_args {
 	OPTION_ARG_PAUSE = 0,
 	OPTION_ARG_ARRAY_SIZE
-} sms_opt_args;
+};
 
 AST_APP_OPTIONS(sms_options, {
 	AST_APP_OPTION('s', OPTION_BE_SMSC),

Modified: team/snuffy/ao2_jabber_take2/apps/app_url.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_url.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_url.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_url.c Fri Jun 26 07:32:17 2009
@@ -82,9 +82,9 @@
 
 static char *app = "SendURL";
 
-enum {
+enum option_flags {
 	OPTION_WAIT = (1 << 0),
-} option_flags;
+};
 
 AST_APP_OPTIONS(app_opts,{
 	AST_APP_OPTION('w', OPTION_WAIT),

Modified: team/snuffy/ao2_jabber_take2/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/apps/app_voicemail.c?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/apps/app_voicemail.c (original)
+++ team/snuffy/ao2_jabber_take2/apps/app_voicemail.c Fri Jun 26 07:32:17 2009
@@ -46,15 +46,22 @@
 
 /*** MAKEOPTS
 <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o apps/app_voicemail.so apps/app_directory.o apps/app_directory.so">
+	<member name="FILE_STORAGE" displayname="Storage of Voicemail using filesystem">
+		<conflict>ODBC_STORAGE</conflict>
+		<conflict>IMAP_STORAGE</conflict>
+		<defaultenabled>yes</defaultenabled>
+	</member>
 	<member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
 		<depend>generic_odbc</depend>
 		<depend>ltdl</depend>
 		<conflict>IMAP_STORAGE</conflict>
+		<conflict>FILE_STORAGE</conflict>
 		<defaultenabled>no</defaultenabled>
 	</member>
 	<member name="IMAP_STORAGE" displayname="Storage of Voicemail using IMAP4">
 		<depend>imap_tk</depend>
 		<conflict>ODBC_STORAGE</conflict>
+		<conflict>FILE_STORAGE</conflict>
 		<use>openssl</use>
 		<defaultenabled>no</defaultenabled>
 	</member>
@@ -425,16 +432,16 @@
 #define ERROR_LOCK_PATH  -100
 
 
-enum {
+enum vm_box {
 	NEW_FOLDER,
 	OLD_FOLDER,
 	WORK_FOLDER,
 	FAMILY_FOLDER,
 	FRIENDS_FOLDER,
 	GREETINGS_FOLDER
-} vm_box;
-
-enum {
+};
+
+enum vm_option_flags {
 	OPT_SILENT =           (1 << 0),
 	OPT_BUSY_GREETING =    (1 << 1),
 	OPT_UNAVAIL_GREETING = (1 << 2),
@@ -444,15 +451,15 @@
 	OPT_DTMFEXIT =         (1 << 7),
 	OPT_MESSAGE_Urgent =   (1 << 8),
 	OPT_MESSAGE_PRIORITY = (1 << 9)
-} vm_option_flags;
-
-enum {
+};
+
+enum vm_option_args {
 	OPT_ARG_RECORDGAIN = 0,
 	OPT_ARG_PLAYFOLDER = 1,
 	OPT_ARG_DTMFEXIT   = 2,
 	/* This *must* be the last value in this enum! */
 	OPT_ARG_ARRAY_SIZE = 3,
-} vm_option_args;
+};
 
 AST_APP_OPTIONS(vm_app_options, {
 	AST_APP_OPTION('s', OPT_SILENT),
@@ -3342,7 +3349,8 @@
 	char *c;
 	struct ast_config *cfg=NULL;
 	struct odbc_obj *obj;
-	struct insert_data idata = { .sql = sql, .msgnums = msgnums, .dir = dir, .mailboxuser = mailboxuser, .mailboxcontext = mailboxcontext };
+	struct insert_data idata = { .sql = sql, .msgnums = msgnums, .dir = dir, .mailboxuser = mailboxuser, .mailboxcontext = mailboxcontext,
+		.context = "", .macrocontext = "", .callerid = "", .origtime = "", .duration = "", .category = "", .flag = "" };
 	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
 
 	delete_file(dir, msgnum);

Modified: team/snuffy/ao2_jabber_take2/autoconf/ast_gcc_attribute.m4
URL: http://svn.asterisk.org/svn-view/asterisk/team/snuffy/ao2_jabber_take2/autoconf/ast_gcc_attribute.m4?view=diff&rev=203602&r1=203601&r2=203602
==============================================================================
--- team/snuffy/ao2_jabber_take2/autoconf/ast_gcc_attribute.m4 (original)
+++ team/snuffy/ao2_jabber_take2/autoconf/ast_gcc_attribute.m4 Fri Jun 26 07:32:17 2009
@@ -1,16 +1,16 @@
 # Helper function to check for gcc attributes.
-# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax])
+# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax], [attribute scope])
 
 AC_DEFUN([AST_GCC_ATTRIBUTE],
 [
 AC_MSG_CHECKING(for compiler 'attribute $1' support)
 saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
+CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
 
 if test "x$2" = "x"
 then
 AC_COMPILE_IFELSE(
-	AC_LANG_PROGRAM([void __attribute__(($1)) *test(void *muffin, ...) {}],
+	AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
 			[]),
 	AC_MSG_RESULT(yes)

[... 5943 lines stripped ...]



More information about the svn-commits mailing list