[asterisk-commits] murf: branch murf/bug_7638 r48440 - in /team/murf/bug_7638: ./ apps/ build_to...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Dec 13 00:30:45 MST 2006


Author: murf
Date: Wed Dec 13 01:30:45 2006
New Revision: 48440

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48440
Log:
Merged revisions 48299-48300,48302-48303,48305-48307,48318,48324-48325,48327,48332,48338,48350-48351,48358-48360,48364-48365,48373,48376,48378,48380,48383-48384,48388-48390,48392,48397,48400,48402,48408-48410,48415-48417,48432-48433 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r48299 | russell | 2006-12-06 00:15:16 -0700 (Wed, 06 Dec 2006) | 3 lines

Make the "usage" member of the ast_cli_entry struct const to resolve a compiler
warning.

................
r48300 | russell | 2006-12-06 00:16:09 -0700 (Wed, 06 Dec 2006) | 2 lines

Instead of creating an unused instance of an unnamed enum, give it a name.

................
r48302 | russell | 2006-12-06 00:23:32 -0700 (Wed, 06 Dec 2006) | 2 lines

Constify a bunch of the usage strings for CLI commands.

................
r48303 | russell | 2006-12-06 00:28:56 -0700 (Wed, 06 Dec 2006) | 2 lines

Staticize one, and Constify a bunch of usage strings for CLI commands.

................
r48305 | russell | 2006-12-06 00:31:28 -0700 (Wed, 06 Dec 2006) | 2 lines

Constify a bunch of usage strings for CLI commands.

................
r48306 | russell | 2006-12-06 00:35:31 -0700 (Wed, 06 Dec 2006) | 2 lines

Constify a bunch of usage strings for CLI commands.

................
r48307 | russell | 2006-12-06 00:39:39 -0700 (Wed, 06 Dec 2006) | 3 lines

Resolve some pointer signedness compiler warnings in app_osplookup, and
constify a bunch of usage strings for CLI commands.

................
r48318 | oej | 2006-12-06 05:34:58 -0700 (Wed, 06 Dec 2006) | 3 lines

Don't send Contact in SIP Messages (imported from 1.2/1.4).
Reported by Gunnar at Omnitor.

................
r48324 | rizzo | 2006-12-06 09:17:57 -0700 (Wed, 06 Dec 2006) | 14 lines

Make externally visible some generic code useful to create
and implement services over tcp and/or tcp-tls.
 
This commit is nothing more than moving structure definitions
(and documentation) from main/http.c to include/asterisk/http.h
(temporary location until we find a better place), and removing the
'static' qualifier from server_root() and server_start().
 
The name change (adding the ast_ prefix as a minimum, and then
possibly a more meaningful name) is postponed to future commits.

Does not apply to other versions of asterisk.


................
r48325 | russell | 2006-12-06 09:19:01 -0700 (Wed, 06 Dec 2006) | 19 lines

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

................
r48323 | russell | 2006-12-06 11:15:45 -0500 (Wed, 06 Dec 2006) | 11 lines

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

........
r48322 | russell | 2006-12-06 11:05:54 -0500 (Wed, 06 Dec 2006) | 3 lines

Fix the name of the rtignoreregexpire option in the sample configuration file.
(issue #8526, arkadia)

........

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

................
r48327 | oej | 2006-12-06 09:54:27 -0700 (Wed, 06 Dec 2006) | 2 lines

Handle multiple 487's correctly

................
r48332 | rizzo | 2006-12-06 11:45:19 -0700 (Wed, 06 Dec 2006) | 23 lines

Part of the transformations necessary to add TLS support,
as described in
http://lists.digium.com/pipermail/asterisk-dev/2006-December/025213.html

In detail, this commit does the following:

b) change the function get_input() to use fread() instead of read()
   to collect the data. One can still do the ast_wait_for_input() on
   the original descriptor returned by accept().

c) change the function send_string() to work on the FILE *.
   As a side effect, this change now really guarantees that
   we don't spend more than "writetimeout" milliseconds on
   each line sent.

d) modify the function action_command() so that it creates a
   temporary file descriptor to be passed to ast_cli_command(),
   and then read back the data from the temp file and write it
   to the output with send_string(). The code is similar to
   what is done in generic_http_callback() to support AMI-over-HTTP.



................
r48338 | rizzo | 2006-12-06 13:46:01 -0700 (Wed, 06 Dec 2006) | 11 lines

remove duplicated code to start the server threads, use
the infrastructure exposed in http.c earlier today.

As a bonus, now we can restart the session on a different
port just reloading the module.

On passing, fix a bug in the handling of 'enabled' in the configuration
file - previously, a missing "enabled=" line in manager.conf meant
"whatever the state was before" instead of a specific value.


................
r48350 | murf | 2006-12-07 09:03:56 -0700 (Thu, 07 Dec 2006) | 115 lines

Merged revisions 47986,47995,47997,48001,48003-48004,48008-48014,48016,48018-48019 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r47986 | oej | 2006-11-24 07:00:19 -0700 (Fri, 24 Nov 2006) | 6 lines

Doxygen update
- Document cause codes
- Document a bit more on channel variables - global, predefined and local
- Fix some doxygen in channel.h. Adding one comment for two definitions does not
  work. They won't be copied to each.

................
r47995 | murf | 2006-11-24 10:40:49 -0700 (Fri, 24 Nov 2006) | 1 line

This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
................
r47997 | murf | 2006-11-24 11:17:25 -0700 (Fri, 24 Nov 2006) | 1 line

removed the svnmerge-integrated property from trunk; it's confusing svnmerge in newly created branches
................
r48001 | rizzo | 2006-11-25 02:02:42 -0700 (Sat, 25 Nov 2006) | 5 lines

set pointers to NULL after freeing memory to avoid multiple free()

probably 1.4/1.2 issue as well if someone can look into that.


................
r48003 | oej | 2006-11-25 02:45:57 -0700 (Sat, 25 Nov 2006) | 9 lines

- Adding comment on suspicious memory allocation. Seems like it's never freed, but I don't
  have a clear understanding of the frame allocation/deallocation, so I just mark this
  for investigation. (Reported by Ed Guy). We're trying to see if a free() hurts...

- Doxygen comments on p2p rtp bridge stuff.  I am a bit worried about shortcutting
  rtcp this way, but will need feedback from rtcp gurus. This should work for 
  video calls too, and possibly UDPTL.


................
r48004 | oej | 2006-11-25 02:48:30 -0700 (Sat, 25 Nov 2006) | 2 lines

Changing ERROR to lesser level. Imported from 1.2/1.4

................
r48008 | rizzo | 2006-11-25 10:37:04 -0700 (Sat, 25 Nov 2006) | 7 lines

generalize a bit the functions used to create an tcp socket
and then run a service on it.
The code in manager.c does essentially the same things,
so we will be able to reuse the code in here (probably
moving it to netsock.c or another appropriate library file).


................
r48009 | mattf | 2006-11-25 13:30:04 -0700 (Sat, 25 Nov 2006) | 1 line

Updates to show linkset command
................
r48010 | mattf | 2006-11-25 13:54:38 -0700 (Sat, 25 Nov 2006) | 2 lines

Add ss7 show linkset command

................
r48011 | mattf | 2006-11-25 14:32:33 -0700 (Sat, 25 Nov 2006) | 1 line

Make sure we don't send a group reset on a group larger than 32 CICs
................
r48012 | mattf | 2006-11-25 14:35:23 -0700 (Sat, 25 Nov 2006) | 1 line

bug fix
................
r48013 | mattf | 2006-11-25 14:46:58 -0700 (Sat, 25 Nov 2006) | 1 line

Make compiler happier
................
r48014 | mattf | 2006-11-25 14:50:42 -0700 (Sat, 25 Nov 2006) | 1 line

Little fix so we use the right message
................
r48016 | murf | 2006-11-25 17:15:42 -0700 (Sat, 25 Nov 2006) | 9 lines

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

........
r48015 | murf | 2006-11-25 17:01:34 -0700 (Sat, 25 Nov 2006) | 1 line

A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
........

................
r48018 | murf | 2006-11-25 17:31:13 -0700 (Sat, 25 Nov 2006) | 9 lines

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

........
r48017 | murf | 2006-11-25 17:26:16 -0700 (Sat, 25 Nov 2006) | 1 line

might as well also document the raw values of the flag vars
........

................
r48019 | russell | 2006-11-25 23:55:33 -0700 (Sat, 25 Nov 2006) | 6 lines

- Add some comments on thread storage with a brief explanation of what it is
  as well as what the motivation is for using it.
- Add a comment by the declaration of ast_inet_ntoa() noting that this function
  is not reentrant, and the result of a previous call to the function is no
  longer valid after calling it again.

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

................
r48351 | rizzo | 2006-12-07 09:42:29 -0700 (Thu, 07 Dec 2006) | 19 lines

- Generalize the function ssl_setup() so that the certificate info
  are passed as an argument.

- Update the code in main/http.c to use the new interface
  (the diff is large but mostly mechanical, due to the name change of
  several variables);

- And since now it is trivial, implement "AMI over TLS", and document
  the possible options in manager.conf

- And since the test client (openssl s_client -connect host:port )
  does not generate \r\n as a line terminator, make get_input()
  also accept just a \n as a line terminator (Mac users: do you
  also need the \r-only version ?)
 
The option parsing in manager.conf is not very efficient, and needs
to be cleaned up and made similar to what we have in http.conf


................
r48358 | russell | 2006-12-07 11:21:21 -0700 (Thu, 07 Dec 2006) | 19 lines

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

................
r48357 | russell | 2006-12-07 13:17:28 -0500 (Thu, 07 Dec 2006) | 11 lines

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

........
r48356 | russell | 2006-12-07 13:14:13 -0500 (Thu, 07 Dec 2006) | 3 lines

Ensure that the file position is not incremented beyond the total number of
files available for playback.  (issue #8539, ulogic)

........

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

................
r48359 | russell | 2006-12-08 22:04:38 -0700 (Fri, 08 Dec 2006) | 6 lines

- Fix a few spelling mistakes
- Use sizeof() to pass an array size to a function
- Use a single bit for a variable in the chan_iax2_pvt stuct since that is all
  it needs.
- Add some comments about the iaxs, iaxl, and lastused arrays.

................
r48360 | russell | 2006-12-09 00:10:55 -0700 (Sat, 09 Dec 2006) | 11 lines

chan_iax2 has an extremely large function, socket_process(), to handle incoming
frames.  The function, before this commit, was roughly 1400 lines long.  So, I
am working on breaking this up into functions so that the code is easier to
follow and debug.  Also, I will be committing these changes in chunks as I do
them to ease tracking down any potentially introduced problems.

Break out roughly 150 lines from socket_process() and introduce a new function, 
socket_process_meta() which handles the parsing of an incoming meta frame.
Also, restructure some of this code a bit to reduce the deep nesting that was
in this code.

................
r48364 | russell | 2006-12-09 09:04:06 -0700 (Sat, 09 Dec 2006) | 16 lines

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

........
r48363 | russell | 2006-12-09 10:59:42 -0500 (Sat, 09 Dec 2006) | 8 lines

Use locking when accessing the registrations list.  This list is not actually
used very often, so the likelihood of there being a problem is pretty small,
but still possible.  For example, if the CLI command to list the registrations
was called at the same time that a reload was occurring and the registrations
list was getting destroyed and rebuilt, a crash could occur.

In passing, go ahead and convert this list to use the linked list macros.

........

................
r48365 | russell | 2006-12-09 09:44:41 -0700 (Sat, 09 Dec 2006) | 2 lines

convert the thread IO state and type to use enums.

................
r48373 | murf | 2006-12-09 20:14:27 -0700 (Sat, 09 Dec 2006) | 17 lines

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

................
r48372 | murf | 2006-12-09 20:04:18 -0700 (Sat, 09 Dec 2006) | 9 lines

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

........
r48371 | murf | 2006-12-09 19:14:13 -0700 (Sat, 09 Dec 2006) | 1 line

This version applies the patch suggested by stevens in bug 7836 (make inbound channel RINGING state consistent with other channels).
........

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

................
r48376 | tilghman | 2006-12-10 17:52:19 -0700 (Sun, 10 Dec 2006) | 21 lines

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

................
r48375 | tilghman | 2006-12-10 18:47:21 -0600 (Sun, 10 Dec 2006) | 13 lines

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

........
r48374 | tilghman | 2006-12-10 18:33:59 -0600 (Sun, 10 Dec 2006) | 5 lines

When doing a fork() and exec(), two problems existed (Issue 8086):
1) Ignored signals stayed ignored after the exec().
2) Signals could possibly fire between the fork() and exec(), causing Asterisk
signal handlers within the child to execute, which caused nasty race conditions.

........

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

................
r48378 | file | 2006-12-10 22:01:37 -0700 (Sun, 10 Dec 2006) | 10 lines

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

........
r48377 | file | 2006-12-10 23:57:38 -0500 (Sun, 10 Dec 2006) | 2 lines

Don't access the conference structure after it has been freed.

........

................
r48380 | file | 2006-12-10 22:34:53 -0700 (Sun, 10 Dec 2006) | 10 lines

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

........
r48379 | file | 2006-12-11 00:30:01 -0500 (Mon, 11 Dec 2006) | 2 lines

Use the correct API call to say a device state changed. (Yes, I'm a nub.)

........

................
r48383 | file | 2006-12-10 22:38:57 -0700 (Sun, 10 Dec 2006) | 10 lines

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

........
r48381 | file | 2006-12-11 00:36:45 -0500 (Mon, 11 Dec 2006) | 2 lines

Merge in my latest RTP changes. Break out RTP and RTCP callback functions so they no longer share a common one.

........

................
r48384 | tilghman | 2006-12-10 22:40:38 -0700 (Sun, 10 Dec 2006) | 10 lines

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

........
r48382 | tilghman | 2006-12-10 23:37:09 -0600 (Sun, 10 Dec 2006) | 2 lines

STRFTIME() does not actually require an argument (issue 8540)

........

................
r48388 | murf | 2006-12-11 10:00:36 -0700 (Mon, 11 Dec 2006) | 1 line

This update fixes the problem reported in bug 8551; that ast_app_getdata() behaves differently in trunk for the case of a null prompt.
................
r48389 | rizzo | 2006-12-11 11:11:58 -0700 (Mon, 11 Dec 2006) | 13 lines

make sure the argument to ast_malloc() is > 0.

Long explaination:

The behaviour of the underlying malloc(0) differs depending on the
operating system.  Some return NULL (SysV behaviour); some still
allocate a small chunk of memory and return a valid pointer (e.g.
traditional BSD); some (e.g. FreeBSD 6.x) return a non-null pointer
that causes a memory fault if used, even just for reading.

Given the above variety, better never call malloc(0).


................
r48390 | mogorman | 2006-12-11 14:04:41 -0700 (Mon, 11 Dec 2006) | 3 lines

add support for dynamic channel creation and destruction, and
show transcoder to show number of channels in use.

................
r48392 | file | 2006-12-11 14:35:28 -0700 (Mon, 11 Dec 2006) | 10 lines

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

........
r48391 | file | 2006-12-11 16:31:23 -0500 (Mon, 11 Dec 2006) | 2 lines

Return non-existant callerid handling to that which it was before. In 1.4 and trunk callerid can be allocated but not have any contents so we have to use ast_strlen_zero before passing it to the relevant functions. (issue #8567 reported by pabelanger)

........

................
r48397 | mogorman | 2006-12-11 15:31:20 -0700 (Mon, 11 Dec 2006) | 20 lines

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

................
r48396 | mogorman | 2006-12-11 16:11:35 -0600 (Mon, 11 Dec 2006) | 12 lines

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

........
r48394 | mogorman | 2006-12-11 15:55:43 -0600 (Mon, 11 Dec 2006) | 4 lines

app_externalivr needs a real silence file, and additional
changes to add silence files into core instead of extra
patch provided by bug 8177 with minor additions.

........

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

................
r48400 | mogorman | 2006-12-11 16:02:47 -0700 (Mon, 11 Dec 2006) | 10 lines

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

........
r48399 | mogorman | 2006-12-11 17:02:10 -0600 (Mon, 11 Dec 2006) | 2 lines

new sounds package with 100% more silence

........

................
r48402 | file | 2006-12-11 21:14:50 -0700 (Mon, 11 Dec 2006) | 10 lines

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

........
r48401 | file | 2006-12-11 23:13:48 -0500 (Mon, 11 Dec 2006) | 2 lines

Use S_OR in my previous app_voicemail. This is the way it should have been done.

........

................
r48408 | rizzo | 2006-12-12 02:40:45 -0700 (Tue, 12 Dec 2006) | 10 lines

Make sure tab-completion works even when we have typed a fully
matching word (e.g. "sip<TAB>"); this is implemented by this one-line change

-               for (;; dst++, src += n) {
+               for (;src < argindex; dst++, src += n) {

However this code is not exactly trivial to understand, so
i am also adding some comments to help figuring out what it does.


................
r48409 | rizzo | 2006-12-12 03:35:10 -0700 (Tue, 12 Dec 2006) | 3 lines

normalize the scanning of "general" options in the config file.


................
r48410 | rizzo | 2006-12-12 03:36:15 -0700 (Tue, 12 Dec 2006) | 3 lines

properly initialize a malloc'ed buffer


................
r48415 | mogorman | 2006-12-12 12:55:39 -0700 (Tue, 12 Dec 2006) | 2 lines

fixed nubb error on my part, transcoder now unlocks and locks correctly, as well as counts in the correct direction.

................
r48416 | russell | 2006-12-12 15:27:22 -0700 (Tue, 12 Dec 2006) | 7 lines

Make chan_zap inform you that your version of zaptel is too old instead of
just failing to compile.

It seems like the proper way to do this would be in the configure script.
However, that wouldn't help existing checkouts unless we forced the configure
script to be executed after any code was changed.

................
r48417 | russell | 2006-12-12 15:32:20 -0700 (Tue, 12 Dec 2006) | 2 lines

Fix various spelling mistakes in comments.

................
r48432 | kpfleming | 2006-12-12 16:28:15 -0700 (Tue, 12 Dec 2006) | 10 lines

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

........
r48427 | kpfleming | 2006-12-12 17:18:14 -0600 (Tue, 12 Dec 2006) | 2 lines

when making a release, we can always use wget and we can't run the configure script to find that out...

........

................
r48433 | russell | 2006-12-12 17:56:30 -0700 (Tue, 12 Dec 2006) | 3 lines

revert check for a zaptel transcoder related definition that was done in the
wrong module.

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

Modified:
    team/murf/bug_7638/   (props changed)
    team/murf/bug_7638/apps/app_externalivr.c
    team/murf/bug_7638/apps/app_festival.c
    team/murf/bug_7638/apps/app_ices.c
    team/murf/bug_7638/apps/app_meetme.c
    team/murf/bug_7638/apps/app_mp3.c
    team/murf/bug_7638/apps/app_nbscat.c
    team/murf/bug_7638/apps/app_osplookup.c
    team/murf/bug_7638/apps/app_queue.c
    team/murf/bug_7638/apps/app_voicemail.c
    team/murf/bug_7638/apps/app_zapras.c
    team/murf/bug_7638/build_tools/prep_tarball
    team/murf/bug_7638/channels/chan_agent.c
    team/murf/bug_7638/channels/chan_alsa.c
    team/murf/bug_7638/channels/chan_features.c
    team/murf/bug_7638/channels/chan_gtalk.c
    team/murf/bug_7638/channels/chan_iax2.c
    team/murf/bug_7638/channels/chan_local.c
    team/murf/bug_7638/channels/chan_mgcp.c
    team/murf/bug_7638/channels/chan_oss.c
    team/murf/bug_7638/channels/chan_sip.c
    team/murf/bug_7638/channels/chan_skinny.c
    team/murf/bug_7638/channels/chan_zap.c
    team/murf/bug_7638/channels/iax2-provision.c
    team/murf/bug_7638/codecs/codec_zap.c
    team/murf/bug_7638/configs/iax.conf.sample
    team/murf/bug_7638/configs/manager.conf.sample
    team/murf/bug_7638/funcs/func_strings.c
    team/murf/bug_7638/include/asterisk/app.h
    team/murf/bug_7638/include/asterisk/channel.h
    team/murf/bug_7638/include/asterisk/cli.h
    team/murf/bug_7638/include/asterisk/http.h
    team/murf/bug_7638/include/asterisk/pbx.h
    team/murf/bug_7638/main/app.c
    team/murf/bug_7638/main/asterisk.c
    team/murf/bug_7638/main/channel.c
    team/murf/bug_7638/main/cli.c
    team/murf/bug_7638/main/db.c
    team/murf/bug_7638/main/file.c
    team/murf/bug_7638/main/frame.c
    team/murf/bug_7638/main/http.c
    team/murf/bug_7638/main/manager.c
    team/murf/bug_7638/main/rtp.c
    team/murf/bug_7638/main/translate.c
    team/murf/bug_7638/main/udptl.c
    team/murf/bug_7638/pbx/pbx_dundi.c
    team/murf/bug_7638/res/res_agi.c
    team/murf/bug_7638/res/res_config_pgsql.c
    team/murf/bug_7638/res/res_crypto.c
    team/murf/bug_7638/res/res_jabber.c
    team/murf/bug_7638/res/res_limit.c
    team/murf/bug_7638/res/res_musiconhold.c
    team/murf/bug_7638/res/res_odbc.c
    team/murf/bug_7638/res/res_realtime.c
    team/murf/bug_7638/sounds/Makefile

Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Dec 13 01:30:45 2006
@@ -1,1 +1,1 @@
-/trunk:1-48293
+/trunk:1-48439

Modified: team/murf/bug_7638/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_externalivr.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_externalivr.c (original)
+++ team/murf/bug_7638/apps/app_externalivr.c Wed Dec 13 01:30:45 2006
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
+#include <signal.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -153,7 +154,7 @@
 		if (state->current) {
 			file_to_stream = state->current->filename;
 		} else {
-			file_to_stream = "silence-10";
+			file_to_stream = "silence/10";
 			u->playing_silence = 1;
 		}
 
@@ -262,9 +263,13 @@
 		.finishlist = AST_LIST_HEAD_INIT_VALUE,
 	};
 	struct ivr_localuser *u = &foo;
+	sigset_t fullset, oldset;
 
 	lu = ast_module_user_add(chan);
-	
+
+	sigfillset(&fullset);
+	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
+
 	u->abort_current_sound = 0;
 	u->chan = chan;
 	
@@ -312,6 +317,9 @@
 	if (!pid) {
 		/* child process */
 		int i;
+
+		signal(SIGPIPE, SIG_DFL);
+		pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 
 		if (ast_opt_high_priority)
 			ast_set_priority(0);
@@ -335,6 +343,8 @@
 		int ready_fd;
 		int waitfds[2] = { child_errors_fd, child_commands_fd };
 		struct ast_channel *rchan;
+
+		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 
 		close(child_stdin[0]);
 		child_stdin[0] = 0;

Modified: team/murf/bug_7638/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_festival.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_festival.c (original)
+++ team/murf/bug_7638/apps/app_festival.c Wed Dec 13 01:30:45 2006
@@ -130,19 +130,26 @@
 #ifdef __PPC__ 
 	char c;
 #endif
+	sigset_t fullset, oldset;
+
+	sigfillset(&fullset);
+	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
 
         res = fork();
         if (res < 0)
                 ast_log(LOG_WARNING, "Fork failed\n");
-        if (res)
+        if (res) {
+		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
                 return res;
+	}
         for (x=0;x<256;x++) {
                 if (x != fd)
                         close(x);
         }
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
-
+	signal(SIGPIPE, SIG_DFL);
+	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 /*IAS */
 #ifdef __PPC__  
 	for( x=0; x<length; x+=2)

Modified: team/murf/bug_7638/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_ices.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_ices.c (original)
+++ team/murf/bug_7638/apps/app_ices.c Wed Dec 13 01:30:45 2006
@@ -65,15 +65,27 @@
 {
 	int res;
 	int x;
+	sigset_t fullset, oldset;
+
+	sigfillset(&fullset);
+	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
+
 	res = fork();
 	if (res < 0) 
 		ast_log(LOG_WARNING, "Fork failed\n");
-	if (res)
+	if (res) {
+		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
+	}
+
+	/* Stop ignoring PIPE */
+	signal(SIGPIPE, SIG_DFL);
+	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
+
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
 	dup2(fd, STDIN_FILENO);
-	for (x=STDERR_FILENO + 1;x<256;x++) {
+	for (x=STDERR_FILENO + 1;x<1024;x++) {
 		if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))
 			close(x);
 	}
@@ -84,7 +96,7 @@
 	/* As a last-ditch effort, try to use PATH */
 	execlp("ices", "ices", filename, (char *)NULL);
 	ast_log(LOG_WARNING, "Execute of ices failed\n");
-	return -1;
+	_exit(0);
 }
 
 static int ices_exec(struct ast_channel *chan, void *data)

Modified: team/murf/bug_7638/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_meetme.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_meetme.c (original)
+++ team/murf/bug_7638/apps/app_meetme.c Wed Dec 13 01:30:45 2006
@@ -900,11 +900,11 @@
 	return NULL;
 }
 	
-static char meetme_usage[] =
+static const char meetme_usage[] =
 "Usage: meetme (un)lock|(un)mute|kick|list [concise] <confno> <usernumber>\n"
 "       Executes a command for the conference or on a conferee\n";
 
-static char sla_show_usage[] =
+static const char sla_show_usage[] =
 "Usage: sla show\n"
 "       Lists status of all shared line appearances\n";
 
@@ -1945,6 +1945,13 @@
 			conf->markedusers--;
 		/* Remove ourselves from the list */
 		AST_LIST_REMOVE(&conf->userlist, user, list);
+
+		/* Change any states */
+		if (!conf->users)
+			ast_device_state_changed("meetme:%s", conf->confno);
+		if (confflags & (CONFFLAG_SLA_STATION|CONFFLAG_SLA_TRUNK))
+			ast_device_state_changed("SLA:%s", conf->confno + 4);
+
 		if (AST_LIST_EMPTY(&conf->userlist)) {
 			/* close this one when no more users and no references*/
 			if (!conf->refcount)
@@ -1953,12 +1960,6 @@
 		/* Return the number of seconds the user was in the conf */
 		snprintf(meetmesecs, sizeof(meetmesecs), "%d", (int) (time(NULL) - user->jointime));
 		pbx_builtin_setvar_helper(chan, "MEETMESECS", meetmesecs);
-
-		/* This device changed state now */
-		if (!conf->users)	/* If there are no more members */
-			ast_device_state_changed("meetme:%s", conf->confno);
-		if (confflags & (CONFFLAG_SLA_STATION|CONFFLAG_SLA_TRUNK))
-			ast_device_state_changed("SLA:%s", conf->confno + 4);
 	}
 	free(user);
 	AST_LIST_UNLOCK(&confs);

Modified: team/murf/bug_7638/apps/app_mp3.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_mp3.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_mp3.c (original)
+++ team/murf/bug_7638/apps/app_mp3.c Wed Dec 13 01:30:45 2006
@@ -64,15 +64,25 @@
 {
 	int res;
 	int x;
+	sigset_t fullset, oldset;
+
+	sigfillset(&fullset);
+	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
+
 	res = fork();
 	if (res < 0) 
 		ast_log(LOG_WARNING, "Fork failed\n");
-	if (res)
+	if (res) {
+		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
+	}
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
+	signal(SIGPIPE, SIG_DFL);
+	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
+
 	dup2(fd, STDOUT_FILENO);
-	for (x=0;x<256;x++) {
+	for (x=STDERR_FILENO + 1;x<256;x++) {
 		if (x != STDOUT_FILENO)
 			close(x);
 	}
@@ -94,7 +104,7 @@
 	    execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
 	}
 	ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
-	return -1;
+	_exit(0);
 }
 
 static int timed_read(int fd, void *data, int datalen, int timeout)

Modified: team/murf/bug_7638/apps/app_nbscat.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_nbscat.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_nbscat.c (original)
+++ team/murf/bug_7638/apps/app_nbscat.c Wed Dec 13 01:30:45 2006
@@ -68,16 +68,26 @@
 {
 	int res;
 	int x;
+	sigset_t fullset, oldset;
+
+	sigfillset(&fullset);
+	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
+
 	res = fork();
 	if (res < 0) 
 		ast_log(LOG_WARNING, "Fork failed\n");
-	if (res)
+	if (res) {
+		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return res;
+	}
+	signal(SIGPIPE, SIG_DFL);
+	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
+
 	if (ast_opt_high_priority)
 		ast_set_priority(0);
 
 	dup2(fd, STDOUT_FILENO);
-	for (x=0;x<256;x++) {
+	for (x = STDERR_FILENO + 1; x < 1024; x++) {
 		if (x != STDOUT_FILENO)
 			close(x);
 	}
@@ -85,7 +95,7 @@
 	execl(NBSCAT, "nbscat8k", "-d", (char *)NULL);
 	execl(LOCAL_NBSCAT, "nbscat8k", "-d", (char *)NULL);
 	ast_log(LOG_WARNING, "Execute of nbscat8k failed\n");
-	return -1;
+	_exit(0);
 }
 
 static int timed_read(int fd, void *data, int datalen)

Modified: team/murf/bug_7638/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_osplookup.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_osplookup.c (original)
+++ team/murf/bug_7638/apps/app_osplookup.c Wed Dec 13 01:30:45 2006
@@ -146,7 +146,7 @@
 
 /* Call ID */
 struct osp_callid {
-	char buf[OSPC_CALLID_MAXSIZE];		/* Call ID string */
+	unsigned char buf[OSPC_CALLID_MAXSIZE];		/* Call ID string */
 	unsigned int len;					/* Call ID length */
 };
 
@@ -2159,7 +2159,7 @@
 "	OSPFINISHSTATUS The status of the OSP Finish attempt as a text string, one of\n"
 "		SUCCESS | FAILED | ERROR \n";
 
-static char osp_usage[] =
+static const char osp_usage[] =
 "Usage: osp show\n"
 "       Displays information on Open Settlement Protocol support\n";
 

Modified: team/murf/bug_7638/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_queue.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_queue.c (original)
+++ team/murf/bug_7638/apps/app_queue.c Wed Dec 13 01:30:45 2006
@@ -4633,14 +4633,14 @@
 	return NULL;
 }
 
-static char queue_show_usage[] =
+static const char queue_show_usage[] =
 "Usage: queue show\n"
 "       Provides summary information on a specified queue.\n";
 
-static char qam_cmd_usage[] =
+static const char qam_cmd_usage[] =
 "Usage: queue add member <channel> to <queue> [penalty <penalty>]\n";
 
-static char qrm_cmd_usage[] =
+static const char qrm_cmd_usage[] =
 "Usage: queue remove member <channel> from <queue>\n";
 
 static struct ast_cli_entry cli_queue[] = {

Modified: team/murf/bug_7638/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_voicemail.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_voicemail.c (original)
+++ team/murf/bug_7638/apps/app_voicemail.c Wed Dec 13 01:30:45 2006
@@ -2428,7 +2428,7 @@
 		ast_log(LOG_WARNING, "Unable to store '%s' (can't create temporary file)\n", fn);
 		return -1;
 	} else {
-		make_email_file(p, myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, chan->cid.cid_num, chan->cid.cid_name, fn, fmt, duration, 1, chan, NULL, 1);
+		make_email_file(p, myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL), fn, fmt, duration, 1, chan, NULL, 1);
 		/* read mail file to memory */		
 		len = ftell(p);
 		rewind(p);
@@ -2658,7 +2658,7 @@
 		ast_log(LOG_ERROR, "Recipient mailbox %s@%s is full\n", recip->mailbox, recip->context);
 	}
 	ast_unlock_path(todir);
-	notify_new_message(chan, recip, recipmsgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
+	notify_new_message(chan, recip, recipmsgnum, duration, fmt, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL));
 	
 	return 0;
 }
@@ -3080,7 +3080,7 @@
 				chan->exten,
 				chan->priority,
 				chan->name,
-				ast_callerid_merge(callerid, sizeof(callerid), chan->cid.cid_name, chan->cid.cid_num, "Unknown"),
+				ast_callerid_merge(callerid, sizeof(callerid), S_OR(chan->cid.cid_name, NULL), S_OR(chan->cid.cid_num, NULL), "Unknown"),
 				date, (long)time(NULL),
 				category ? category : ""); 
 		} else
@@ -3142,7 +3142,7 @@
 #endif
 					if (ast_fileexists(fn, NULL, NULL)) {
 						STORE(dir, vmu->mailbox, vmu->context, msgnum, chan, vmu, fmt, duration, vms);
-						notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
+						notify_new_message(chan, vmu, msgnum, duration, fmt, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL));
 						DISPOSE(dir, msgnum);
 					}
 				}
@@ -4129,13 +4129,14 @@
  
 				STORE(todir, vmtmp->mailbox, vmtmp->context, vms->curmsg, chan, vmtmp, fmt, duration, vms);
 
- 				char *myserveremail = serveremail;
- 				if (!ast_strlen_zero(vmtmp->serveremail))
- 					myserveremail = vmtmp->serveremail;
- 				int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
- 				attach_user_voicemail = ast_test_flag(vmtmp, VM_ATTACH);
- 				/* NULL category for IMAP storage */
- 				sendmail(myserveremail, vmtmp, todircount, vmtmp->context, vmtmp->mailbox, chan->cid.cid_num, chan->cid.cid_name, vms->fn, fmt, duration, attach_user_voicemail, chan, NULL);
+				char *myserveremail = serveremail;
+				if (!ast_strlen_zero(vmtmp->serveremail))
+					myserveremail = vmtmp->serveremail;
+				int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
+				attach_user_voicemail = ast_test_flag(vmtmp, VM_ATTACH);
+				/* NULL category for IMAP storage */
+				sendmail(myserveremail, vmtmp, todircount, vmtmp->context, vmtmp->mailbox, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL), vms->fn, fmt, duration, attach_user_voicemail, chan, NULL);
+
 #else
 				copy_message(chan, sender, 0, curmsg, duration, vmtmp, fmt);
 #endif
@@ -6938,11 +6939,11 @@
 	return res;
 }
 
-static char voicemail_show_users_help[] =
+static const char voicemail_show_users_help[] =
 "Usage: voicemail show users [for <context>]\n"
 "       Lists all mailboxes currently set up\n";
 
-static char voicemail_show_zones_help[] =
+static const char voicemail_show_zones_help[] =
 "Usage: voicemail show zones\n"
 "       Lists zone message formats\n";
 

Modified: team/murf/bug_7638/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_zapras.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/apps/app_zapras.c (original)
+++ team/murf/bug_7638/apps/app_zapras.c Wed Dec 13 01:30:45 2006
@@ -82,11 +82,23 @@
 	char *argv[PPP_MAX_ARGS];
 	int argc = 0;
 	char *stringp=NULL;
+	sigset_t fullset, oldset;
+
+	sigfillset(&fullset);
+	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
 
 	/* Start by forking */
 	pid = fork();
-	if (pid)
+	if (pid) {
+		pthread_sigmask(SIG_SETMASK, &oldset, NULL);
 		return pid;
+	}
+
+	/* Restore original signal handlers */
+	for (x=0;x<NSIG;x++)
+		signal(x, SIG_DFL);
+
+	pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
 
 	/* Execute RAS on File handles */
 	dup2(chan->fds[0], STDIN_FILENO);
@@ -98,10 +110,6 @@
 	/* Close other file descriptors */
 	for (x=STDERR_FILENO + 1;x<1024;x++) 
 		close(x);
-
-	/* Restore original signal handlers */
-	for (x=0;x<NSIG;x++)
-		signal(x, SIG_DFL);
 
 	/* Reset all arguments */
 	memset(argv, 0, sizeof(argv));

Modified: team/murf/bug_7638/build_tools/prep_tarball
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/build_tools/prep_tarball?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/build_tools/prep_tarball (original)
+++ team/murf/bug_7638/build_tools/prep_tarball Wed Dec 13 01:30:45 2006
@@ -5,4 +5,4 @@
 #
 # It will be executed from the top-level directory of the project.
 
-make -C sounds all MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-FREEPLAY-WAV
+make -C sounds all MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-FREEPLAY-WAV WGET=wget

Modified: team/murf/bug_7638/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_agent.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/channels/chan_agent.c (original)
+++ team/murf/bug_7638/channels/chan_agent.c Wed Dec 13 01:30:45 2006
@@ -1712,15 +1712,15 @@
 
 
 
-static char show_agents_usage[] = 
+static const char show_agents_usage[] = 
 "Usage: agent show\n"
 "       Provides summary information on agents.\n";
 
-static char show_agents_online_usage[] =
+static const char show_agents_online_usage[] =
 "Usage: agent show online\n"
 "	Provides a list of all online agents.\n";
 
-static char agent_logoff_usage[] =
+static const char agent_logoff_usage[] =
 "Usage: agent logoff <channel> [soft]\n"
 "       Sets an agent as no longer logged in.\n"
 "       If 'soft' is specified, do not hangup existing calls.\n";

Modified: team/murf/bug_7638/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_alsa.c?view=diff&rev=48440&r1=48439&r2=48440
==============================================================================
--- team/murf/bug_7638/channels/chan_alsa.c (original)
+++ team/murf/bug_7638/channels/chan_alsa.c Wed Dec 13 01:30:45 2006
@@ -916,7 +916,7 @@
 	return RESULT_SUCCESS;
 }
 
-static char sendtext_usage[] =
+static const char sendtext_usage[] =
 	"Usage: console send text <message>\n"
 	"       Sends a text message for display on the remote terminal.\n";
 
@@ -961,7 +961,7 @@
 	return res;
 }
 
-static char answer_usage[] =
+static const char answer_usage[] =
 	"Usage: console answer\n"
 	"       Answers an incoming call on the console (ALSA) channel.\n";
 
@@ -993,7 +993,7 @@
 	return res;
 }
 
-static char hangup_usage[] =
+static const char hangup_usage[] =
 	"Usage: console hangup\n"
 	"       Hangs up any call currently placed on the console.\n";
 
@@ -1054,7 +1054,7 @@
 	return res;
 }
 
-static char dial_usage[] =
+static const char dial_usage[] =
 	"Usage: console dial [extension[@context]]\n"

[... 3631 lines stripped ...]


More information about the asterisk-commits mailing list