[asterisk-commits] branch north/bug_1082 - r8498 in /team/north/bug_1082: ./ apps/ channels/ cod...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 23 10:34:15 MST 2006


Author: north
Date: Mon Jan 23 11:33:45 2006
New Revision: 8498

URL: http://svn.digium.com/view/asterisk?rev=8498&view=rev
Log:
Merged revisions 8233,8243,8270,8278,8282,8299-8300,8313,8315,8323-8324,8336,8338,8345-8346,8348,8356-8357,8359-8362,8368,8370-8372,8378-8381,8387,8393,8401-8404,8407-8411,8413,8420-8422,8426,8428,8432,8436,8438,8443,8446-8447,8463-8465,8471,8481-8483,8489-8490,8492-8493,8495 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r8233 | russell | 2006-01-18 20:21:12 -0800 (Wed, 18 Jan 2006) | 11 lines

Merged revisions 8232 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8232 | russell | 2006-01-18 23:17:45 -0500 (Wed, 18 Jan 2006) | 3 lines

fix a seg fault due to assuming that space gets allocatted on the stack in the
same order that we declare the variables (issue #6290)

........

................
r8243 | russell | 2006-01-18 20:58:43 -0800 (Wed, 18 Jan 2006) | 11 lines

Merged revisions 8242 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8242 | russell | 2006-01-18 23:56:48 -0500 (Wed, 18 Jan 2006) | 3 lines

fix Message-Account header to use the ip address if the fromdomain 
isn't set (issue #6278)

........

................
r8270 | tilghman | 2006-01-19 10:58:45 -0800 (Thu, 19 Jan 2006) | 2 lines

Deprecate the use of Random in 1.3, 1.4

................
r8278 | tilghman | 2006-01-19 11:18:51 -0800 (Thu, 19 Jan 2006) | 3 lines

Merged revisions 8276 via svnmerge from
/branches/1.2

................
r8282 | oej | 2006-01-19 11:41:06 -0800 (Thu, 19 Jan 2006) | 2 lines

Enable "musicclass" setting for sip peers

................
r8299 | oej | 2006-01-19 14:09:18 -0800 (Thu, 19 Jan 2006) | 2 lines

Doxygen fixes

................
r8300 | oej | 2006-01-19 14:41:55 -0800 (Thu, 19 Jan 2006) | 3 lines

Add support for "musicclass" instead of "musiconhold" to make chan_zap compatible
with other channels.

................
r8313 | oej | 2006-01-19 16:08:36 -0800 (Thu, 19 Jan 2006) | 2 lines

Doxygen updates

................
r8315 | oej | 2006-01-19 16:18:42 -0800 (Thu, 19 Jan 2006) | 2 lines

More doxygen updates

................
r8323 | mogorman | 2006-01-19 17:07:46 -0800 (Thu, 19 Jan 2006) | 11 lines

Merged revisions 8320 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8320 | mogorman | 2006-01-19 19:00:46 -0600 (Thu, 19 Jan 2006) | 3 lines

solved problem with delayreject and iax trunking
bug 4291

........

................
r8324 | russell | 2006-01-19 17:25:12 -0800 (Thu, 19 Jan 2006) | 2 lines

fix version reporting (issue #6292)

................
r8336 | oej | 2006-01-20 06:32:30 -0800 (Fri, 20 Jan 2006) | 4 lines

- Add DOC file about caller ID presentation values
- Add callingpres to sip.conf
- Add reference to README.callingpres from zapata.conf

................
r8338 | kpfleming | 2006-01-20 09:27:51 -0800 (Fri, 20 Jan 2006) | 2 lines

eliminate compiler warnings from recent const-ification

................
r8345 | mattf | 2006-01-20 10:17:46 -0800 (Fri, 20 Jan 2006) | 2 lines

Update config.  Apprently default doesn't always work now.

................
r8346 | mattf | 2006-01-20 10:18:40 -0800 (Fri, 20 Jan 2006) | 2 lines

Change chan_alsa to default open the first sound card device

................
r8348 | russell | 2006-01-20 10:40:24 -0800 (Fri, 20 Jan 2006) | 10 lines

Merged revisions 8347 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8347 | russell | 2006-01-20 13:34:42 -0500 (Fri, 20 Jan 2006) | 2 lines

fix invalid value of prev_q (issue #6302)

........

................
r8356 | russell | 2006-01-20 11:24:42 -0800 (Fri, 20 Jan 2006) | 11 lines

- move ast_strdupa from channel.h to utils.h
- attempt to log an error message if the __builtin_alloca inside of ast_strdupa
  fails.
- document the fact that it is known and intended behavior for ast_strdupa to
  cause Asterisk to crash if the alloca fails
- use __builtin_expect when checking for allocation failure in all of the
  allocation wrappers

New Janitor Project!  Anywhere that we check for a successful allocation after
a call to ast_strdupa is unnecessary and should be removed.

................
r8357 | mattf | 2006-01-20 13:36:33 -0800 (Fri, 20 Jan 2006) | 2 lines

Fix for formats so they give better output on failure conditions. (#6141)

................
r8359 | mattf | 2006-01-20 15:19:49 -0800 (Fri, 20 Jan 2006) | 2 lines

Fix comments in sip.conf (#6134)

................
r8360 | russell | 2006-01-20 15:23:00 -0800 (Fri, 20 Jan 2006) | 2 lines

formatting and doxygen fixes (issue #6300)

................
r8361 | mattf | 2006-01-20 15:28:37 -0800 (Fri, 20 Jan 2006) | 2 lines

fix for codec_gsm on ia64 (#6294)

................
r8362 | russell | 2006-01-20 16:42:25 -0800 (Fri, 20 Jan 2006) | 2 lines

remove some useless checks after calls to ast_strdupa

................
r8368 | russell | 2006-01-20 19:09:01 -0800 (Fri, 20 Jan 2006) | 2 lines

remove optimization where its benefits are negligible

................
r8370 | tilghman | 2006-01-20 21:05:45 -0800 (Fri, 20 Jan 2006) | 2 lines

Bug 6096 - callerid_parse cleanup

................
r8371 | tilghman | 2006-01-20 21:15:56 -0800 (Fri, 20 Jan 2006) | 2 lines

Bug 5515 - Devicestate and API documentation update

................
r8372 | tilghman | 2006-01-20 21:22:18 -0800 (Fri, 20 Jan 2006) | 2 lines

Bug 4872 - Make Asterisk paths available to AGIs via environmental variables

................
r8378 | russell | 2006-01-21 00:01:24 -0800 (Sat, 21 Jan 2006) | 2 lines

remove some useless checks of the result of ast_strdupa

................
r8379 | russell | 2006-01-21 00:13:12 -0800 (Sat, 21 Jan 2006) | 2 lines

remove lots of useless checks of the result of ast_strdupa

................
r8380 | russell | 2006-01-21 00:23:57 -0800 (Sat, 21 Jan 2006) | 2 lines

remove useless checks of the result of ast_strdupa

................
r8381 | russell | 2006-01-21 00:45:39 -0800 (Sat, 21 Jan 2006) | 2 lines

conversions to use allocation wrappers (issue #6277)

................
r8387 | russell | 2006-01-21 09:50:04 -0800 (Sat, 21 Jan 2006) | 3 lines

revert my pass through the tree to remove checks of the result of ast_strdupa
(revisions 8378 through 8381)

................
r8393 | russell | 2006-01-21 10:11:40 -0800 (Sat, 21 Jan 2006) | 3 lines

don't do the memcpy inside of ast_strdupa if we know that __builtin_alloca 
was not successful

................
r8401 | russell | 2006-01-21 12:20:06 -0800 (Sat, 21 Jan 2006) | 3 lines

finish reverting my pass through the tree to remove checks of the result of
ast_strdupa, this one is revision 8362

................
r8402 | tilghman | 2006-01-21 12:32:17 -0800 (Sat, 21 Jan 2006) | 2 lines

Bug 5936 - Cannot AddQueueMember on realtime queue, if queue not yet loaded (different fix than 1.2)

................
r8403 | russell | 2006-01-21 12:57:06 -0800 (Sat, 21 Jan 2006) | 2 lines

on this pass, only remove duplicate log messages

................
r8404 | russell | 2006-01-21 12:58:57 -0800 (Sat, 21 Jan 2006) | 1 line


................
r8407 | russell | 2006-01-21 13:29:06 -0800 (Sat, 21 Jan 2006) | 2 lines

clean up formatting to conform to coding guidelines and fix some typos (issue #6260)

................
r8408 | russell | 2006-01-21 13:50:09 -0800 (Sat, 21 Jan 2006) | 5 lines

- conversion to allocation wrappers
- get rid of some compiler warnings due to usused variables and const-ification
- remove some unnecessary uses of malloc/strncpy/free and replace with ast_strdupa
(based on the patch from issue #6275)

................
r8409 | russell | 2006-01-21 13:57:01 -0800 (Sat, 21 Jan 2006) | 2 lines

oops, don't build app_sql_postgres by default ...

................
r8410 | russell | 2006-01-21 14:09:06 -0800 (Sat, 21 Jan 2006) | 5 lines

- conversions to allocation wrappers
- replace malloc/memset with ast_calloc
- replace malloc/ast_copy_string with ast_strdup
(based on patch from issue #6299)

................
r8411 | russell | 2006-01-21 15:05:19 -0800 (Sat, 21 Jan 2006) | 2 lines

const-ify some fields in the ast_exten and ast_include structures (issue #6270)

................
r8413 | russell | 2006-01-21 15:17:52 -0800 (Sat, 21 Jan 2006) | 1 line


................
r8420 | russell | 2006-01-21 18:06:33 -0800 (Sat, 21 Jan 2006) | 1 line


................
r8421 | russell | 2006-01-21 18:10:19 -0800 (Sat, 21 Jan 2006) | 3 lines

prevent writing outside of the provided workspace when calculating a
substring (issue #6271)

................
r8422 | russell | 2006-01-21 18:23:38 -0800 (Sat, 21 Jan 2006) | 2 lines

add 'show channeltype' CLI command (issue #6149, with small modifications)

................
r8426 | tilghman | 2006-01-21 23:18:02 -0800 (Sat, 21 Jan 2006) | 2 lines

Bug 6148 - Add PARKEDAT variable; also cleaned up application help to fit 80-column screen.

................
r8428 | tilghman | 2006-01-22 00:09:02 -0800 (Sun, 22 Jan 2006) | 2 lines

Bug 6262 - New function STRPTIME

................
r8432 | bweschke | 2006-01-22 07:08:51 -0800 (Sun, 22 Jan 2006) | 2 lines

 Correct some scenarios where CALL_LIMIT could not be getting adjusted properly allowing chan_sip to send calls when it really shouldn't. Bug #6111

................
r8436 | tilghman | 2006-01-22 09:28:42 -0800 (Sun, 22 Jan 2006) | 2 lines

Bug 6312 - Macro janitor

................
r8438 | russell | 2006-01-22 09:53:14 -0800 (Sun, 22 Jan 2006) | 10 lines

Merged revisions 8437 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8437 | russell | 2006-01-22 12:47:13 -0500 (Sun, 22 Jan 2006) | 2 lines

fix MixMonitor crash (issue #6321, probably others)

........

................
r8443 | russell | 2006-01-22 10:42:06 -0800 (Sun, 22 Jan 2006) | 2 lines

eliminate some compiler warnings

................
r8446 | russell | 2006-01-22 11:04:37 -0800 (Sun, 22 Jan 2006) | 1 line


................
r8447 | russell | 2006-01-22 11:09:50 -0800 (Sun, 22 Jan 2006) | 2 lines

fix memory leak from not freeing the list of queue members when freeing a queue

................
r8463 | oej | 2006-01-23 04:19:16 -0800 (Mon, 23 Jan 2006) | 2 lines

Remove javadoc doxygen format...

................
r8464 | oej | 2006-01-23 04:32:43 -0800 (Mon, 23 Jan 2006) | 2 lines

Spelling fix undetected by kpfleming in rev 8150 ;-)

................
r8465 | oej | 2006-01-23 04:44:53 -0800 (Mon, 23 Jan 2006) | 2 lines

Use doxygen for todo's! :-)

................
r8471 | oej | 2006-01-23 05:11:04 -0800 (Mon, 23 Jan 2006) | 3 lines

- Adding some white space from my white space reservoir 
- Fixing some comment formatting (doxygen fix)

................
r8481 | oej | 2006-01-23 08:21:51 -0800 (Mon, 23 Jan 2006) | 2 lines

Re-instate sip_addheader() while waiting for a dialplan function. (Issue 6317)

................
r8482 | oej | 2006-01-23 08:27:01 -0800 (Mon, 23 Jan 2006) | 2 lines

Doxygen update

................
r8483 | oej | 2006-01-23 08:41:48 -0800 (Mon, 23 Jan 2006) | 3 lines

- Debug output fixes
- Whitespace fixes

................
r8489 | oej | 2006-01-23 09:08:19 -0800 (Mon, 23 Jan 2006) | 6 lines

- Change "call" to "dialog" where use of "call" is confusing, since it may be a register transaction or a subscription.
The word dialog is defined as "a peer-to-peer SIP relationship between two UAs that persist for some time" in RFC 3261.

- Whitespace fixes
- Debugging fixes (adding check of option_debug)

................
r8490 | oej | 2006-01-23 09:12:44 -0800 (Mon, 23 Jan 2006) | 3 lines

Finally removing SIPDUMPER that hasn't been used for ages. If anyone needs this for some reason,
please tell me and I'll put it back :-)

................
r8492 | oej | 2006-01-23 09:17:56 -0800 (Mon, 23 Jan 2006) | 2 lines

Doxygen updates

................
r8493 | oej | 2006-01-23 09:19:03 -0800 (Mon, 23 Jan 2006) | 2 lines

Remove more unused defines.

................
r8495 | mogorman | 2006-01-23 09:23:22 -0800 (Mon, 23 Jan 2006) | 3 lines

changed some settings to app_args and some code
cleaning patch 6267

................

Added:
    team/north/bug_1082/doc/README.callingpres
      - copied unchanged from r8495, trunk/doc/README.callingpres
Modified:
    team/north/bug_1082/   (props changed)
    team/north/bug_1082/Makefile
    team/north/bug_1082/apps/Makefile
    team/north/bug_1082/apps/app_authenticate.c
    team/north/bug_1082/apps/app_chanspy.c
    team/north/bug_1082/apps/app_curl.c
    team/north/bug_1082/apps/app_db.c
    team/north/bug_1082/apps/app_dial.c
    team/north/bug_1082/apps/app_dictate.c
    team/north/bug_1082/apps/app_directory.c
    team/north/bug_1082/apps/app_disa.c
    team/north/bug_1082/apps/app_exec.c
    team/north/bug_1082/apps/app_externalivr.c
    team/north/bug_1082/apps/app_festival.c
    team/north/bug_1082/apps/app_hasnewvoicemail.c
    team/north/bug_1082/apps/app_image.c
    team/north/bug_1082/apps/app_macro.c
    team/north/bug_1082/apps/app_meetme.c
    team/north/bug_1082/apps/app_milliwatt.c
    team/north/bug_1082/apps/app_mixmonitor.c
    team/north/bug_1082/apps/app_osplookup.c
    team/north/bug_1082/apps/app_page.c
    team/north/bug_1082/apps/app_parkandannounce.c
    team/north/bug_1082/apps/app_playback.c
    team/north/bug_1082/apps/app_privacy.c
    team/north/bug_1082/apps/app_queue.c
    team/north/bug_1082/apps/app_random.c
    team/north/bug_1082/apps/app_read.c
    team/north/bug_1082/apps/app_readfile.c
    team/north/bug_1082/apps/app_record.c
    team/north/bug_1082/apps/app_sayunixtime.c
    team/north/bug_1082/apps/app_senddtmf.c
    team/north/bug_1082/apps/app_sendtext.c
    team/north/bug_1082/apps/app_setcallerid.c
    team/north/bug_1082/apps/app_skel.c
    team/north/bug_1082/apps/app_sms.c
    team/north/bug_1082/apps/app_sql_postgres.c
    team/north/bug_1082/apps/app_stack.c
    team/north/bug_1082/apps/app_talkdetect.c
    team/north/bug_1082/apps/app_transfer.c
    team/north/bug_1082/apps/app_url.c
    team/north/bug_1082/apps/app_userevent.c
    team/north/bug_1082/apps/app_verbose.c
    team/north/bug_1082/apps/app_voicemail.c
    team/north/bug_1082/apps/app_while.c
    team/north/bug_1082/apps/app_zapras.c
    team/north/bug_1082/ast_expr2.fl
    team/north/bug_1082/ast_expr2.y
    team/north/bug_1082/callerid.c
    team/north/bug_1082/channel.c
    team/north/bug_1082/channels/chan_agent.c
    team/north/bug_1082/channels/chan_alsa.c
    team/north/bug_1082/channels/chan_iax2.c
    team/north/bug_1082/channels/chan_local.c
    team/north/bug_1082/channels/chan_mgcp.c
    team/north/bug_1082/channels/chan_sip.c
    team/north/bug_1082/channels/chan_zap.c
    team/north/bug_1082/codecs/codec_a_mu.c
    team/north/bug_1082/codecs/codec_adpcm.c
    team/north/bug_1082/codecs/codec_alaw.c
    team/north/bug_1082/codecs/codec_g723_1.c
    team/north/bug_1082/codecs/codec_g726.c
    team/north/bug_1082/codecs/codec_gsm.c
    team/north/bug_1082/codecs/codec_ilbc.c
    team/north/bug_1082/codecs/codec_lpc10.c
    team/north/bug_1082/codecs/codec_speex.c
    team/north/bug_1082/codecs/codec_ulaw.c
    team/north/bug_1082/codecs/gsm/Makefile
    team/north/bug_1082/config.c
    team/north/bug_1082/configs/alsa.conf.sample
    team/north/bug_1082/configs/queues.conf.sample
    team/north/bug_1082/configs/sip.conf.sample
    team/north/bug_1082/configs/zapata.conf.sample
    team/north/bug_1082/devicestate.c
    team/north/bug_1082/doc/README.variables
    team/north/bug_1082/enum.c
    team/north/bug_1082/formats/format_pcm.c
    team/north/bug_1082/formats/format_pcm_alaw.c
    team/north/bug_1082/funcs/func_cdr.c
    team/north/bug_1082/funcs/func_cut.c
    team/north/bug_1082/funcs/func_logic.c
    team/north/bug_1082/funcs/func_math.c
    team/north/bug_1082/funcs/func_md5.c
    team/north/bug_1082/funcs/func_odbc.c
    team/north/bug_1082/funcs/func_rand.c
    team/north/bug_1082/funcs/func_strings.c
    team/north/bug_1082/include/asterisk/astosp.h
    team/north/bug_1082/include/asterisk/channel.h
    team/north/bug_1082/include/asterisk/utils.h
    team/north/bug_1082/logger.c
    team/north/bug_1082/pbx.c
    team/north/bug_1082/res/res_agi.c
    team/north/bug_1082/res/res_crypto.c
    team/north/bug_1082/res/res_features.c
    team/north/bug_1082/res/res_indications.c
    team/north/bug_1082/res/res_monitor.c
    team/north/bug_1082/res/res_musiconhold.c
    team/north/bug_1082/res/res_osp.c
    team/north/bug_1082/udptl.c

Propchange: team/north/bug_1082/
------------------------------------------------------------------------------
--- svnmerge-blocked (original)
+++ svnmerge-blocked Mon Jan 23 11:33:45 2006
@@ -1,1 +1,1 @@
-/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112
+/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112,8394,8412,8418,8445

Propchange: team/north/bug_1082/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 23 11:33:45 2006
@@ -1,1 +1,1 @@
-/trunk:1-8216
+/trunk:1-8495

Modified: team/north/bug_1082/Makefile
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/Makefile?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/Makefile (original)
+++ team/north/bug_1082/Makefile Mon Jan 23 11:33:45 2006
@@ -106,7 +106,7 @@
 # Detect the busy signal looking only at tone lengths
 # For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
 BUSYDETECT+= #-DBUSYDETECT_TONEONLY
-# Enforce the detection of busy singal (get rid of false hangups)
+# Enforce the detection of busy signal (get rid of false hangups)
 # Don't use together with -DBUSYDETECT_TONEONLY
 BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
 

Modified: team/north/bug_1082/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/Makefile?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/Makefile (original)
+++ team/north/bug_1082/apps/Makefile Mon Jan 23 11:33:45 2006
@@ -96,7 +96,7 @@
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
 
 app_sql_postgres.o: app_sql_postgres.c
-	$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
+	$(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
 
 app_sql_postgres.so: app_sql_postgres.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq

Modified: team/north/bug_1082/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_authenticate.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_authenticate.c (original)
+++ team/north/bug_1082/apps/app_authenticate.c Mon Jan 23 11:33:45 2006
@@ -128,9 +128,7 @@
 		}
 	}
 	
-	argcopy = ast_strdupa(data);
-	if (!argcopy) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(argcopy = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_chanspy.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_chanspy.c (original)
+++ team/north/bug_1082/apps/app_chanspy.c Mon Jan 23 11:33:45 2006
@@ -383,10 +383,8 @@
 	struct ast_flags flags;
 	signed char zero_volume = 0;
 
-	if (!(args = ast_strdupa((char *)data))) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(args = ast_strdupa(data)))
 		return -1;
-	}
 
 	LOCAL_USER_ADD(u);
 

Modified: team/north/bug_1082/apps/app_curl.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_curl.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_curl.c (original)
+++ team/north/bug_1082/apps/app_curl.c Mon Jan 23 11:33:45 2006
@@ -128,9 +128,7 @@
 
 	LOCAL_USER_ACF_ADD(u);
 
-	info = ast_strdupa(data);
-	if (!info) {
-		ast_log(LOG_ERROR, "Out of memory\n");
+	if (!(info = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return buf;
 	}

Modified: team/north/bug_1082/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_db.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_db.c (original)
+++ team/north/bug_1082/apps/app_db.c Mon Jan 23 11:33:45 2006
@@ -75,9 +75,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	argv = ast_strdupa(data);
-	if (!argv) {
-		ast_log(LOG_ERROR, "Memory allocation failed\n");
+	if (!(argv = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return 0;
 	}
@@ -121,9 +119,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	argv = ast_strdupa(data);
-	if (!argv) {
-		ast_log (LOG_ERROR, "Memory allocation failed\n");
+	if (!(argv = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return 0;
 	}

Modified: team/north/bug_1082/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_dial.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_dial.c (original)
+++ team/north/bug_1082/apps/app_dial.c Mon Jan 23 11:33:45 2006
@@ -787,7 +787,6 @@
 	LOCAL_USER_ADD(u);
 
 	if (!(parse = ast_strdupa(data))) {
-		ast_log(LOG_WARNING, "Memory allocation failure\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
@@ -1627,9 +1626,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	announce = ast_strdupa(data);	
-	if (!announce) {	
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(announce = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_dictate.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_dictate.c (original)
+++ team/north/bug_1082/apps/app_dictate.c Mon Jan 23 11:33:45 2006
@@ -110,11 +110,8 @@
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
 	if (!ast_strlen_zero(data)) {
-		parse = ast_strdupa(data);
-		if (!parse) {
-			ast_log(LOG_ERROR, "Out of memory!\n");
+		if (!(parse = ast_strdupa(data)))
 			return -1;
-		}
 		AST_STANDARD_APP_ARGS(args, parse);
 	} else
 		args.argc = 0;

Modified: team/north/bug_1082/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_directory.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_directory.c (original)
+++ team/north/bug_1082/apps/app_directory.c Mon Jan 23 11:33:45 2006
@@ -431,10 +431,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
-
-	if (!parse) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(parse = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1; 
 	}

Modified: team/north/bug_1082/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_disa.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_disa.c (original)
+++ team/north/bug_1082/apps/app_disa.c Mon Jan 23 11:33:45 2006
@@ -161,9 +161,7 @@
 	ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
 	ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
 
-	tmp = ast_strdupa(data);
-	if (!tmp) {
-		ast_log(LOG_ERROR, "Out of memory\n");
+	if (!(tmp = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}	

Modified: team/north/bug_1082/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_exec.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_exec.c (original)
+++ team/north/bug_1082/apps/app_exec.c Mon Jan 23 11:33:45 2006
@@ -73,8 +73,7 @@
 
 	/* Check and parse arguments */
 	if (data) {
-		s = ast_strdupa((char *)data);
-		if (s) {
+		if ((s = ast_strdupa(data))) {
 			appname = strsep(&s, "(");
 			if (s) {
 				endargs = strrchr(s, ')');
@@ -91,10 +90,8 @@
 					res = -1;
 				}
 			}
-		} else {
-			ast_log(LOG_ERROR, "Out of memory\n");
+		} else
 			res = -1;
-		}
 	}
 
 	LOCAL_USER_REMOVE(u);

Modified: team/north/bug_1082/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_externalivr.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_externalivr.c (original)
+++ team/north/bug_1082/apps/app_externalivr.c Mon Jan 23 11:33:45 2006
@@ -271,9 +271,7 @@
 		goto exit;
 	}
 
-	buf = ast_strdupa(data);
-	if (!buf) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(buf = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_festival.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_festival.c (original)
+++ team/north/bug_1082/apps/app_festival.c Mon Jan 23 11:33:45 2006
@@ -339,9 +339,7 @@
 		festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
 	}
 	
-	data = ast_strdupa(vdata);
-	if (!data) {
-		ast_log(LOG_ERROR, "Out of memery\n");
+	if (!(data = ast_strdupa(vdata))) {
 		ast_config_destroy(cfg);
 		LOCAL_USER_REMOVE(u);
 		return -1;

Modified: team/north/bug_1082/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_hasnewvoicemail.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_hasnewvoicemail.c (original)
+++ team/north/bug_1082/apps/app_hasnewvoicemail.c Mon Jan 23 11:33:45 2006
@@ -129,9 +129,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	input = ast_strdupa((char *)data);
-	if (! input) {
-		ast_log(LOG_ERROR, "Out of memory error\n");
+	if (!(input = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
@@ -193,9 +191,7 @@
 
 	buf[0] = '\0';
 
-	argsstr = ast_strdupa(data);
-	if (!argsstr) {
-		ast_log(LOG_ERROR, "Out of memory");
+	if (!(argsstr = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return buf;
 	}

Modified: team/north/bug_1082/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_image.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_image.c (original)
+++ team/north/bug_1082/apps/app_image.c Mon Jan 23 11:33:45 2006
@@ -79,7 +79,6 @@
 	LOCAL_USER_ADD(u);
 
 	if (!(parse = ast_strdupa(data))) {
-		ast_log(LOG_WARNING, "Memory Error!\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_macro.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_macro.c (original)
+++ team/north/bug_1082/apps/app_macro.c Mon Jan 23 11:33:45 2006
@@ -307,9 +307,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	expr = ast_strdupa(data);
-	if (!expr) {
-		ast_log(LOG_ERROR, "Out of Memory!\n");
+	if (!(expr = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_meetme.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_meetme.c (original)
+++ team/north/bug_1082/apps/app_meetme.c Mon Jan 23 11:33:45 2006
@@ -1778,11 +1778,8 @@
 				if (strcasecmp(var->name, "conf"))
 					continue;
 				
-				parse = ast_strdupa(var->value);
-				if (!parse) {
-					ast_log(LOG_ERROR, "Out of Memory!\n");
+				if (!(parse = ast_strdupa(var->value)))
 					return NULL;
-				}
 				
 				AST_STANDARD_APP_ARGS(args, parse);
 				if (!strcasecmp(args.confno, confno)) {
@@ -1817,7 +1814,7 @@
 	return cnf;
 }
 
-/*--- count_exec: The MeetmeCount application */
+/*! \brief The MeetmeCount application */
 static int count_exec(struct ast_channel *chan, void *data)
 {
 	struct localuser *u;
@@ -1838,9 +1835,7 @@
 
 	LOCAL_USER_ADD(u);
 	
-	localdata = ast_strdupa(data);
-	if (!localdata) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(localdata = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
@@ -1867,7 +1862,7 @@
 	return res;
 }
 
-/*--- conf_exec: The meetme() application */
+/*! \brief The meetme() application */
 static int conf_exec(struct ast_channel *chan, void *data)
 {
 	int res=-1;
@@ -1987,8 +1982,6 @@
 										}
 									}
 								}
-							} else {
-								ast_log(LOG_ERROR, "Out of memory\n");
 							}
 						}
 						var = var->next;
@@ -2137,7 +2130,7 @@
 	return NULL;
 }
 
-/*--- admin_exec: The MeetMeadmin application */
+/*! \brief The MeetMeadmin application */
 /* MeetMeAdmin(confno, command, caller) */
 static int admin_exec(struct ast_channel *chan, void *data) {
 	char *params;

Modified: team/north/bug_1082/apps/app_milliwatt.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_milliwatt.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_milliwatt.c (original)
+++ team/north/bug_1082/apps/app_milliwatt.c Mon Jan 23 11:33:45 2006
@@ -72,30 +72,29 @@
 static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
 {
 	struct ast_frame wf;
-	unsigned char waste[AST_FRIENDLY_OFFSET];
-	unsigned char buf[640];
+	unsigned char buf[AST_FRIENDLY_OFFSET + 640];
 	int i,*indexp = (int *) data;
 
-	if (len > sizeof(buf))
+	if (len + AST_FRIENDLY_OFFSET > sizeof(buf))
 	{
-		ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)sizeof(buf),len);
-		len = sizeof(buf);
+		ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)(sizeof(buf) - AST_FRIENDLY_OFFSET),len);
+		len = sizeof(buf) - AST_FRIENDLY_OFFSET;
 	}
-	waste[0] = 0; /* make compiler happy */
 	wf.frametype = AST_FRAME_VOICE;
 	wf.subclass = AST_FORMAT_ULAW;
 	wf.offset = AST_FRIENDLY_OFFSET;
 	wf.mallocd = 0;
-	wf.data = buf;
+	wf.data = buf + AST_FRIENDLY_OFFSET;
 	wf.datalen = len;
 	wf.samples = wf.datalen;
 	wf.src = "app_milliwatt";
 	wf.delivery.tv_sec = 0;
 	wf.delivery.tv_usec = 0;
+	wf.prev = wf.next = NULL;
 	/* create a buffer containing the digital milliwatt pattern */
 	for(i = 0; i < len; i++)
 	{
-		buf[i] = digital_milliwatt[(*indexp)++];
+		buf[AST_FRIENDLY_OFFSET + i] = digital_milliwatt[(*indexp)++];
 		*indexp &= 7;
 	}
 	if (ast_write(chan,&wf) < 0)

Modified: team/north/bug_1082/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_mixmonitor.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_mixmonitor.c (original)
+++ team/north/bug_1082/apps/app_mixmonitor.c Mon Jan 23 11:33:45 2006
@@ -334,7 +334,6 @@
 	LOCAL_USER_ADD(u);
 
 	if (!(parse = ast_strdupa(data))) {
-		ast_log(LOG_WARNING, "Memory Error!\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_osplookup.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_osplookup.c (original)
+++ team/north/bug_1082/apps/app_osplookup.c Mon Jan 23 11:33:45 2006
@@ -138,9 +138,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	temp = ast_strdupa(data);
-	if (!temp) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(temp = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
@@ -201,9 +199,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	temp = ast_strdupa(data);
-	if (!temp) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(temp = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
@@ -275,9 +271,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	temp = ast_strdupa(data);
-	if (!temp) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(temp = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_page.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_page.c (original)
+++ team/north/bug_1082/apps/app_page.c Mon Jan 23 11:33:45 2006
@@ -163,9 +163,7 @@
 		return -1;
 	};
 
-	options = ast_strdupa(data);
-	if (!options) {
-		ast_log(LOG_ERROR, "Out of memory\n");
+	if (!(options = ast_strdupa(data))) {
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}

Modified: team/north/bug_1082/apps/app_parkandannounce.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_parkandannounce.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_parkandannounce.c (original)
+++ team/north/bug_1082/apps/app_parkandannounce.c Mon Jan 23 11:33:45 2006
@@ -59,12 +59,21 @@
 
 static char *descrip =
 "  ParkAndAnnounce(announce:template|timeout|dial|[return_context]):\n"
-"Park a call into the parkinglot and announce the call over the console.\n"
-"announce template: colon separated list of files to announce, the word PARKED\n"
-"                   will be replaced by a say_digits of the ext the call is parked in\n"
-"timeout: time in seconds before the call returns into the return context.\n"
-"dial: The app_dial style resource to call to make the announcement. Console/dsp calls the console.\n"
-"return_context: the goto style label to jump the call back into after timeout. default=prio+1\n";
+"Park a call into the parkinglot and announce the call to another channel.\n"
+"\n"
+"announce template: Colon-separated list of files to announce.  The word PARKED\n"
+"                   will be replaced by a say_digits of the extension in which\n"
+"                   the call is parked.\n"
+"timeout:           Time in seconds before the call returns into the return\n"
+"                   context.\n"
+"dial:              The app_dial style resource to call to make the\n"
+"                   announcement.  Console/dsp calls the console.\n"
+"return_context:    The goto-style label to jump the call back into after\n"
+"                   timeout.  Default <priority+1>.\n"
+"\n"
+"The variable ${PARKEDAT} will contain the parking extension into which the\n"
+"call was placed.  Use with the Local channel to allow the dialplan to make\n"
+"use of this information.\n";
 
 
 STANDARD_LOCAL_USER;
@@ -79,6 +88,7 @@
 	char *working, *context, *exten, *priority, *dial, *dialtech, *dialstr;
 	char *template, *tpl_working, *tpl_current;
 	char *tmp[100];
+	char buf[13];
 	int looptemp=0,i=0;
 	char *s,*orig_s;
 
@@ -183,8 +193,10 @@
 
 	/* Now place the call to the extention */
 
+	snprintf(buf, sizeof(buf), "%d", lot);
 	memset(&oh, 0, sizeof(oh));
 	oh.parent_channel = chan;
+	oh.vars = ast_variable_new("_PARKEDAT", buf);
 	dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
 
 	if(dchan) {

Modified: team/north/bug_1082/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_playback.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_playback.c (original)
+++ team/north/bug_1082/apps/app_playback.c Mon Jan 23 11:33:45 2006
@@ -89,11 +89,8 @@
 		return -1;
 	}
 
-	tmp = ast_strdupa(data);
-	if (!tmp) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
+	if (!(tmp = ast_strdupa(data)))
 		return -1;	
-	}
 
 	LOCAL_USER_ADD(u);
 	AST_STANDARD_APP_ARGS(args, tmp);

Modified: team/north/bug_1082/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_privacy.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_privacy.c (original)
+++ team/north/bug_1082/apps/app_privacy.c Mon Jan 23 11:33:45 2006
@@ -117,9 +117,7 @@
 
 		if (!ast_strlen_zero((char *)data))
 		{
-			parse = ast_strdupa(data);
-			if (!parse) {
-				ast_log(LOG_ERROR, "Out of memory!\n");
+			if (!(parse = ast_strdupa(data))) {
 				LOCAL_USER_REMOVE(u);
 				return -1;
 			}

Modified: team/north/bug_1082/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/north/bug_1082/apps/app_queue.c?rev=8498&r1=8497&r2=8498&view=diff
==============================================================================
--- team/north/bug_1082/apps/app_queue.c (original)
+++ team/north/bug_1082/apps/app_queue.c Mon Jan 23 11:33:45 2006
@@ -368,11 +368,10 @@
 	
 	struct member *members;		/*!< Head of the list of members */
 	struct queue_ent *head;		/*!< Head of the list of callers */
-	struct ast_call_queue *next;	/*!< Next call queue */
+	AST_LIST_ENTRY(ast_call_queue) list;	/*!< Next call queue */
 };
 
-static struct ast_call_queue *queues = NULL;
-AST_MUTEX_DEFINE_STATIC(qlock);
+static AST_LIST_HEAD_STATIC(queues, ast_call_queue);
 
 static int set_member_paused(char *queuename, char *interface, int paused);
 
@@ -482,8 +481,8 @@
 	}
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
-	ast_mutex_lock(&qlock);
-	for (q = queues; q; q = q->next) {
+	AST_LIST_LOCK(&queues);
+	AST_LIST_TRAVERSE(&queues, q, list) {
 		ast_mutex_lock(&q->lock);
 		cur = q->members;
 		while(cur) {
@@ -509,7 +508,7 @@
 		}
 		ast_mutex_unlock(&q->lock);
 	}
-	ast_mutex_unlock(&qlock);
+	AST_LIST_UNLOCK(&queues);
 	free(sc);
 	return NULL;
 }
@@ -791,29 +790,48 @@
 	}
 }
 
+static void free_members(struct ast_call_queue *q, int all)
+{
+	/* Free non-dynamic members */
+	struct member *curm, *next, *prev = NULL;
+
+	for (curm = q->members; curm; curm = next) {
+		next = curm->next;
+		if (all || !curm->dynamic) {
+			if (prev)
+				prev->next = next;
+			else
+				q->members = next;
+			free(curm);
+		} else 
+			prev = curm;
+	}
+}
+
+static void destroy_queue(struct ast_call_queue *q)
+{
+	free_members(q, 1);
+	ast_mutex_destroy(&q->lock);
+	free(q);
+}
 
 /*!\brief Reload a single queue via realtime.
    \return Return the queue, or NULL if it doesn't exist.
-   \note Should be called with the global qlock locked.
-   When found, the queue is returned with q->lock locked. */
+   \note Should be called with the global qlock locked. */
 static struct ast_call_queue *find_queue_by_name_rt(const char *queuename, struct ast_variable *queue_vars, struct ast_config *member_config)
 {
 	struct ast_variable *v;
-	struct ast_call_queue *q, *prev_q;
+	struct ast_call_queue *q;
 	struct member *m, *prev_m, *next_m;
 	char *interface;
 	char *tmp, *tmp_name;
 	char tmpbuf[64];	/* Must be longer than the longest queue param name. */
 

[... 9922 lines stripped ...]


More information about the asterisk-commits mailing list