Commit Graph

5501 Commits

Author SHA1 Message Date
Terry Wilson cfaef11e0f A blind transfer to the parking thread would cause a segfault because copy_request accesses dst->data w/o being able to tell whether it is proerly initialized
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 00:02:19 +00:00
Tilghman Lesher 63b165dbb9 Merged revisions 146799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines
  
  Dialplan functions should not actually return 0, unless they have modified the
  workspace.  To signal an error (and no change to the workspace), -1 should be
  returned instead.
  (closes issue #13340)
   Reported by: kryptolus
   Patches: 
         20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 21:09:05 +00:00
Tilghman Lesher 8a457d94e2 Merged revisions 146711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r146711 | tilghman | 2008-10-06 11:51:21 -0500 (Mon, 06 Oct 2008) | 9 lines
  
  Check whether an extension exists in the _call method, rather than the _alloc
  method, because we need to evaluate the callerid (since that data affects
  whether an extension exists).
  (closes issue #13343)
   Reported by: efutch
   Patches: 
         20080915__bug13343.diff.txt uploaded by Corydon76 (license 14)
   Tested by: efutch
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 16:52:14 +00:00
Jason Parker b37300a4a5 Recorded merge of revisions 146448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r146448 | qwell | 2008-10-05 16:17:44 -0500 (Sun, 05 Oct 2008) | 1 line
  
  Fix silly formatting.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-05 21:21:03 +00:00
Jeff Peeler 81415abc21 (closes issue #13337)
Reported by: pj
Tested by: pj

Set transport to SIP_TRANSPORT_UDP mode if not specified which fixes calls to get_transport returning UNKNOWN.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-30 22:21:19 +00:00
Russell Bryant f1dd1fe1c7 Add support for call pickup on Snom phones. Asterisk now includes a magic
call-id in the dialog-info event package used with extension state subscriptions
on Snom phones.  Then, when the phone sends an INVITE with Replaces for the
special callid, Asterisk will perform a pickup on the extension that was
subscribed to.

The original code on this issue was submitted by xylome.  However, contributions
have been made by (at least) mgernoth and pkempgen.  The final patch was written
by seanbright, and includes the necessary logic to allow this work in a
technology independent way.

(closes issue #5014)
Reported by: xylome
Patches:
      issue5014-trunk.diff uploaded by seanbright (license 71)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-30 21:32:53 +00:00
Richard Mudgett e3311c9875 * Miscellaneous formatting changes to make v1.4 and trunk
more merge compatible in the mISDN area.

channels/chan_misdn.c
*  Eliminated redundant code in cb_events() EVENT_SETUP



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-30 21:00:54 +00:00
Michiel van Baak 90751b16ca Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 23:32:14 +00:00
Kevin P. Fleming de6656902d rename chandup() and clarify its usage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 17:08:12 +00:00
Michiel van Baak f1b673eef0 fix a couple of CLI commands that did not have a help description.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 00:49:24 +00:00
Steve Murphy e74584ca3c (closes issue #13557)
Reported by: nickpeirson

The user attached a patch, but the license is not yet
recorded. I took the liberty of finding and replacing
ALL index() calls with strchr() calls, and that
involves more than just main/pbx.c;

chan_oss, app_playback, func_cut also had calls
to index(), and I changed them out. 1.4 had no
references to index() at all.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 22:21:28 +00:00
Christian Richter 1c2cbc926b Merged revisions 144238 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r144238 | crichter | 2008-09-24 10:20:52 +0200 (Mi, 24 Sep 2008) | 1 line

improved helptext of misdn_set_opt.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-24 08:42:55 +00:00
Mark Michelson ad859c943e Fix a conflict in flag values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-23 23:33:33 +00:00
Mark Michelson 8625eb9d2a When a promiscuous redirect contained both a user and
host portion in the Contact URI and specifies a 
transport, the parsing done in parse_moved_contact
resulted in a malformed URI.

This commit fixes the parsing so that a proper
Dial string may be formed when the forwarded
call is placed.

(closes issue #13523)
Reported by: mattdarnell
Patches:
      13523v2.patch uploaded by putnopvut (license 60)
Tested by: mattdarnell



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-23 15:37:00 +00:00
Michiel van Baak d1ee16cd9a make 'module unload chan_skinny.so' actually work.
(closes issue #13524)
Reported by: wedhorn
Patches:
      unload.diff uploaded by wedhorn (license 30)
	  With small tweak by me to prevent a crash


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-20 10:39:20 +00:00
Mark Michelson 02a0855e57 We should only unsubscribe to the device state event
subscription if we have previously subscribed. Otherwise
a segfault will occur.

(closes issue #13476)
Reported by: jonnt
Patches:
      13476.patch uploaded by putnopvut (license 60)
Tested by: jonnt



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-19 15:43:28 +00:00
Steve Murphy 12073c2a96 Merged revisions 143534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r143534 | murf | 2008-09-18 16:11:51 -0600 (Thu, 18 Sep 2008) | 1 line

A micro-fix, in sip_park_thread, where d is freed before the func is done using it.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-18 23:41:33 +00:00
Tilghman Lesher 9b214d2135 Merged revisions 143140 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r143140 | tilghman | 2008-09-15 16:29:32 -0500 (Mon, 15 Sep 2008) | 6 lines
  
  Set the raw formats at the same time as the other formats.
  (closes issue #13240)
   Reported by: jvandal
   Patches: 
         20080813__bug13240.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-15 21:31:36 +00:00
Michiel van Baak c8c11aae99 plug a couple of memleaks in chan_skinny.
(closes issue #13452)
Reported by: pj
Patches:
      memleak5.diff uploaded by wedhorn (license 30)
Tested by: wedhorn, pj, mvanbaak

(closes issue #13294)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-14 22:16:34 +00:00
Tilghman Lesher 8fbee1307c Repair IAXVAR implementation so that it works again (regression?)
(closes issue #13354)
 Reported by: adomjan
 Patches: 
       20080828__bug13354.diff.txt uploaded by Corydon76 (license 14)
       20080829__bug13354__1.6.0.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, adomjan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-13 13:54:15 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Jeff Peeler 5d39c767c1 Merged revisions 142927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142927 | jpeeler | 2008-09-12 17:22:28 -0500 (Fri, 12 Sep 2008) | 6 lines

(closes issue #12965)
Reported by: rlsutton2

Prevents local channels from playing MOH at each other which was causing ast_generic_bridge to loop much faster.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 22:24:13 +00:00
Tilghman Lesher aada13230f Merged revisions 142865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r142865 | tilghman | 2008-09-12 15:37:18 -0500 (Fri, 12 Sep 2008) | 11 lines
  
  Create rules for disallowing contacts at certain addresses, which may
  improve the security of various installations.  As this does not change
  any default behavior, it is not classified as a direct security fix for
  anything within Asterisk, but may help PBX admins better secure their
  SIP servers.
  (closes issue #11776)
   Reported by: ibc
   Patches: 
         20080829__bug11776.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76, blitzrage
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 20:49:46 +00:00
Mark Michelson 3226c29cd6 Merged revisions 142218 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142218 | mmichelson | 2008-09-09 14:15:28 -0500 (Tue, 09 Sep 2008) | 14 lines

Make sure that the branch sent in CANCEL requests
matches the branch of the INVITE it is cancelling.

(closes issue #13381)
Reported by: atca_pres
Patches:
      13381v2.patch uploaded by putnopvut (license 60)
Tested by: atca_pres

(closes issue #13198)
Reported by: rickead2000
Tested by: rickead2000


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 19:16:30 +00:00
Mark Michelson 01b2894d2e Merged revisions 142079 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142079 | mmichelson | 2008-09-09 11:19:17 -0500 (Tue, 09 Sep 2008) | 21 lines

When determining if codecs used by SIP peers allow
the media to be natively bridged, use the jointcapability
instead of the peercapability.

It seems that the intent of using the peercapability was to
expand the choice of codecs for the call to increase the
chances of being able to native bridge the channels. The 
problem is that if a codec were settled on for the native
bridge and that wasn't a codec that was configured to be used
by Asterisk for that peer, then Asterisk would send a 
REINVITE with no codecs in the SDP which is a bug no matter
how you slice it.


(closes issue #13076)
Reported by: ramonpeek
Patches:
      13076.patch uploaded by putnopvut (license 60)
Tested by: tbelder


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 16:20:41 +00:00
Mark Michelson 68bc5b446d Fix a memory leak in chan_oss
(closes issue #13311)
Reported by: eliel
Patches:
      chan_oss.c.patch uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 10:20:58 +00:00
Mark Michelson 0d0c5190fd Um, apparently I didn't actually finish merging before committing.
Bad bad bad



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-08 22:14:40 +00:00
Mark Michelson 13222b52ef Merged revisions 141809 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141809 | mmichelson | 2008-09-08 16:10:10 -0500 (Mon, 08 Sep 2008) | 14 lines

Fix pedantic mode of chan_sip to only check the
remote tag of an endpoint once a dialog has
been confirmed. Up until that point, it is possible
and legal for the far-end to send provisional
responses with a different To: tag each time. With
this patch applied, these provisional messages
will not cause a matching problem.

(closes issue #11536)
Reported by: ibc
Patches:
      11536v2.patch uploaded by putnopvut (license 60)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-08 21:18:49 +00:00
Steve Murphy 1ca1ef6775 Merged revisions 141565 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141565 | murf | 2008-09-06 14:13:16 -0600 (Sat, 06 Sep 2008) | 1 line

This fix comes from Joshua Colp The Brilliant, who, given the trace, came up with a solution. This will most likely will close 13235 and 13409. I'll wait till Monday to verify, and then close these bugs.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06 20:19:50 +00:00
Michiel van Baak 28764dd1f6 Some fixes to autocompletion in some commands.
Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto completed. Now we complete this command with:
  'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...
- Pass ast_cli_args->argv and ast_cli_args->argc while running autocompletion on CLI commands (CLI_GENERATE).
  With this we avoid comparisons on ast_cli_args->line like this:
  strcasestr(a->line, " description")
  strcasestr(a->line, "descriptions ")
  strcasestr(a->line, "realtime peer"), and so on..

  Making the code more confusing (check the spaces in description!).
  The only thing we must be sure is to first check a->pos or a->argc.
														      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this command with 'all' & 'iax2 peers', check a look that iax2 peers where all the peers, now only the ones in the cache..

(closes issue #13133)
Reported by: eliel
Patches:
      clichanges.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06 12:03:11 +00:00
Mark Michelson 97375b6340 Merged revisions 141366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141366 | mmichelson | 2008-09-05 16:10:32 -0500 (Fri, 05 Sep 2008) | 7 lines

Agent's should not try to call a channel's indicate callback
if the channel has been hung up. It will likely crash
otherwise

ABE-1159


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-05 21:12:09 +00:00
Michiel van Baak cb5824d995 Added 'skinny show lines verbose'
This will print the subs and their status for every line (if any).

wedhorn did most of the work with his patch which introduced
'skinny show debug' but a discussion on IRC stated that it should be
added to 'skinny show lines'

Input on the output format by Qwell on IRC.

(closes issue #13344)
Reported by: wedhorn


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03 18:06:35 +00:00
Sean Bright f3111835bb Merged revisions 140605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140605 | seanbright | 2008-09-02 14:14:57 -0400 (Tue, 02 Sep 2008) | 8 lines

Make sure to use the correct length of the mohinterpret and mohsuggest
buffers when copying configuration values.

(closes issue #13336)
Reported by: decryptus_proformatique
Patches:
      chan_iax2_mohinterpret_mohsuggest_general_settings.patch uploaded by decryptus (license 555)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 18:15:54 +00:00
Sean Bright b74c9b910e When a call is rejected because of call-limit, the channel driver is behaving
as expected, so we shouldn't report it as an error.  Change to LOG_NOTICE
instead.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 14:41:41 +00:00
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines

After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the 
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 17:47:17 +00:00
Mark Michelson b116defba8 Merged revisions 140417 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140417 | mmichelson | 2008-08-29 10:26:52 -0500 (Fri, 29 Aug 2008) | 10 lines

Fix SIP's parsing so that if a port is specified
in a string to Dial(), it is not ignored.

(closes issue #13355)
Reported by: acunningham
Patches:
      13355v2.patch uploaded by putnopvut (license 60)
Tested by: acunningham


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 15:32:02 +00:00
Mark Michelson f150dfb95a Merged revisions 140299 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140299 | mmichelson | 2008-08-27 14:49:20 -0500 (Wed, 27 Aug 2008) | 11 lines

Fix tag checking in get_sip_pvt_byid_locked when
in pedantic mode. The problem was that the wrong
tags would be compared depending on the direction
of the call.

(closes issue #13353)
Reported by: flefoll
Patches:
      chan_sip.c.br14.139015.patch-refer-pedantic uploaded by flefoll (license 244)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-27 20:11:22 +00:00
Doug Bailey 3aca08d924 Move the mwi send thread functionality back into the do_monitor thread so that it is easier to manage CID spill resources when do_monitor needs to be killed.
(closes issue #13213)
Reported by: bbryant



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 21:59:31 +00:00
Jeff Peeler be000109dc Merged revisions 140056 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140056 | jpeeler | 2008-08-26 10:57:02 -0500 (Tue, 26 Aug 2008) | 9 lines

(closes issue #12071)
Reported by: tzafrir
Patches:
      dahdi_close.diff uploaded by tzafrir (license 46)
Tested by: tzafrir, jpeeler

This patch fixes closing open file descriptors in the case of an error.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 18:48:55 +00:00
Russell Bryant d787786ac9 Merged revisions 140060 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140060 | russell | 2008-08-26 11:07:58 -0500 (Tue, 26 Aug 2008) | 6 lines

Fix some bogus scheduler usage in chan_sip.  This code used the return value
of a completely unrelated function to determine whether the scheduler should
be run or not.  This would have caused the scheduler to not run in cases where
it should have.  Also, leave a note about another scheduler issue that needs
to be addressed at some point.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 16:10:06 +00:00
Russell Bryant b296adfe8e Merged revisions 140051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140051 | russell | 2008-08-26 10:27:23 -0500 (Tue, 26 Aug 2008) | 15 lines

Fix a race condition with the IAX scheduler thread.  A lock and condition are
used here to allow newly scheduled tasks to wake up the scheduler just in case
the new task needs to run sooner than the current wakeup time when the thread
is sleeping.  However, there was a race condition such that a newly scheduled
task would not properly wake up the scheduler or affect the wake up period.
The order of execution would have been:

  1) Scheduler thread determines wake up time of N ms.
  2) Another thread schedules a task and signals the condition, with an
     execution time of < N ms.
  3) Scheduler thread locks and goes to sleep for N ms.

By moving the sleep time determination to inside the critical section, this
possibility is avoided.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 15:29:25 +00:00
Terry Wilson 2717c21561 Merged revisions 139869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139869 | twilson | 2008-08-25 15:46:10 -0500 (Mon, 25 Aug 2008) | 2 lines

Make SIPADDHEADER() propagate indefinitely

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-25 20:59:58 +00:00
Mark Michelson 261d1eeb13 The -1 return value from incomplete or improper
headers for the SipNotify manager command was
causing the current manager session to become
disconnected. Change the return value to 0 for
these cases.

Also change a test for a NULL pointer to be
ast_strlen_zero instead.

(closes issue #13351)
Reported by: Laureano
Patches:
      sipnotify_action_fix.patch uploaded by Laureano (license 265)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 20:20:58 +00:00
Mark Michelson e13a77e628 Merged revisions 139466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139466 | mmichelson | 2008-08-22 12:24:47 -0500 (Fri, 22 Aug 2008) | 3 lines

Fix the build. Thanks, mvanbaak!


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 17:25:12 +00:00
Mark Michelson 8b5c762f83 Merged revisions 139456 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139456 | mmichelson | 2008-08-22 11:57:38 -0500 (Fri, 22 Aug 2008) | 7 lines

Prevent a deadlock in chan_iax2 resulting from
incorrect locking order between iax2_pvt and
ast_channel structures.

AST-13


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 16:58:21 +00:00
Jeff Peeler a9af5a81c9 Merged revisions 139387 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139387 | jpeeler | 2008-08-21 18:39:31 -0500 (Thu, 21 Aug 2008) | 3 lines

Fixes loop that could possibly never exit in the event of a channel never being able to be opened or specify after a restart.
(closes issue #11017)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-21 23:41:50 +00:00
Philippe Sultan 6571a25767 Fix two memory leaks in chan_gtalk, thanks Eliel!
(closes issue #13310)
Reported by: eliel
Patches:
      chan_gtalk.c.patch uploaded by eliel (license 64)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-21 09:55:31 +00:00
Jason Parker d22fe17322 Fix output of sipshowpeer manager response.
(closes issue #13346)
Reported by: srt
Patches:
      13346_malformed_sip_show_peer_response.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 22:06:40 +00:00
Michiel van Baak 877549af70 fix unholding phones after hangup on older cisco phones.
Patch by wedhorn.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 16:16:53 +00:00
Mark Michelson c4b34ef45d Merged revisions 139015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139015 | mmichelson | 2008-08-20 10:37:56 -0500 (Wed, 20 Aug 2008) | 6 lines

sip_read should properly handle a NULL return from sip_rtp_read.

(closes issue #13257)
Reported by: travishein


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 15:38:47 +00:00