[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r136296 - in /team/sean...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 6 19:05:04 CDT 2008


Author: seanbright
Date: Wed Aug  6 19:05:03 2008
New Revision: 136296

URL: http://svn.digium.com/view/asterisk?view=rev&rev=136296
Log:
Merged revisions 135474,135476,135480,135483,135485,135537,135598,135648,135680-135681,135717,135748,135821,135851,135900,135938,135950,136005,136034,136063,136112,136141,136191,136239,136245 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r135474 | russell | 2008-08-04 12:28:07 -0400 (Mon, 04 Aug 2008) | 10 lines

Merged revisions 135473 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135473 | russell | 2008-08-04 11:26:17 -0500 (Mon, 04 Aug 2008) | 2 lines

Add a minor clarification to the documentation of mohinterpret and mohsuggest

........

................
r135476 | tilghman | 2008-08-04 12:34:04 -0400 (Mon, 04 Aug 2008) | 6 lines

HTTP module memory leaks
(closes issue #13230)
 Reported by: eliel
 Patches: 
       res_http_post_leak.patch uploaded by eliel (license 64)

................
r135480 | tilghman | 2008-08-04 12:58:29 -0400 (Mon, 04 Aug 2008) | 14 lines

Merged revisions 135479 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135479 | tilghman | 2008-08-04 11:56:19 -0500 (Mon, 04 Aug 2008) | 6 lines

Memory leak on unload
(closes issue #13231)
 Reported by: eliel
 Patches: 
       app_voicemail.leak.patch uploaded by eliel (license 64)

........

................
r135483 | tilghman | 2008-08-04 13:08:42 -0400 (Mon, 04 Aug 2008) | 11 lines

Merged revisions 135482 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135482 | tilghman | 2008-08-04 12:07:52 -0500 (Mon, 04 Aug 2008) | 2 lines

Define ASTSBINDIR for script
(Closes issue #13221)

........

................
r135485 | tilghman | 2008-08-04 13:12:15 -0400 (Mon, 04 Aug 2008) | 3 lines

Rename Mandrake scripts to Mandriva
(Closes issue #13221)

................
r135537 | russell | 2008-08-04 16:15:27 -0400 (Mon, 04 Aug 2008) | 10 lines

Merged revisions 135536 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135536 | russell | 2008-08-04 15:15:03 -0500 (Mon, 04 Aug 2008) | 2 lines

fix a config sample typo

........

................
r135598 | seanbright | 2008-08-05 09:26:34 -0400 (Tue, 05 Aug 2008) | 9 lines

Merged revisions 135597 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135597 | seanbright | 2008-08-05 09:25:00 -0400 (Tue, 05 Aug 2008) | 1 line

Use PATH_MAX for filenames
........

................
r135648 | tilghman | 2008-08-05 11:30:23 -0400 (Tue, 05 Aug 2008) | 3 lines

Always output a version string, even when we can't figure out what we are.
(Closes issue #13223)

................
r135680 | kpfleming | 2008-08-05 12:56:11 -0400 (Tue, 05 Aug 2008) | 2 lines

make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions

................
r135681 | kpfleming | 2008-08-05 13:05:34 -0400 (Tue, 05 Aug 2008) | 3 lines

datastore inheritance is a channel feature, so move this definition back


................
r135717 | tilghman | 2008-08-05 14:25:16 -0400 (Tue, 05 Aug 2008) | 2 lines

Add '+=' append operator to configuration files.

................
r135748 | tilghman | 2008-08-05 17:37:35 -0400 (Tue, 05 Aug 2008) | 17 lines

Merged revisions 135747 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135747 | tilghman | 2008-08-05 16:34:46 -0500 (Tue, 05 Aug 2008) | 9 lines

In a conversion to use ast_strlen_zero, the meaning of the flag IAX_HASCALLERID
was perverted.  This change reverts IAX2 to the original meaning, which was,
that the callerid set on the client should be overridden on the server, even if
that means the resulting callerid is blank.  In other words, if you set
"callerid=" in the IAX config, then the callerid should be overridden to blank,
even if set on the client.  Note that there's a distinction, even on realtime,
between the field not existing (NULL in databases) and the field existing, but
set to blank (override callerid to blank).

........

................
r135821 | murf | 2008-08-05 19:45:32 -0400 (Tue, 05 Aug 2008) | 42 lines

Merged revisions 135799 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135799 | murf | 2008-08-05 17:13:20 -0600 (Tue, 05 Aug 2008) | 34 lines

(closes issue #12982)
Reported by: bcnit
Tested by: murf

I discovered that also, in the previous bug fixes and changes,
the cdr.conf 'unanswered' option is not being obeyed, so
I fixed this.

And, yes, there are two 'answer' times involved in this
scenario, and I would agree with you, that the first 
answer time is the time that should appear in the CDR.
(the second 'answer' time is the time that the bridge
was begun).

I made the necessary adjustments, recording the first
answer time into the peer cdr, and then using that to
override the bridge cdr's value.

To get the 'unanswered' CDRs to appear, I purposely
output them, using the dial cmd to mark them as
DIALED (with a new flag), and outputting them if
they bear that flag, and you are in the right mode.

I also corrected one small mention of the Zap device
to equally consider the dahdi device.

I heavily tested 10-sec-wait macros in dial, and
without the macro call; I tested hangups while the
macro was running vs. letting the macro complete
and the bridge form. Looks OK. Removed all the
instrumentation and debug.



........

................
r135851 | mmichelson | 2008-08-05 20:30:53 -0400 (Tue, 05 Aug 2008) | 48 lines

Merged revisions 135841,135847,135850 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135841 | mmichelson | 2008-08-05 19:25:10 -0500 (Tue, 05 Aug 2008) | 27 lines

Merging the issue11259 branch.

The purpose of this branch was to take into account
"burps" which could cause jitterbuffers to misbehave.
One such example is if the L option to Dial() were used
to inject audio into a bridged conversation at regular
intervals. Since the audio here was not passed through
the jitterbuffer, it would cause a gap in the jitterbuffer's
timestamps which would cause a frames to be dropped for a 
brief period.

Now ast_generic_bridge will empty and reset the jitterbuffer
each time it is called. This causes injected audio to be handled
properly.

ast_generic_bridge also will empty and reset the jitterbuffer
if it receives an AST_CONTROL_SRCUPDATE frame since the change
in audio source could negatively affect the jitterbuffer.

All of this was made possible by adding a new public API call
to the abstract_jb called ast_jb_empty_and_reset.

(closes issue #11259)
Reported by: plack
Tested by: putnopvut


........
r135847 | mmichelson | 2008-08-05 19:27:54 -0500 (Tue, 05 Aug 2008) | 4 lines

Revert inadvertent changes to app_skel that occurred when
I was testing for a memory leak


........
r135850 | mmichelson | 2008-08-05 19:29:54 -0500 (Tue, 05 Aug 2008) | 3 lines

Remove properties that should not be here


........

................
r135900 | tilghman | 2008-08-05 23:04:01 -0400 (Tue, 05 Aug 2008) | 12 lines

Merged revisions 135899 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135899 | tilghman | 2008-08-05 22:02:59 -0500 (Tue, 05 Aug 2008) | 4 lines

1) Bugfix for debugging code
2) Reduce compiler warnings for another section of debugging code
(Closes issue #13237)

........

................
r135938 | tilghman | 2008-08-05 23:29:42 -0400 (Tue, 05 Aug 2008) | 12 lines

Merged revisions 135915 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135915 | tilghman | 2008-08-05 22:24:56 -0500 (Tue, 05 Aug 2008) | 4 lines

Since powerof() can return an error condition, it's foolhardy not to detect and
deal with that condition.
(Related to issue #13240)

........

................
r135950 | tilghman | 2008-08-05 23:55:49 -0400 (Tue, 05 Aug 2008) | 12 lines

Merged revisions 135949 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135949 | tilghman | 2008-08-05 22:53:36 -0500 (Tue, 05 Aug 2008) | 4 lines

Fix a longstanding bug in channel walking logic, and fix the explanation to
make sense.
(Closes issue #13124)

........

................
r136005 | oej | 2008-08-06 09:34:08 -0400 (Wed, 06 Aug 2008) | 6 lines

- Formatting
- Changing debug messages from VERBOSE to DEBUG channel
- Adding a few todo's
- Adding a few more "XMPP"'s to compliment Jabber...


................
r136034 | tilghman | 2008-08-06 10:51:51 -0400 (Wed, 06 Aug 2008) | 3 lines

Use a dynamic buffer for rendered SQL, instead of hardcoding 2048 bytes.  Also,
switch to using RWLISTs for the linked list of queries.

................
r136063 | mmichelson | 2008-08-06 11:59:29 -0400 (Wed, 06 Aug 2008) | 24 lines

Merged revisions 136062 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136062 | mmichelson | 2008-08-06 10:58:40 -0500 (Wed, 06 Aug 2008) | 16 lines

Since adding the AST_CONTROL_SRCUPDATE frame type,
there are places where ast_rtp_new_source may be called
where the tech_pvt of a channel may not yet have an
rtp structure allocated. This caused a crash in chan_skinny,
which was fixed earlier, but now the same crash has been 
reported against chan_h323 as well. It seems that the best 
solution is to modify ast_rtp_new_source to not attempt to 
set the marker bit if the rtp structure passed in is NULL.

This change to ast_rtp_new_source also allows the removal
of what is now a redundant pointer check from chan_skinny.

(closes issue #13247)
Reported by: pj


........

................
r136112 | tilghman | 2008-08-06 12:58:42 -0400 (Wed, 06 Aug 2008) | 7 lines

Persist DIALGROUP() values in astdb
(closes issue #13138)
 Reported by: Corydon76
 Patches: 
       20080725__bug13138.diff.txt uploaded by Corydon76 (license 14)
 Tested by: pj

................
r136141 | tilghman | 2008-08-06 13:33:48 -0400 (Wed, 06 Aug 2008) | 6 lines

Janitor ast_str project
(closes issue #13058)
 Reported by: pputman
 Patches: 
       app_meetme_aststr2.patch uploaded by pputman (license 81)

................
r136191 | tilghman | 2008-08-06 16:15:34 -0400 (Wed, 06 Aug 2008) | 12 lines

Merged revisions 136190 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136190 | tilghman | 2008-08-06 15:14:54 -0500 (Wed, 06 Aug 2008) | 4 lines

-C option takes a filename, not a directory path.
(closes issue #13007)
 Reported by: klaus3000

........

................
r136239 | mmichelson | 2008-08-06 16:43:58 -0400 (Wed, 06 Aug 2008) | 11 lines

Blocked revisions 136238 via svnmerge

........
r136238 | mmichelson | 2008-08-06 15:42:15 -0500 (Wed, 06 Aug 2008) | 4 lines

We only need to unregister the QueueStatus manager
command once on an unload


........

................
r136245 | dhubbard | 2008-08-06 17:22:56 -0400 (Wed, 06 Aug 2008) | 1 line

move taskprocessor CLI commands into the core namespace
................

Added:
    team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.mandriva.asterisk
      - copied unchanged from r136245, trunk/contrib/init.d/rc.mandriva.asterisk
    team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.mandriva.zaptel
      - copied unchanged from r136245, trunk/contrib/init.d/rc.mandriva.zaptel
    team/seanbright/resolve-shadow-warnings/include/asterisk/datastore.h
      - copied unchanged from r136245, trunk/include/asterisk/datastore.h
    team/seanbright/resolve-shadow-warnings/main/datastore.c
      - copied unchanged from r136245, trunk/main/datastore.c
Removed:
    team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.mandrake.asterisk
    team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.mandrake.zaptel
Modified:
    team/seanbright/resolve-shadow-warnings/   (props changed)
    team/seanbright/resolve-shadow-warnings/CHANGES
    team/seanbright/resolve-shadow-warnings/Makefile
    team/seanbright/resolve-shadow-warnings/UPGRADE.txt
    team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c
    team/seanbright/resolve-shadow-warnings/apps/app_dial.c
    team/seanbright/resolve-shadow-warnings/apps/app_meetme.c
    team/seanbright/resolve-shadow-warnings/apps/app_queue.c
    team/seanbright/resolve-shadow-warnings/apps/app_speech_utils.c
    team/seanbright/resolve-shadow-warnings/apps/app_stack.c
    team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
    team/seanbright/resolve-shadow-warnings/build_tools/make_version
    team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c
    team/seanbright/resolve-shadow-warnings/channels/chan_skinny.c
    team/seanbright/resolve-shadow-warnings/configs/chan_dahdi.conf.sample
    team/seanbright/resolve-shadow-warnings/contrib/init.d/rc.redhat.asterisk
    team/seanbright/resolve-shadow-warnings/funcs/func_dialgroup.c
    team/seanbright/resolve-shadow-warnings/funcs/func_enum.c
    team/seanbright/resolve-shadow-warnings/funcs/func_global.c
    team/seanbright/resolve-shadow-warnings/funcs/func_lock.c
    team/seanbright/resolve-shadow-warnings/funcs/func_odbc.c
    team/seanbright/resolve-shadow-warnings/funcs/func_speex.c
    team/seanbright/resolve-shadow-warnings/funcs/func_volume.c
    team/seanbright/resolve-shadow-warnings/include/asterisk/abstract_jb.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/cdr.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/channel.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/config.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/http.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/manager.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/threadstorage.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/utils.h
    team/seanbright/resolve-shadow-warnings/main/Makefile
    team/seanbright/resolve-shadow-warnings/main/abstract_jb.c
    team/seanbright/resolve-shadow-warnings/main/audiohook.c
    team/seanbright/resolve-shadow-warnings/main/cdr.c
    team/seanbright/resolve-shadow-warnings/main/channel.c
    team/seanbright/resolve-shadow-warnings/main/cli.c
    team/seanbright/resolve-shadow-warnings/main/config.c
    team/seanbright/resolve-shadow-warnings/main/features.c
    team/seanbright/resolve-shadow-warnings/main/fixedjitterbuf.h
    team/seanbright/resolve-shadow-warnings/main/http.c
    team/seanbright/resolve-shadow-warnings/main/manager.c
    team/seanbright/resolve-shadow-warnings/main/pbx.c
    team/seanbright/resolve-shadow-warnings/main/rtp.c
    team/seanbright/resolve-shadow-warnings/main/taskprocessor.c
    team/seanbright/resolve-shadow-warnings/main/translate.c
    team/seanbright/resolve-shadow-warnings/pbx/pbx_dundi.c
    team/seanbright/resolve-shadow-warnings/pbx/pbx_lua.c
    team/seanbright/resolve-shadow-warnings/res/res_agi.c
    team/seanbright/resolve-shadow-warnings/res/res_http_post.c
    team/seanbright/resolve-shadow-warnings/res/res_jabber.c
    team/seanbright/resolve-shadow-warnings/res/res_smdi.c

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug  6 19:05:03 2008
@@ -1,1 +1,1 @@
-/trunk:1-135467
+/trunk:1-136295

Modified: team/seanbright/resolve-shadow-warnings/CHANGES
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/CHANGES?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/CHANGES (original)
+++ team/seanbright/resolve-shadow-warnings/CHANGES Wed Aug  6 19:05:03 2008
@@ -199,6 +199,10 @@
     Skinny channels only.
   * You can now compile Asterisk against the Hoard Memory Allocator, see doc/hoard.txt
     for more information.
+  * Config file variables may now be appended to, by using the '+=' append
+    operator.  This is most helpful when working with long SQL queries in
+    func_odbc.conf, as the queries no longer need to be specified on a single
+    line.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------

Modified: team/seanbright/resolve-shadow-warnings/Makefile
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/Makefile?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/Makefile (original)
+++ team/seanbright/resolve-shadow-warnings/Makefile Wed Aug  6 19:05:03 2008
@@ -786,7 +786,7 @@
 			$(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk $(DESTDIR)/etc/init.d/asterisk; \
 			if [ -z "$(DESTDIR)" ]; then /sbin/rc-update add asterisk default; fi; \
 		elif [ -f /etc/mandrake-release -o -f /etc/mandriva-release ]; then \
-			$(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk $(DESTDIR)/etc/rc.d/init.d/asterisk; \
+			$(INSTALL) -m 755 contrib/init.d/rc.mandriva.asterisk $(DESTDIR)/etc/rc.d/init.d/asterisk; \
 			if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add asterisk; fi; \
 		elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \
 			$(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk $(DESTDIR)/etc/init.d/asterisk; \

Modified: team/seanbright/resolve-shadow-warnings/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/UPGRADE.txt?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/UPGRADE.txt (original)
+++ team/seanbright/resolve-shadow-warnings/UPGRADE.txt Wed Aug  6 19:05:03 2008
@@ -226,6 +226,13 @@
 * queues.conf: the queue-lessthan sound file option is no longer available, and the
   queue-round-seconds option no longer takes '1' as a valid parameter.
 
+* If you have any third party modules which use a config file variable whose
+  name ends in a '+', please note that the append capability added to this
+  version may now conflict with that variable naming scheme.  An easy
+  workaround is to ensure that a space occurs between the '+' and the '=',
+  to differentiate your variable from the append operator.  This potential
+  conflict is unlikely, but is documented here to be thorough.
+
 Manager:
 
 * Manager has been upgraded to version 1.1 with a lot of changes. 

Modified: team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c Wed Aug  6 19:05:03 2008
@@ -560,7 +560,7 @@
 			/* chanspy_ds->chan is NULL after this call */
 			chanspy_ds_destroy(datastore->data);
 			datastore->data = NULL;
-			ast_channel_datastore_free(datastore);
+			ast_datastore_free(datastore);
 		}
 		ast_channel_unlock(chan);
 	}
@@ -576,7 +576,7 @@
 
 	ast_mutex_lock(&chanspy_ds->lock);
 
-	if (!(datastore = ast_channel_datastore_alloc(&chanspy_ds_info, chanspy_ds->unique_id))) {
+	if (!(datastore = ast_datastore_alloc(&chanspy_ds_info, chanspy_ds->unique_id))) {
 		ast_mutex_unlock(&chanspy_ds->lock);
 		chanspy_ds = chanspy_ds_free(chanspy_ds);
 		ast_channel_unlock(chan);

Modified: team/seanbright/resolve-shadow-warnings/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_dial.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_dial.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_dial.c Wed Aug  6 19:05:03 2008
@@ -672,6 +672,10 @@
 					if (!peer) {
 						ast_verb(3, "%s answered %s\n", c->name, in->name);
 						peer = c;
+						if (peer->cdr) {
+							peer->cdr->answer = ast_tvnow();
+							peer->cdr->disposition = AST_CDR_ANSWERED;
+						}
 						ast_copy_flags64(peerflags, o,
 							OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
 							OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
@@ -1354,7 +1358,7 @@
 	ast_copy_flags64(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING);
 
 	/* Create datastore for channel dial features for caller */
-	if (!(ds_caller_features = ast_channel_datastore_alloc(&dial_features_info, NULL))) {
+	if (!(ds_caller_features = ast_datastore_alloc(&dial_features_info, NULL))) {
 		ast_log(LOG_WARNING, "Unable to create channel datastore for dial features. Aborting!\n");
 		goto out;
 	}
@@ -1416,7 +1420,7 @@
 		if (datastore)
 			dialed_interfaces = datastore->data;
 		else {
-			if (!(datastore = ast_channel_datastore_alloc(&dialed_interface_info, NULL))) {
+			if (!(datastore = ast_datastore_alloc(&dialed_interface_info, NULL))) {
 				ast_log(LOG_WARNING, "Unable to create channel datastore for dialed interfaces. Aborting!\n");
 				ast_free(tmp);
 				goto out;
@@ -1522,7 +1526,7 @@
 			ast_copy_string(tc->exten, chan->exten, sizeof(tc->exten));
 
 		/* Save callee features */
-		if (!(ds_callee_features = ast_channel_datastore_alloc(&dial_features_info, NULL))) {
+		if (!(ds_callee_features = ast_datastore_alloc(&dial_features_info, NULL))) {
 			ast_log(LOG_WARNING, "Unable to create channel datastore for dial features. Aborting!\n");
 			ast_free(tmp);
 			goto out;
@@ -1624,7 +1628,7 @@
 	 * datastore again, causing a crash
 	 */
 	if (!ast_channel_datastore_remove(chan, datastore))
-		ast_channel_datastore_free(datastore);
+		ast_datastore_free(datastore);
 	if (!peer) {
 		if (result) {
 			res = result;

Modified: team/seanbright/resolve-shadow-warnings/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_meetme.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_meetme.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_meetme.c Wed Aug  6 19:05:03 2008
@@ -954,7 +954,7 @@
 	int hr, min, sec;
 	int i = 0, total = 0;
 	time_t now;
-	char cmdline[1024] = "";
+	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"
 
@@ -976,106 +976,126 @@
 		if (strlen(a->argv[i]) > 100)
 			ast_cli(a->fd, "Invalid Arguments.\n");
 	}
+
+	/* Max confno length */
+	if (!(cmdline = ast_str_create(MAX_CONFNUM))) {
+		return CLI_FAILURE;
+	}
+
 	if (a->argc == 1 || (a->argc == 2 && !strcasecmp(a->argv[1], "concise"))) {
 		/* 'MeetMe': List all the conferences */	
 		int concise = (a->argc == 2 && !strcasecmp(a->argv[1], "concise"));
 		now = time(NULL);
 		AST_LIST_LOCK(&confs);
 		if (AST_LIST_EMPTY(&confs)) {
-			if (!concise)
+			if (!concise) {
 				ast_cli(a->fd, "No active MeetMe conferences.\n");
+			}
 			AST_LIST_UNLOCK(&confs);
+			ast_free(cmdline);
 			return CLI_SUCCESS;
 		}
-		if (!concise)
+		if (!concise) {
 			ast_cli(a->fd, MC_HEADER_FORMAT, "Conf Num", "Parties", "Marked", "Activity", "Creation", "Locked");
+		}
 		AST_LIST_TRAVERSE(&confs, cnf, list) {
-			if (cnf->markedusers == 0)
-				strcpy(cmdline, "N/A ");
-			else 
-				snprintf(cmdline, sizeof(cmdline), "%4.4d", cnf->markedusers);
+			if (cnf->markedusers == 0) {
+				ast_str_set(&cmdline, 0, "N/A ");
+			} else {
+				ast_str_set(&cmdline, 0, "%4.4d", cnf->markedusers);
+			}
 			hr = (now - cnf->start) / 3600;
 			min = ((now - cnf->start) % 3600) / 60;
 			sec = (now - cnf->start) % 60;
-			if (!concise)
-				ast_cli(a->fd, MC_DATA_FORMAT, cnf->confno, cnf->users, cmdline, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
-			else {
-				ast_cli(a->fd, "%s!%d!%d!%02d:%02d:%02d!%d!%d\n", 
-					cnf->confno, 
-					cnf->users, 
-					cnf->markedusers, 
+			if (!concise) {
+				ast_cli(a->fd, MC_DATA_FORMAT, cnf->confno, cnf->users, cmdline->str, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
+			} else {
+				ast_cli(a->fd, "%s!%d!%d!%02d:%02d:%02d!%d!%d\n",
+					cnf->confno,
+					cnf->users,
+					cnf->markedusers,
 					hr, min, sec,
-					cnf->isdynamic, 
+					cnf->isdynamic,
 					cnf->locked);
 			}
 
-			total += cnf->users; 	
+			total += cnf->users;
 		}
 		AST_LIST_UNLOCK(&confs);
-		if (!concise)
+		if (!concise) {
 			ast_cli(a->fd, "* Total number of MeetMe users: %d\n", total);
+		}
+		ast_free(cmdline);
 		return CLI_SUCCESS;
 	}
-	if (a->argc < 3)
+	if (a->argc < 3) {
+		ast_free(cmdline);
 		return CLI_SHOWUSAGE;
-	ast_copy_string(cmdline, a->argv[2], sizeof(cmdline));	/* Argv 2: conference number */
-	if (strstr(a->argv[1], "lock")) {	
+	}
+
+	ast_str_set(&cmdline, 0, "%s", a->argv[2]);	/* Argv 2: conference number */
+	if (strstr(a->argv[1], "lock")) {
 		if (strcmp(a->argv[1], "lock") == 0) {
 			/* Lock */
-			strncat(cmdline, ",L", sizeof(cmdline) - strlen(cmdline) - 1);
+			ast_str_append(&cmdline, 0, ",L");
 		} else {
 			/* Unlock */
-			strncat(cmdline, ",l", sizeof(cmdline) - strlen(cmdline) - 1);
+			ast_str_append(&cmdline, 0, ",l");
 		}
 	} else if (strstr(a->argv[1], "mute")) { 
-		if (a->argc < 4)
+		if (a->argc < 4) {
+			ast_free(cmdline);
 			return CLI_SHOWUSAGE;
+		}
 		if (strcmp(a->argv[1], "mute") == 0) {
 			/* Mute */
 			if (strcmp(a->argv[3], "all") == 0) {
-				strncat(cmdline, ",N", sizeof(cmdline) - strlen(cmdline) - 1);
+				ast_str_append(&cmdline, 0, ",N");
 			} else {
-				strncat(cmdline, ",M,", sizeof(cmdline) - strlen(cmdline) - 1);	
-				strncat(cmdline, a->argv[3], sizeof(cmdline) - strlen(cmdline) - 1);
+				ast_str_append(&cmdline, 0, ",M,%s", a->argv[3]);	
 			}
 		} else {
 			/* Unmute */
 			if (strcmp(a->argv[3], "all") == 0) {
-				strncat(cmdline, ",n", sizeof(cmdline) - strlen(cmdline) - 1);
+				ast_str_append(&cmdline, 0, ",n");
 			} else {
-				strncat(cmdline, ",m,", sizeof(cmdline) - strlen(cmdline) - 1);
-				strncat(cmdline, a->argv[3], sizeof(cmdline) - strlen(cmdline) - 1);
+				ast_str_append(&cmdline, 0, ",m,%s", a->argv[3]);
 			}
 		}
 	} else if (strcmp(a->argv[1], "kick") == 0) {
-		if (a->argc < 4)
+		if (a->argc < 4) {
+			ast_free(cmdline);
 			return CLI_SHOWUSAGE;
+		}
 		if (strcmp(a->argv[3], "all") == 0) {
 			/* Kick all */
-			strncat(cmdline, ",K", sizeof(cmdline) - strlen(cmdline) - 1);
+			ast_str_append(&cmdline, 0, ",K");
 		} else {
 			/* Kick a single user */
-			strncat(cmdline, ",k,", sizeof(cmdline) - strlen(cmdline) - 1);
-			strncat(cmdline, a->argv[3], sizeof(cmdline) - strlen(cmdline) - 1);
+			ast_str_append(&cmdline, 0, ",k,%s", a->argv[3]);
 		}
 	} else if (strcmp(a->argv[1], "list") == 0) {
 		int concise = (a->argc == 4 && (!strcasecmp(a->argv[3], "concise")));
 		/* List all the users in a conference */
 		if (AST_LIST_EMPTY(&confs)) {
-			if (!concise)
+			if (!concise) {
 				ast_cli(a->fd, "No active conferences.\n");
+			}
+			ast_free(cmdline);
 			return CLI_SUCCESS;	
 		}
 		/* Find the right conference */
 		AST_LIST_LOCK(&confs);
 		AST_LIST_TRAVERSE(&confs, cnf, list) {
-			if (strcmp(cnf->confno, a->argv[2]) == 0)
+			if (strcmp(cnf->confno, a->argv[2]) == 0) {
 				break;
+			}
 		}
 		if (!cnf) {
 			if (!concise)
 				ast_cli(a->fd, "No such conference: %s.\n", a->argv[2]);
 			AST_LIST_UNLOCK(&confs);
+			ast_free(cmdline);
 			return CLI_SUCCESS;
 		}
 		/* Show all the users */
@@ -1084,7 +1104,7 @@
 			hr = (now - user->jointime) / 3600;
 			min = ((now - user->jointime) % 3600) / 60;
 			sec = (now - user->jointime) % 60;
-			if (!concise)
+			if (!concise) {
 				ast_cli(a->fd, "User #: %-2.2d %12.12s %-20.20s Channel: %s %s %s %s %s %s %02d:%02d:%02d\n",
 					user->user_no,
 					S_OR(user->chan->cid.cid_num, "<unknown>"),
@@ -1095,7 +1115,7 @@
 					user->adminflags & ADMINFLAG_MUTED ? "(Admin Muted)" : user->adminflags & ADMINFLAG_SELFMUTED ? "(Muted)" : "",
 					user->adminflags & ADMINFLAG_T_REQUEST ? "(Request to Talk)" : "",
 					istalking(user->talking), hr, min, sec); 
-			else 
+			} else {
 				ast_cli(a->fd, "%d!%s!%s!%s!%s!%s!%s!%s!%d!%02d:%02d:%02d\n",
 					user->user_no,
 					S_OR(user->chan->cid.cid_num, ""),
@@ -1106,18 +1126,23 @@
 					user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED) ? "1" : "",
 					user->adminflags & ADMINFLAG_T_REQUEST ? "1" : "",
 					user->talking, hr, min, sec);
-			
-		}
-		if (!concise)
+			}
+		}
+		if (!concise) {
 			ast_cli(a->fd, "%d users in that conference.\n", cnf->users);
+		}
 		AST_LIST_UNLOCK(&confs);
+		ast_free(cmdline);
 		return CLI_SUCCESS;
-	} else 
+	} else {
+		ast_free(cmdline);
 		return CLI_SHOWUSAGE;
-
-	ast_debug(1, "Cmdline: %s\n", cmdline);
-
-	admin_exec(NULL, cmdline);
+	}
+
+	ast_debug(1, "Cmdline: %s\n", cmdline->str);
+
+	admin_exec(NULL, cmdline->str);
+	ast_free(cmdline);
 
 	return CLI_SUCCESS;
 }
@@ -3912,7 +3937,7 @@
 {
 	struct sla_station *station;
 	struct sla_trunk_ref *trunk_ref;
-	char conf_name[MAX_CONFNUM];
+	struct ast_str *conf_name = ast_str_create(16);
 	struct ast_flags conf_flags = { 0 };
 	struct ast_conference *conf;
 
@@ -3927,11 +3952,11 @@
 	}
 
 	ast_atomic_fetchadd_int((int *) &trunk_ref->trunk->active_stations, 1);
-	snprintf(conf_name, sizeof(conf_name), "SLA_%s", trunk_ref->trunk->name);
+	ast_str_set(&conf_name, 0, "SLA_%s", trunk_ref->trunk->name);
 	ast_set_flag(&conf_flags, 
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
 	ast_answer(trunk_ref->chan);
-	conf = build_conf(conf_name, "", "", 0, 0, 1, trunk_ref->chan);
+	conf = build_conf(conf_name->str, "", "", 0, 0, 1, trunk_ref->chan);
 	if (conf) {
 		conf_run(trunk_ref->chan, conf, conf_flags.flags, NULL);
 		dispose_conf(conf);
@@ -3940,8 +3965,8 @@
 	trunk_ref->chan = NULL;
 	if (ast_atomic_dec_and_test((int *) &trunk_ref->trunk->active_stations) &&
 		trunk_ref->state != SLA_TRUNK_STATE_ONHOLD_BYME) {
-		strncat(conf_name, ",K", sizeof(conf_name) - strlen(conf_name) - 1);
-		admin_exec(NULL, conf_name);
+		ast_str_append(&conf_name, 0, ",K");
+		admin_exec(NULL, conf_name->str);
 		trunk_ref->trunk->hold_stations = 0;
 		sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
 	}
@@ -3949,6 +3974,7 @@
 	ast_dial_join(station->dial);
 	ast_dial_destroy(station->dial);
 	station->dial = NULL;
+	ast_free(conf_name);
 
 	return NULL;
 }

Modified: team/seanbright/resolve-shadow-warnings/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_queue.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_queue.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_queue.c Wed Aug  6 19:05:03 2008
@@ -3120,7 +3120,7 @@
 	}
 
 	ast_channel_datastore_remove(new_chan, datastore);
-	ast_channel_datastore_free(datastore);
+	ast_datastore_free(datastore);
 }
 
 /*! \brief mechanism to tell if a queue caller was atxferred by a queue member.
@@ -3147,7 +3147,7 @@
 	}
 
 	ast_channel_lock(qe->chan);
-	if (!(ds = ast_channel_datastore_alloc(&queue_transfer_info, NULL))) {
+	if (!(ds = ast_datastore_alloc(&queue_transfer_info, NULL))) {
 		ast_channel_unlock(qe->chan);
 		ast_log(LOG_WARNING, "Unable to create transfer datastore. queue_log will not show attended transfer\n");
 		return;
@@ -3321,7 +3321,7 @@
 			goto out;
 		}
 		if (!datastore) {
-			if (!(datastore = ast_channel_datastore_alloc(&dialed_interface_info, NULL))) {
+			if (!(datastore = ast_datastore_alloc(&dialed_interface_info, NULL))) {
 				ao2_ref(cur, -1);
 				ao2_unlock(qe->parent);
 				if (use_weight)
@@ -3423,7 +3423,7 @@
 	 * datastore again, causing a crash
 	 */
 	if (datastore && !ast_channel_datastore_remove(qe->chan, datastore)) {
-		ast_channel_datastore_free(datastore);
+		ast_datastore_free(datastore);
 	}
 	ao2_lock(qe->parent);
 	if (qe->parent->strategy == QUEUE_STRATEGY_RRMEMORY) {
@@ -3845,7 +3845,7 @@
 			transfer_ds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL);
 			if (transfer_ds) {
 				ast_channel_datastore_remove(qe->chan, transfer_ds);
-				ast_channel_datastore_free(transfer_ds);
+				ast_datastore_free(transfer_ds);
 			}
 			ast_channel_unlock(qe->chan);
 		}

Modified: team/seanbright/resolve-shadow-warnings/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_speech_utils.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_speech_utils.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_speech_utils.c Wed Aug  6 19:05:03 2008
@@ -364,7 +364,7 @@
 		return 0;
 	}
 
-	datastore = ast_channel_datastore_alloc(&speech_datastore, NULL);
+	datastore = ast_datastore_alloc(&speech_datastore, NULL);
 	if (datastore == NULL) {
 		ast_speech_destroy(speech);
 		pbx_builtin_setvar_helper(chan, "ERROR", "1");

Modified: team/seanbright/resolve-shadow-warnings/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_stack.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_stack.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_stack.c Wed Aug  6 19:05:03 2008
@@ -242,7 +242,7 @@
 
 	if (!stack_store) {
 		ast_debug(1, "Channel %s has no datastore, so we're allocating one.\n", chan->name);
-		stack_store = ast_channel_datastore_alloc(&stack_info, NULL);
+		stack_store = ast_datastore_alloc(&stack_info, NULL);
 		if (!stack_store) {
 			ast_log(LOG_ERROR, "Unable to allocate new datastore.  Gosub will fail.\n");
 			return -1;
@@ -251,7 +251,7 @@
 		oldlist = ast_calloc(1, sizeof(*oldlist));
 		if (!oldlist) {
 			ast_log(LOG_ERROR, "Unable to allocate datastore list head.  Gosub will fail.\n");
-			ast_channel_datastore_free(stack_store);
+			ast_datastore_free(stack_store);
 			return -1;
 		}
 

Modified: team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c Wed Aug  6 19:05:03 2008
@@ -9556,10 +9556,31 @@
 	return RESULT_SUCCESS;
 }
 
+/*! \brief Free the users structure. */
+static void free_vm_users(void) 
+{
+	struct ast_vm_user *current;
+	AST_LIST_LOCK(&users);
+	while ((current = AST_LIST_REMOVE_HEAD(&users, list))) {
+		ast_set_flag(current, VM_ALLOCED);
+		free_user(current);
+	}
+	AST_LIST_UNLOCK(&users);
+}
+
+/*! \brief Free the zones structure. */
+static void free_vm_zones(void)
+{
+	struct vm_zone *zcur;
+	AST_LIST_LOCK(&zones);
+	while ((zcur = AST_LIST_REMOVE_HEAD(&zones, list)))
+		free_zone(zcur);
+	AST_LIST_UNLOCK(&zones);
+}
+
 static int load_config(int reload)
 {
 	struct ast_vm_user *current;
-	struct vm_zone *zcur;
 	struct ast_config *cfg, *ucfg;
 	char *cat;
 	struct ast_variable *var;
@@ -9590,17 +9611,14 @@
 	strcpy(listen_control_pause_key,DEFAULT_LISTEN_CONTROL_PAUSE_KEY);
 	strcpy(listen_control_restart_key,DEFAULT_LISTEN_CONTROL_RESTART_KEY);
 	strcpy(listen_control_stop_key,DEFAULT_LISTEN_CONTROL_STOP_KEY);
-	
-	AST_LIST_LOCK(&users);
-	while ((current = AST_LIST_REMOVE_HEAD(&users, list))) {
-		ast_set_flag(current, VM_ALLOCED);
-		free_user(current);
-	}
-
-	AST_LIST_LOCK(&zones);
-	while ((zcur = AST_LIST_REMOVE_HEAD(&zones, list))) 
-		free_zone(zcur);
-	AST_LIST_UNLOCK(&zones);
+
+	/* Free all the users structure */	
+	free_vm_users();
+
+	/* Free all the zones structure */
+	free_vm_zones();
+
+	AST_LIST_LOCK(&users);	
 
 	memset(ext_pass_cmd, 0, sizeof(ext_pass_cmd));
 	memset(ext_pass_check_cmd, 0, sizeof(ext_pass_check_cmd));
@@ -10262,6 +10280,9 @@
 	mwi_subscription_tps = ast_taskprocessor_unreference(mwi_subscription_tps);
 	ast_unload_realtime("voicemail");
 	ast_unload_realtime("voicemail_data");
+
+	free_vm_users();
+	free_vm_zones();
 	return res;
 }
 

Modified: team/seanbright/resolve-shadow-warnings/build_tools/make_version
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/build_tools/make_version?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/build_tools/make_version (original)
+++ team/seanbright/resolve-shadow-warnings/build_tools/make_version Wed Aug  6 19:05:03 2008
@@ -69,4 +69,6 @@
     else
 	echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}}
     fi
+else
+  echo "UNKNOWN__and_probably_unsupported"
 fi

Modified: team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c?view=diff&rev=136296&r1=136295&r2=136296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c (original)
+++ team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c Wed Aug  6 19:05:03 2008
@@ -6476,7 +6476,7 @@
 		struct ast_variable *var, *prev = NULL;
 		AST_LIST_HEAD(, ast_var_t) *varlist;
 		varlist = ast_calloc(1, sizeof(*varlist));
-		variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+		variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
 		if (variablestore && varlist && p->owner) {
 			variablestore->data = varlist;
 			variablestore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -6501,7 +6501,7 @@
 			if (p->owner)
 				ast_log(LOG_ERROR, "Memory allocation error while processing IAX2 variables\n");
 			if (variablestore)
-				ast_channel_datastore_free(variablestore);
+				ast_datastore_free(variablestore);
 			if (varlist)
 				ast_free(varlist);
 		}
@@ -7969,7 +7969,7 @@
 	struct ast_var_t *var;
 
 	if (!variablestore) {
-		variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+		variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
 		if (!variablestore) {
 			ast_log(LOG_ERROR, "Memory allocation error\n");
 			return -1;
@@ -8364,7 +8364,7 @@
 					struct ast_variable *var, *prev = NULL;
 					AST_LIST_HEAD(, ast_var_t) *varlist;
 					varlist = ast_calloc(1, sizeof(*varlist));
-					variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+					variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
 					if (variablestore && varlist) {
 						variablestore->data = varlist;
 						variablestore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -8388,7 +8388,7 @@
 					} else {
 						ast_log(LOG_ERROR, "Memory allocation error while processing IAX2 variables\n");
 						if (variablestore)

[... 2448 lines stripped ...]



More information about the asterisk-commits mailing list