[asterisk-commits] oej: branch oej/pine-multiple-externip-1.8 r375482 - in /team/oej/pine-multip...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 30 11:44:59 CDT 2012


Author: oej
Date: Tue Oct 30 11:44:25 2012
New Revision: 375482

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375482
Log:
Updating to current svn stuff

Added:
    team/oej/pine-multiple-externip-1.8/doc/CODING-GUIDELINES
      - copied unchanged from r375450, branches/1.8/doc/CODING-GUIDELINES
Modified:
    team/oej/pine-multiple-externip-1.8/   (props changed)
    team/oej/pine-multiple-externip-1.8/CHANGES
    team/oej/pine-multiple-externip-1.8/Makefile
    team/oej/pine-multiple-externip-1.8/README-SERIOUSLY.bestpractices.txt
    team/oej/pine-multiple-externip-1.8/UPGRADE.txt
    team/oej/pine-multiple-externip-1.8/addons/app_mysql.c
    team/oej/pine-multiple-externip-1.8/addons/chan_mobile.c
    team/oej/pine-multiple-externip-1.8/addons/chan_ooh323.c
    team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooGkClient.c
    team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooh323ep.c
    team/oej/pine-multiple-externip-1.8/addons/res_config_mysql.c
    team/oej/pine-multiple-externip-1.8/apps/app_chanspy.c
    team/oej/pine-multiple-externip-1.8/apps/app_dial.c
    team/oej/pine-multiple-externip-1.8/apps/app_dictate.c
    team/oej/pine-multiple-externip-1.8/apps/app_directed_pickup.c
    team/oej/pine-multiple-externip-1.8/apps/app_festival.c
    team/oej/pine-multiple-externip-1.8/apps/app_followme.c
    team/oej/pine-multiple-externip-1.8/apps/app_getcpeid.c
    team/oej/pine-multiple-externip-1.8/apps/app_macro.c
    team/oej/pine-multiple-externip-1.8/apps/app_meetme.c
    team/oej/pine-multiple-externip-1.8/apps/app_minivm.c
    team/oej/pine-multiple-externip-1.8/apps/app_mixmonitor.c
    team/oej/pine-multiple-externip-1.8/apps/app_osplookup.c
    team/oej/pine-multiple-externip-1.8/apps/app_queue.c
    team/oej/pine-multiple-externip-1.8/apps/app_senddtmf.c
    team/oej/pine-multiple-externip-1.8/apps/app_sms.c
    team/oej/pine-multiple-externip-1.8/apps/app_stack.c
    team/oej/pine-multiple-externip-1.8/apps/app_voicemail.c
    team/oej/pine-multiple-externip-1.8/apps/app_while.c
    team/oej/pine-multiple-externip-1.8/build_tools/make_version
    team/oej/pine-multiple-externip-1.8/cdr/cdr_pgsql.c
    team/oej/pine-multiple-externip-1.8/cdr/cdr_tds.c
    team/oej/pine-multiple-externip-1.8/cel/cel_pgsql.c
    team/oej/pine-multiple-externip-1.8/channels/chan_agent.c
    team/oej/pine-multiple-externip-1.8/channels/chan_alsa.c
    team/oej/pine-multiple-externip-1.8/channels/chan_dahdi.c
    team/oej/pine-multiple-externip-1.8/channels/chan_gtalk.c
    team/oej/pine-multiple-externip-1.8/channels/chan_iax2.c
    team/oej/pine-multiple-externip-1.8/channels/chan_jingle.c
    team/oej/pine-multiple-externip-1.8/channels/chan_local.c
    team/oej/pine-multiple-externip-1.8/channels/chan_misdn.c
    team/oej/pine-multiple-externip-1.8/channels/chan_oss.c
    team/oej/pine-multiple-externip-1.8/channels/chan_sip.c
    team/oej/pine-multiple-externip-1.8/channels/iax2-provision.c
    team/oej/pine-multiple-externip-1.8/channels/misdn/isdn_lib.c
    team/oej/pine-multiple-externip-1.8/channels/misdn/isdn_lib.h
    team/oej/pine-multiple-externip-1.8/channels/misdn/isdn_msg_parser.c
    team/oej/pine-multiple-externip-1.8/channels/sig_analog.c
    team/oej/pine-multiple-externip-1.8/channels/sig_analog.h
    team/oej/pine-multiple-externip-1.8/channels/sig_pri.c
    team/oej/pine-multiple-externip-1.8/channels/sig_ss7.c
    team/oej/pine-multiple-externip-1.8/channels/sip/config_parser.c
    team/oej/pine-multiple-externip-1.8/channels/sip/include/sip.h
    team/oej/pine-multiple-externip-1.8/channels/sip/sdp_crypto.c
    team/oej/pine-multiple-externip-1.8/codecs/Makefile
    team/oej/pine-multiple-externip-1.8/codecs/gsm/src/code.c
    team/oej/pine-multiple-externip-1.8/codecs/ilbc/iLBC_decode.c
    team/oej/pine-multiple-externip-1.8/codecs/ilbc/iLBC_encode.c
    team/oej/pine-multiple-externip-1.8/config.guess
    team/oej/pine-multiple-externip-1.8/config.sub
    team/oej/pine-multiple-externip-1.8/configs/agents.conf.sample
    team/oej/pine-multiple-externip-1.8/configs/chan_dahdi.conf.sample
    team/oej/pine-multiple-externip-1.8/configs/dsp.conf.sample
    team/oej/pine-multiple-externip-1.8/configs/queues.conf.sample
    team/oej/pine-multiple-externip-1.8/configs/res_ldap.conf.sample
    team/oej/pine-multiple-externip-1.8/configs/res_odbc.conf.sample
    team/oej/pine-multiple-externip-1.8/configs/sip.conf.sample
    team/oej/pine-multiple-externip-1.8/configure
    team/oej/pine-multiple-externip-1.8/configure.ac
    team/oej/pine-multiple-externip-1.8/contrib/scripts/ast_tls_cert
    team/oej/pine-multiple-externip-1.8/contrib/scripts/autosupport
    team/oej/pine-multiple-externip-1.8/funcs/func_audiohookinherit.c
    team/oej/pine-multiple-externip-1.8/funcs/func_channel.c
    team/oej/pine-multiple-externip-1.8/funcs/func_curl.c
    team/oej/pine-multiple-externip-1.8/funcs/func_cut.c
    team/oej/pine-multiple-externip-1.8/funcs/func_global.c
    team/oej/pine-multiple-externip-1.8/funcs/func_lock.c
    team/oej/pine-multiple-externip-1.8/funcs/func_logic.c
    team/oej/pine-multiple-externip-1.8/funcs/func_math.c
    team/oej/pine-multiple-externip-1.8/funcs/func_odbc.c
    team/oej/pine-multiple-externip-1.8/funcs/func_realtime.c
    team/oej/pine-multiple-externip-1.8/funcs/func_shell.c
    team/oej/pine-multiple-externip-1.8/funcs/func_strings.c
    team/oej/pine-multiple-externip-1.8/include/asterisk/astdb.h
    team/oej/pine-multiple-externip-1.8/include/asterisk/astobj2.h
    team/oej/pine-multiple-externip-1.8/include/asterisk/autoconfig.h.in
    team/oej/pine-multiple-externip-1.8/include/asterisk/channel.h
    team/oej/pine-multiple-externip-1.8/include/asterisk/strings.h
    team/oej/pine-multiple-externip-1.8/include/asterisk/tcptls.h
    team/oej/pine-multiple-externip-1.8/include/asterisk/utils.h
    team/oej/pine-multiple-externip-1.8/main/Makefile
    team/oej/pine-multiple-externip-1.8/main/app.c
    team/oej/pine-multiple-externip-1.8/main/asterisk.c
    team/oej/pine-multiple-externip-1.8/main/astmm.c
    team/oej/pine-multiple-externip-1.8/main/astobj2.c
    team/oej/pine-multiple-externip-1.8/main/callerid.c
    team/oej/pine-multiple-externip-1.8/main/ccss.c
    team/oej/pine-multiple-externip-1.8/main/cdr.c
    team/oej/pine-multiple-externip-1.8/main/cel.c
    team/oej/pine-multiple-externip-1.8/main/channel.c
    team/oej/pine-multiple-externip-1.8/main/config.c
    team/oej/pine-multiple-externip-1.8/main/data.c
    team/oej/pine-multiple-externip-1.8/main/db.c
    team/oej/pine-multiple-externip-1.8/main/dsp.c
    team/oej/pine-multiple-externip-1.8/main/event.c
    team/oej/pine-multiple-externip-1.8/main/features.c
    team/oej/pine-multiple-externip-1.8/main/file.c
    team/oej/pine-multiple-externip-1.8/main/frame.c
    team/oej/pine-multiple-externip-1.8/main/http.c
    team/oej/pine-multiple-externip-1.8/main/indications.c
    team/oej/pine-multiple-externip-1.8/main/loader.c
    team/oej/pine-multiple-externip-1.8/main/lock.c
    team/oej/pine-multiple-externip-1.8/main/logger.c
    team/oej/pine-multiple-externip-1.8/main/manager.c
    team/oej/pine-multiple-externip-1.8/main/pbx.c
    team/oej/pine-multiple-externip-1.8/main/say.c
    team/oej/pine-multiple-externip-1.8/main/ssl.c
    team/oej/pine-multiple-externip-1.8/main/strcompat.c
    team/oej/pine-multiple-externip-1.8/main/taskprocessor.c
    team/oej/pine-multiple-externip-1.8/main/tcptls.c
    team/oej/pine-multiple-externip-1.8/main/threadstorage.c
    team/oej/pine-multiple-externip-1.8/main/udptl.c
    team/oej/pine-multiple-externip-1.8/main/utils.c
    team/oej/pine-multiple-externip-1.8/main/xmldoc.c
    team/oej/pine-multiple-externip-1.8/makeopts.in
    team/oej/pine-multiple-externip-1.8/pbx/pbx_ael.c
    team/oej/pine-multiple-externip-1.8/pbx/pbx_config.c
    team/oej/pine-multiple-externip-1.8/pbx/pbx_dundi.c
    team/oej/pine-multiple-externip-1.8/pbx/pbx_lua.c
    team/oej/pine-multiple-externip-1.8/pbx/pbx_realtime.c
    team/oej/pine-multiple-externip-1.8/pbx/pbx_spool.c
    team/oej/pine-multiple-externip-1.8/res/ael/pval.c
    team/oej/pine-multiple-externip-1.8/res/res_agi.c
    team/oej/pine-multiple-externip-1.8/res/res_config_pgsql.c
    team/oej/pine-multiple-externip-1.8/res/res_config_sqlite.c
    team/oej/pine-multiple-externip-1.8/res/res_jabber.c
    team/oej/pine-multiple-externip-1.8/res/res_musiconhold.c
    team/oej/pine-multiple-externip-1.8/res/res_odbc.c
    team/oej/pine-multiple-externip-1.8/res/res_rtp_asterisk.c
    team/oej/pine-multiple-externip-1.8/res/res_rtp_multicast.c
    team/oej/pine-multiple-externip-1.8/tests/test_db.c
    team/oej/pine-multiple-externip-1.8/tests/test_linkedlists.c

Propchange: team/oej/pine-multiple-externip-1.8/
------------------------------------------------------------------------------
    automerge = Is-there-life-off-net?

Propchange: team/oej/pine-multiple-externip-1.8/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Oct 30 11:44:25 2012
@@ -1,1 +1,1 @@
-/branches/1.8:1-369915
+/branches/1.8:1-375470

Modified: team/oej/pine-multiple-externip-1.8/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/CHANGES?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/CHANGES (original)
+++ team/oej/pine-multiple-externip-1.8/CHANGES Tue Oct 30 11:44:25 2012
@@ -7,6 +7,18 @@
 === and the other UPGRADE files for older releases.
 ===
 ======================================================================
+
+------------------------------------------------------------------------------
+--- Functionality changes since Asterisk 1.8.12.0 ----------------------------
+------------------------------------------------------------------------------
+
+Build System
+------------
+ * The optimization portion of the build system has been reworked to avoid
+   broken builds on certain architectures.  All architecture-specific
+   optimization has been removed in favor of using -march=native to allow gcc
+   to detect the environment in which it is running when possible.  This can
+   be toggled as BUILD_NATIVE under "Compiler Flags" in menuselect.
 
 ------------------------------------------------------------------------------
 --- Functionality changes since Asterisk 1.8.10.0 ----------------------------
@@ -621,6 +633,9 @@
    rate changes during translation are now avoided unless absolutely necessary.
  * The addition of the res_stun_monitor module for monitoring and reacting to network
    changes while behind a NAT.
+ * DTMF: Normal and Reverse Twist acceptance values can be set in dsp.conf.
+   DTMF Valid/Invalid number of hits/misses can be set in dsp.conf.
+   These allow support for any Administration. Default is AT&T values.
 
 CLI Changes
 -----------

Modified: team/oej/pine-multiple-externip-1.8/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/Makefile?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/Makefile (original)
+++ team/oej/pine-multiple-externip-1.8/Makefile Tue Oct 30 11:44:25 2012
@@ -204,7 +204,7 @@
   _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
 endif
 
-ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
+ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) GIT=$(GIT) build_tools/make_version .)
 
 ifneq ($(wildcard .version),)
   ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)

Modified: team/oej/pine-multiple-externip-1.8/README-SERIOUSLY.bestpractices.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/README-SERIOUSLY.bestpractices.txt?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/README-SERIOUSLY.bestpractices.txt (original)
+++ team/oej/pine-multiple-externip-1.8/README-SERIOUSLY.bestpractices.txt Tue Oct 30 11:44:25 2012
@@ -22,6 +22,9 @@
 
 * Reducing Pattern Match Typos: 
         Using the 'same' prefix, or using Goto()
+
+* Manager Class Authorizations:
+        Recognizing potential issues with certain classes of authorization
 
 ----------------
 Additional Links
@@ -293,3 +296,51 @@
 exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
 same => n,Playback(silence/1&num-not-in-db)
 same => n,Hangup()
+
+
+============================
+Manager Class Authorizations
+============================
+
+Manager accounts have associated class authorizations that define what actions
+and events that account can execute/receive.  In order to run Asterisk commands
+or dialplan applications that affect the system Asterisk executes on, the
+"system" class authorization should be set on the account.
+
+However, Manager commands that originate new calls into the Asterisk dialplan
+have the potential to alter or affect the system as well, even though the
+class authorization for origination commands is "originate".  Take, for example,
+the Originate manager command:
+
+Action: Originate
+Channel: SIP/foo
+Exten: s
+Context: default
+Priority: 1
+Application: System
+Data: echo hello world!
+
+This manager command will attempt to execute an Asterisk application, System,
+which is normally associated with the "system" class authorication.  While some
+checks have been put into Asterisk to take this into account, certain dialplan
+configurations and/or clever manipulation of the Originate manager action can
+circumvent these checks.  For example, take the following dialplan:
+
+exten => s,1,Verbose(Incoming call)
+same => n,MixMonitor(foo.wav,,${EXEC_COMMAND})
+same => n,Dial(SIP/bar)
+same => n,Hangup()
+
+Whatever has been defined in the variable EXEC_COMMAND will be executed after
+MixMonitor has finished recording the call.  The dialplan writer may have
+intended that this variable to be set by some other location in the dialplan;
+however, the Manager action Originate allows for channel variables to be set by
+the account initiating the new call.  This could allow the Originate action to
+execute some command on the system by setting the EXEC_COMMAND dialplan variable
+in the Variable: header.
+
+In general, you should treat the Manager class authorization "originate" the
+same as the class authorization "system".  Good system configuration, such as
+not running Asterisk as root, can prevent serious problems from arising when
+allowing external connections to originate calls into Asterisk.
+

Modified: team/oej/pine-multiple-externip-1.8/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/UPGRADE.txt?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/UPGRADE.txt (original)
+++ team/oej/pine-multiple-externip-1.8/UPGRADE.txt Tue Oct 30 11:44:25 2012
@@ -17,6 +17,20 @@
 === UPGRADE-1.6.txt -- Upgrade info for 1.4 to 1.6
 ===
 ===========================================================
+from 1.8.18 to 1.8.19:
+* Queue strategy rrmemory now has a predictable order similar to strategy
+  rrordered. Members will be called in the order that they are added to the
+  queue.
+
+From 1.8.13 to 1.8.14:
+* permitdirectmedia/denydirectmedia now controls whether peers can be
+  bridged via directmedia by comparing the ACL to the bridging peer's
+  address rather than its own address.
+
+From 1.8.12 to 1.8.13:
+* The complex processor detection and optimization has been removed from
+  the makefile in favor of using native optimization suppport when available.
+  BUILD_NATIVE can be disabled via menuselect under "Compiler Flags".
 
 From 1.8.11 to 1.8.12:
 * In AEL dialplans, the "h" extension will now be inherited from prior

Modified: team/oej/pine-multiple-externip-1.8/addons/app_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/addons/app_mysql.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/addons/app_mysql.c (original)
+++ team/oej/pine-multiple-externip-1.8/addons/app_mysql.c Tue Oct 30 11:44:25 2012
@@ -106,7 +106,7 @@
 static void mysql_ds_destroy(void *data);
 static void mysql_ds_fixup(void *data, struct ast_channel *oldchan, struct ast_channel *newchan);
 
-static struct ast_datastore_info mysql_ds_info = {
+static const struct ast_datastore_info mysql_ds_info = {
 	.type = "APP_ADDON_SQL_MYSQL",
 	.destroy = mysql_ds_destroy,
 	.chan_fixup = mysql_ds_fixup,
@@ -295,7 +295,7 @@
 	AST_NONSTANDARD_APP_ARGS(args, data, ' ');
 
 	if (args.argc == 3) {
-		var = alloca(6 + strlen(args.variable) + 1);
+		var = ast_alloca(6 + strlen(args.variable) + 1);
 		sprintf(var, "MYSQL_%s", args.variable);
 
 		/* Make the parameter case-insensitive */

Modified: team/oej/pine-multiple-externip-1.8/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/addons/chan_mobile.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/addons/chan_mobile.c (original)
+++ team/oej/pine-multiple-externip-1.8/addons/chan_mobile.c Tue Oct 30 11:44:25 2012
@@ -558,7 +558,7 @@
 	max_rsp = 255;
 	flags = IREQ_CACHE_FLUSH;
 
-	ii = alloca(max_rsp * sizeof(inquiry_info));
+	ii = ast_alloca(max_rsp * sizeof(inquiry_info));
 	num_rsp = hci_inquiry(adapter->dev_id, len, max_rsp, NULL, &ii, flags);
 	if (num_rsp > 0) {
 		ast_cli(a->fd, FORMAT1, "Address", "Name", "Usable", "Type", "Port");

Modified: team/oej/pine-multiple-externip-1.8/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/addons/chan_ooh323.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/addons/chan_ooh323.c (original)
+++ team/oej/pine-multiple-externip-1.8/addons/chan_ooh323.c Tue Oct 30 11:44:25 2012
@@ -1245,13 +1245,11 @@
 	case AST_CONTROL_CONGESTION:
 		if (!ast_test_flag(p, H323_ALREADYGONE)) {
 			ooHangCall(callToken, OO_REASON_LOCAL_CONGESTED, AST_CAUSE_SWITCH_CONGESTION);
-			ast_set_flag(p, H323_ALREADYGONE);
 		}
 		break;
 	case AST_CONTROL_BUSY:
 		if (!ast_test_flag(p, H323_ALREADYGONE)) {
 			ooHangCall(callToken, OO_REASON_LOCAL_BUSY, AST_CAUSE_USER_BUSY);
-			ast_set_flag(p, H323_ALREADYGONE);
 		}
 		break;
 	case AST_CONTROL_HOLD:

Modified: team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooGkClient.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooGkClient.c (original)
+++ team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooGkClient.c Tue Oct 30 11:44:25 2012
@@ -809,6 +809,9 @@
    if(pGatekeeperConfirm->m.gatekeeperIdentifierPresent) 
    {
       pGkClient->gkId.nchars = pGatekeeperConfirm->gatekeeperIdentifier.nchars;
+      if (pGkClient->gkId.data) {
+         memFreePtr(&pGkClient->ctxt, pGkClient->gkId.data);
+      }
       pGkClient->gkId.data = (ASN116BITCHAR*)memAlloc(&pGkClient->ctxt,
                               sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
       if(!pGkClient->gkId.data)
@@ -1279,6 +1282,8 @@
    unsigned int x=0;
    DListNode *pNode = NULL;
    OOTimer *pTimer = NULL;
+   ooGkClientTimerCb *cbData=NULL;
+
    /* First delete the corresponding RRQ timer */
    for(x=0; x<pGkClient->timerList.count; x++)
    {
@@ -1368,8 +1373,40 @@
    default:
       OOTRACEINFO1("RRQ Rejected - Invalid Reason\n");
    }
-   pGkClient->state = GkClientGkErr;
+
+   /* send again GRQ/RRQ's */
+   ast_mutex_lock(&pGkClient->Lock);
+   pGkClient->state = GkClientUnregistered;
+   pGkClient->rrqRetries = 0;
+   pGkClient->grqRetries = 0;
+   pGkClient->discoveryComplete = FALSE;
+
+   cbData = (ooGkClientTimerCb*) memAlloc
+                               (&pGkClient->ctxt, sizeof(ooGkClientTimerCb));
+   if(!cbData)
+   {
+      OOTRACEERR1("Error:Failed to allocate memory to GRQ timer callback\n");
+      pGkClient->state = GkClientFailed;
+      ast_mutex_unlock(&pGkClient->Lock);
+      return OO_FAILED;
+   }
+   cbData->timerType = OO_GRQ_TIMER;
+   cbData->pGkClient = pGkClient;
+   if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+                     &ooGkClientGRQTimerExpired, pGkClient->grqTimeout,
+                     cbData, FALSE))
+   {
+      OOTRACEERR1("Error:Unable to create GRQ timer.\n ");
+      memFreePtr(&pGkClient->ctxt, cbData);
+      pGkClient->state = GkClientFailed;
+      ast_mutex_unlock(&pGkClient->Lock);
+      return OO_FAILED;
+   }
+
+   ast_mutex_unlock(&pGkClient->Lock);
+
    return OO_OK;
+
 }
 
 

Modified: team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooh323ep.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooh323ep.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooh323ep.c (original)
+++ team/oej/pine-multiple-externip-1.8/addons/ooh323c/src/ooh323ep.c Tue Oct 30 11:44:25 2012
@@ -56,7 +56,7 @@
       strcpy(gH323ep.traceFile, DEFAULT_TRACEFILE);      
    }
 
-   gH323ep.fptraceFile = fopen(gH323ep.traceFile, "w");
+   gH323ep.fptraceFile = fopen(gH323ep.traceFile, "a");
    if(gH323ep.fptraceFile == NULL)
    {
       printf("Error:Failed to open trace file %s for write.\n", 

Modified: team/oej/pine-multiple-externip-1.8/addons/res_config_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/addons/res_config_mysql.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/addons/res_config_mysql.c (original)
+++ team/oej/pine-multiple-externip-1.8/addons/res_config_mysql.c Tue Oct 30 11:44:25 2012
@@ -144,7 +144,7 @@
 		if (for_write) {
 			whichdb = ast_strdupa(ptr + 1);
 		} else {
-			whichdb = alloca(ptr - database + 1);
+			whichdb = ast_alloca(ptr - database + 1);
 			strncpy(whichdb, database, ptr - database);
 			whichdb[ptr - database] = '\0';
 		}
@@ -467,7 +467,7 @@
 	}
 
 	initfield = ast_strdupa(newparam);
-	if (initfield && (op = strchr(initfield, ' '))) {
+	if ((op = strchr(initfield, ' '))) {
 		*op = '\0';
 	}
 

Modified: team/oej/pine-multiple-externip-1.8/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_chanspy.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_chanspy.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_chanspy.c Tue Oct 30 11:44:25 2012
@@ -1020,6 +1020,7 @@
 					}
 				}
 			} else if (res == 0 && ast_test_flag(flags, OPTION_EXITONHANGUP)) {
+				ast_autochan_destroy(autochan);
 				iter = ast_channel_iterator_destroy(iter);
 				goto exit;
 			}

Modified: team/oej/pine-multiple-externip-1.8/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_dial.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_dial.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_dial.c Tue Oct 30 11:44:25 2012
@@ -672,7 +672,7 @@
 	struct ast_aoc_decoded *aoc_s_rate_list;
 };
 
-static int detect_disconnect(struct ast_channel *chan, char code, struct ast_str *featurecode);
+static int detect_disconnect(struct ast_channel *chan, char code, struct ast_str **featurecode);
 
 static void chanlist_free(struct chanlist *outgoing)
 {
@@ -1532,7 +1532,7 @@
 				}
 
 				if (ast_test_flag64(peerflags, OPT_CALLER_HANGUP) &&
-					detect_disconnect(in, f->subclass.integer, featurecode)) {
+					detect_disconnect(in, f->subclass.integer, &featurecode)) {
 					ast_verb(3, "User requested call disconnect.\n");
 					*to = 0;
 					strcpy(pa->status, "CANCEL");
@@ -1645,18 +1645,18 @@
 	return peer;
 }
 
-static int detect_disconnect(struct ast_channel *chan, char code, struct ast_str *featurecode)
+static int detect_disconnect(struct ast_channel *chan, char code, struct ast_str **featurecode)
 {
 	struct ast_flags features = { AST_FEATURE_DISCONNECT }; /* only concerned with disconnect feature */
 	struct ast_call_feature feature = { 0, };
 	int res;
 
-	ast_str_append(&featurecode, 1, "%c", code);
-
-	res = ast_feature_detect(chan, &features, ast_str_buffer(featurecode), &feature);
+	ast_str_append(featurecode, 1, "%c", code);
+
+	res = ast_feature_detect(chan, &features, ast_str_buffer(*featurecode), &feature);
 
 	if (res != AST_FEATURE_RETURN_STOREDIGITS) {
-		ast_str_reset(featurecode);
+		ast_str_reset(*featurecode);
 	}
 	if (feature.feature_mask & AST_FEATURE_DISCONNECT) {
 		return 1;
@@ -2795,8 +2795,7 @@
 						 ast_exists_extension(peer, opt_args[OPT_ARG_CALLEE_GOSUB], "~~s~~", 1, S_COR(peer->caller.id.number.valid, peer->caller.id.number.str, NULL))) {
 						what_is_s = "~~s~~";
 					}
-					if (asprintf(&gosub_args, "%s,%s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], what_is_s, gosub_argstart + 1) < 0) {
-						ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+					if (ast_asprintf(&gosub_args, "%s,%s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], what_is_s, gosub_argstart + 1) < 0) {
 						gosub_args = NULL;
 					}
 					*gosub_argstart = ',';
@@ -2806,8 +2805,7 @@
 						 ast_exists_extension(peer, opt_args[OPT_ARG_CALLEE_GOSUB], "~~s~~", 1, S_COR(peer->caller.id.number.valid, peer->caller.id.number.str, NULL))) {
 						what_is_s = "~~s~~";
 					}
-					if (asprintf(&gosub_args, "%s,%s,1", opt_args[OPT_ARG_CALLEE_GOSUB], what_is_s) < 0) {
-						ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+					if (ast_asprintf(&gosub_args, "%s,%s,1", opt_args[OPT_ARG_CALLEE_GOSUB], what_is_s) < 0) {
 						gosub_args = NULL;
 					}
 				}
@@ -2996,9 +2994,9 @@
 					/* The peer is now running its own PBX. */
 					goto out;
 				}
-			} else {
-				chan->hangupcause = peer->hangupcause;
-			}
+			}
+		} else if (!ast_check_hangup(chan)) {
+			chan->hangupcause = peer->hangupcause;
 		}
 		ast_hangup(peer);
 	}

Modified: team/oej/pine-multiple-externip-1.8/apps/app_dictate.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_dictate.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_dictate.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_dictate.c Tue Oct 30 11:44:25 2012
@@ -149,7 +149,7 @@
 		ast_mkdir(base, 0755);
 		len = strlen(base) + strlen(filein) + 2;
 		if (!path || len > maxlen) {
-			path = alloca(len);
+			path = ast_alloca(len);
 			memset(path, 0, len);
 			maxlen = len;
 		} else {

Modified: team/oej/pine-multiple-externip-1.8/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_directed_pickup.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_directed_pickup.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_directed_pickup.c Tue Oct 30 11:44:25 2012
@@ -158,7 +158,7 @@
 		 * debugging.
 		 */
 		pickup_args.len = strlen(channame) + 1;
-		chkchan = alloca(pickup_args.len + 1);
+		chkchan = ast_alloca(pickup_args.len + 1);
 		strcpy(chkchan, channame);
 		strcat(chkchan, "-");
 		pickup_args.name = chkchan;

Modified: team/oej/pine-multiple-externip-1.8/apps/app_festival.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_festival.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_festival.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_festival.c Tue Oct 30 11:44:25 2012
@@ -343,12 +343,12 @@
 		const char *endcmd = "\" 'file)(quit)\n";
 
 		strln = strlen(startcmd) + strlen(args.text) + strlen(endcmd) + 1;
-		newfestivalcommand = alloca(strln);
+		newfestivalcommand = ast_alloca(strln);
 		snprintf(newfestivalcommand, strln, "%s%s%s", startcmd, args.text, endcmd);
 		festivalcommand = newfestivalcommand;
 	} else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
 		int x, j;
-		newfestivalcommand = alloca(strlen(festivalcommand) + strlen(args.text) + 1);
+		newfestivalcommand = ast_alloca(strlen(festivalcommand) + strlen(args.text) + 1);
 
 		for (x = 0, j = 0; x < strlen(festivalcommand); x++) {
 			if (festivalcommand[x] == '\\' && festivalcommand[x + 1] == 'n') {

Modified: team/oej/pine-multiple-externip-1.8/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_followme.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_followme.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_followme.c Tue Oct 30 11:44:25 2012
@@ -331,7 +331,7 @@
 	char *cat = NULL, *tmp;
 	struct ast_variable *var;
 	struct number *cur, *nm;
-	char numberstr[90];
+	char *numberstr;
 	int timeout;
 	int numorder;
 	const char *takecallstr;
@@ -447,7 +447,7 @@
 				int idx = 0;
 
 				/* Add a new number */
-				ast_copy_string(numberstr, var->value, sizeof(numberstr));
+				numberstr = ast_strdupa(var->value);
 				if ((tmp = strchr(numberstr, ','))) {
 					*tmp++ = '\0';
 					timeout = atoi(tmp);

Modified: team/oej/pine-multiple-externip-1.8/apps/app_getcpeid.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_getcpeid.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_getcpeid.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_getcpeid.c Tue Oct 30 11:44:25 2012
@@ -76,7 +76,7 @@
 	unsigned int x;
 
 	for (x = 0; x < 4; x++)
-		data[x] = alloca(80);
+		data[x] = ast_alloca(80);
 
 	strcpy(data[0], "** CPE Info **");
 	strcpy(data[1], "Identifying CPE...");

Modified: team/oej/pine-multiple-externip-1.8/apps/app_macro.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_macro.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_macro.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_macro.c Tue Oct 30 11:44:25 2012
@@ -164,7 +164,7 @@
 
 static void macro_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan);
 
-static struct ast_datastore_info macro_ds_info = {
+static const struct ast_datastore_info macro_ds_info = {
 	.type = "MACRO",
 	.chan_fixup = macro_fixup,
 };
@@ -596,8 +596,7 @@
 	char *expr = NULL, *label_a = NULL, *label_b = NULL;
 	int res = 0;
 
-	if (!(expr = ast_strdupa(data)))
-		return -1;
+	expr = ast_strdupa(data);
 
 	if ((label_a = strchr(expr, '?'))) {
 		*label_a = '\0';

Modified: team/oej/pine-multiple-externip-1.8/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pine-multiple-externip-1.8/apps/app_meetme.c?view=diff&rev=375482&r1=375481&r2=375482
==============================================================================
--- team/oej/pine-multiple-externip-1.8/apps/app_meetme.c (original)
+++ team/oej/pine-multiple-externip-1.8/apps/app_meetme.c Tue Oct 30 11:44:25 2012
@@ -142,7 +142,8 @@
 					</option>
 					<option name="p" hasparams="optional">
 						<para>Allow user to exit the conference by pressing <literal>#</literal> (default)
-						or any of the defined keys.  The key used is set to channel variable
+						or any of the defined keys. Dial plan execution will continue at the next
+						priority following MeetMe. The key used is set to channel variable
 						<variable>MEETME_EXIT_KEY</variable>.</para>
 						<argument name="keys" required="true" />
 						<note>
@@ -177,7 +178,7 @@
 						<argument name="secs" required="true" />
 					</option>
 					<option name="x">
-						<para>Close the conference when last marked user exits</para>
+						<para>Leave the conference when the last marked user leaves.</para>
 					</option>
 					<option name="X">
 						<para>Allow user to exit the conference by entering a valid single digit
@@ -512,8 +513,9 @@
 	</manager>
  ***/
 
-#define CONFIG_FILE_NAME "meetme.conf"
-#define SLA_CONFIG_FILE  "sla.conf"
+#define CONFIG_FILE_NAME	"meetme.conf"
+#define SLA_CONFIG_FILE		"sla.conf"
+#define STR_CONCISE			"concise"
 
 /*! each buffer is 20ms, so this is 640ms total */
 #define DEFAULT_AUDIO_BUFFERS  32
@@ -573,7 +575,7 @@
 	CONFFLAG_AGI = (1 << 7),
 	/*! Set to have music on hold when user is alone in conference */
 	CONFFLAG_MOH = (1 << 8),
-	/*! If set the MeetMe will return if all marked with this flag left */
+	/*! If set, the channel will leave the conference if all marked users leave */
 	CONFFLAG_MARKEDEXIT = (1 << 9),
 	/*! If set, the MeetMe will wait until a marked user enters */
 	CONFFLAG_WAITMARKED = (1 << 10),
@@ -1113,6 +1115,13 @@
 	int len;
 	int res = -1;
 
+	ast_test_suite_event_notify("CONFPLAY", "Channel: %s\r\n"
+									"Conference: %s\r\n"
+									"Marked: %d",
+									chan->name,
+									conf->confno,
+									conf->markedusers);
+
 	if (!ast_check_hangup(chan))
 		res = ast_autoservice_start(chan);
 
@@ -1289,71 +1298,131 @@
 	return cnf;
 }
 
-static char *complete_meetmecmd(const char *line, const char *word, int pos, int state)
-{
-	static const char * const cmds[] = {"concise", "lock", "unlock", "mute", "unmute", "kick", "list", NULL};
-
+static char *complete_confno(const char *word, int state)
+{
+	struct ast_conference *cnf;
+	char *ret = NULL;
+	int which = 0;
 	int len = strlen(word);
+
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, cnf, list) {
+		if (!strncmp(word, cnf->confno, len) && ++which > state) {
+			/* dup before releasing the lock */
+			ret = ast_strdup(cnf->confno);
+			break;
+		}
+	}
+	AST_LIST_UNLOCK(&confs);
+	return ret;
+}
+
+static char *complete_userno(struct ast_conference *cnf, const char *word, int state)
+{
+	char usrno[50];
+	struct ao2_iterator iter;
+	struct ast_conf_user *usr;
+	char *ret = NULL;
 	int which = 0;
-	struct ast_conference *cnf = NULL;
-	struct ast_conf_user *usr = NULL;
-	char *confno = NULL;
-	char usrno[50] = "";
-	char *myline, *ret = NULL;
-	
-	if (pos == 1) {		/* Command */
-		return ast_cli_complete(word, cmds, state);
-	} else if (pos == 2) {	/* Conference Number */
+	int len = strlen(word);
+
+	iter = ao2_iterator_init(cnf->usercontainer, 0);
+	for (; (usr = ao2_iterator_next(&iter)); ao2_ref(usr, -1)) {
+		snprintf(usrno, sizeof(usrno), "%d", usr->user_no);
+		if (!strncmp(word, usrno, len) && ++which > state) {
+			ao2_ref(usr, -1);
+			ret = ast_strdup(usrno);
+			break;
+		}
+	}
+	ao2_iterator_destroy(&iter);
+	return ret;
+}
+
+static char *complete_meetmecmd_mute_kick(const char *line, const char *word, int pos, int state)
+{
+	if (pos == 2) {
+		return complete_confno(word, state);
+	}
+	if (pos == 3) {
+		int len = strlen(word);
+		char *ret = NULL;
+		char *saved = NULL;
+		char *myline;
+		char *confno;
+		struct ast_conference *cnf;
+
+		if (!strncasecmp(word, "all", len)) {
+			if (state == 0) {
+				return ast_strdup("all");
+			}
+			--state;
+		}
+
+		/* Extract the confno from the command line. */
+		myline = ast_strdupa(line);
+		strtok_r(myline, " ", &saved);
+		strtok_r(NULL, " ", &saved);
+		confno = strtok_r(NULL, " ", &saved);
+
 		AST_LIST_LOCK(&confs);
 		AST_LIST_TRAVERSE(&confs, cnf, list) {
-			if (!strncasecmp(word, cnf->confno, len) && ++which > state) {
-				ret = cnf->confno;
+			if (!strcmp(confno, cnf->confno)) {
+				ret = complete_userno(cnf, word, state);
 				break;
 			}
 		}
-		ret = ast_strdup(ret); /* dup before releasing the lock */
 		AST_LIST_UNLOCK(&confs);
+
 		return ret;
-	} else if (pos == 3) {
-		/* User Number || Conf Command option*/
-		if (strstr(line, "mute") || strstr(line, "kick")) {
-			if (state == 0 && (strstr(line, "kick") || strstr(line, "mute")) && !strncasecmp(word, "all", len))
-				return ast_strdup("all");
-			which++;
-			AST_LIST_LOCK(&confs);
-
-			/* TODO: Find the conf number from the cmdline (ignore spaces) <- test this and make it fail-safe! */
-			myline = ast_strdupa(line);
-			if (strsep(&myline, " ") && strsep(&myline, " ") && !confno) {
-				while((confno = strsep(&myline, " ")) && (strcmp(confno, " ") == 0))
-					;
+	}
+	return NULL;
+}
+
+static char *complete_meetmecmd_lock(const char *word, int pos, int state)
+{
+	if (pos == 2) {
+		return complete_confno(word, state);
+	}
+	return NULL;
+}
+
+static char *complete_meetmecmd_list(const char *line, const char *word, int pos, int state)
+{
+	int len;
+
+	if (pos == 2) {
+		len = strlen(word);
+		if (!strncasecmp(word, STR_CONCISE, len)) {
+			if (state == 0) {
+				return ast_strdup(STR_CONCISE);
 			}
-			
-			AST_LIST_TRAVERSE(&confs, cnf, list) {
-				if (!strcmp(confno, cnf->confno))
-				    break;
-			}
-
-			if (cnf) {
-				struct ao2_iterator user_iter;
-				user_iter = ao2_iterator_init(cnf->usercontainer, 0);
-
-				while((usr = ao2_iterator_next(&user_iter))) {
-					snprintf(usrno, sizeof(usrno), "%d", usr->user_no);
-					if (!strncasecmp(word, usrno, len) && ++which > state) {
-						ao2_ref(usr, -1);
-						break;
-					}
-					ao2_ref(usr, -1);
-				}
-				ao2_iterator_destroy(&user_iter);
-				AST_LIST_UNLOCK(&confs);
-				return usr ? ast_strdup(usrno) : NULL;
-			}
-			AST_LIST_UNLOCK(&confs);
-		}
-	}
-
+			--state;
+		}
+
+		return complete_confno(word, state);
+	}
+	if (pos == 3 && state == 0) {
+		char *saved = NULL;
+		char *myline;
+		char *confno;
+
+		/* Extract the confno from the command line. */
+		myline = ast_strdupa(line);
+		strtok_r(myline, " ", &saved);
+		strtok_r(NULL, " ", &saved);
+		confno = strtok_r(NULL, " ", &saved);
+
+		if (!strcasecmp(confno, STR_CONCISE)) {
+			/* There is nothing valid in this position now. */
+			return NULL;
+		}
+
+		len = strlen(word);
+		if (!strncasecmp(word, STR_CONCISE, len)) {
+			return ast_strdup(STR_CONCISE);
+		}
+	}
 	return NULL;
 }
 
@@ -1363,37 +1432,31 @@
 	struct ast_conf_user *user;
 	struct ast_conference *cnf;
 	int hr, min, sec;
-	int i = 0, total = 0;
+	int total = 0;
 	time_t now;
-	struct ast_str *cmdline = NULL;
 #define MC_HEADER_FORMAT "%-14s %-14s %-10s %-8s  %-8s  %-6s\n"
 #define MC_DATA_FORMAT "%-12.12s   %4.4d	      %4.4s       %02d:%02d:%02d  %-8s  %-6s\n"
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "meetme list [concise]";
+		e->command = "meetme list";
 		e->usage =
-			"Usage: meetme list [concise] <confno> \n"
-			"       List all or a specific conference.\n";
+			"Usage: meetme list [<confno>] [" STR_CONCISE "]\n"

[... 13006 lines stripped ...]



More information about the asterisk-commits mailing list