Commit Graph

14962 Commits

Author SHA1 Message Date
Russell Bryant 4c6486782f Fix some more breakage that I introduced when changing extension state callbacks to the list macros.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 15:45:49 +00:00
Kevin P. Fleming 84b133bd81 clean up code to conform to coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 15:41:54 +00:00
Russell Bryant 89ad4ace67 Remove an unneeded variable. This compiled, but I missed the uninitialized warning
because I always compile without optimizations turned on.  Sorry!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 15:22:13 +00:00
Russell Bryant b47eee2187 Convert handling of extension state callbacks to the list macros.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:32:13 +00:00
Russell Bryant e1bd198bc0 Minor coding style changes, including adding handling for memory allocation failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:14:12 +00:00
Russell Bryant f1d2a11aad Minor change to use Asterisk macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:09:55 +00:00
Russell Bryant c1cf92d304 Merged revisions 109838 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109838 | russell | 2008-03-18 23:06:05 -0500 (Tue, 18 Mar 2008) | 2 lines

Tweak spacing in a recent change because I'm very picky.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 04:06:31 +00:00
Russell Bryant 5f7e81b564 Set req->data to NULL after free'ing to ensure that it never gets accidentally
double free'd.  (reported by dhubbard directly to me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 03:51:06 +00:00
Mark Michelson 37fcf0e0fe Fix a typo which caused a double free in chan_zap. This was discovered
by Juggie while attempting to load chan_zap. Apparently this would happen
if an error were encountered while trying to process zapata.conf.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 23:32:58 +00:00
Tilghman Lesher 58fa8e6e9e Change back to using ldap_initialize() and let the user specify a URL directly,
instead of trying to piece it together, badly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 23:22:25 +00:00
Russell Bryant d0edd39023 Merged revisions 109763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109763 | russell | 2008-03-18 17:34:42 -0500 (Tue, 18 Mar 2008) | 3 lines

Fix one place where the chanspy datastore isn't removed from a channel.
(issue #12243, reported by atis, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 22:36:02 +00:00
Kevin P. Fleming e191b51a08 start the process of changing HTTP request dispatching to do it based on *both* URI and method, so that POST support can move into a module; move http.c's private function prototypes into _private.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 22:32:26 +00:00
Mark Michelson 994d025523 Merged revisions 109713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109713 | mmichelson | 2008-03-18 15:52:15 -0500 (Tue, 18 Mar 2008) | 12 lines

This patch makes it so that all queue member status changes are handled through device state
code. This removes several problems people were seeing where their queue members would get into
an "unknown" state. Huge props go to atis on this one since he was the one who found the code
section that was causing the problem and proposed the solution. I just wrote what he suggested :)

(closes issue #12127)
Reported by: atis
Patches:
      12127v3.patch uploaded by putnopvut (license 60)
Tested by: atis, jvandal


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 20:59:02 +00:00
Tilghman Lesher 92ecf53d44 Set protocol version, port number correctly.
(closes issue #12211, closes issue #12209)
 Reported by: sylvain


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 20:13:40 +00:00
Mark Michelson 8bceb4f2a1 Since a sip request's data field is now a stringfield, we not only have to check
if the string is zero-length, but also if the data field is non-null.

(closes issue #12250)
Reported by: caio1982



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 20:02:26 +00:00
Tilghman Lesher b8fe71d8cb Comment debug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 19:53:02 +00:00
Jason Parker 56bddc2a0d Merged revisions 109648 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109648 | qwell | 2008-03-18 14:23:44 -0500 (Tue, 18 Mar 2008) | 7 lines

Allow codecs that use log2comp (g726) to compile correctly on x86 with gcc4 optimizations.

(closes issue #12253)
Reported by: fossil
Patches:
      log2comp.patch uploaded by fossil (license 140)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 19:24:15 +00:00
Mark Michelson cd7efcf4e7 Add option 'randomperiodicannounce' to queues.conf. Setting this will
allow the list of periodic announcments specified to be played in a random
order instead of being played sequentially.

(closes issue #6681)
Reported by: alt_phil
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 18:58:42 +00:00
Mark Michelson f1181cb04e Merged revisions 109575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109575 | mmichelson | 2008-03-18 12:58:11 -0500 (Tue, 18 Mar 2008) | 6 lines

Make sure an agent doesn't try to send dtmf to a NULL channel

closes issue #12242
Reported by Yourname


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 17:59:18 +00:00
Mark Michelson 4232cef812 Add format attribute to printf-style functions in astmm.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 17:00:53 +00:00
Kevin P. Fleming 3a8268bc29 fix up various warnings found via the addition of format string checking... some of these were really, really bad code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 16:23:05 +00:00
Kevin P. Fleming 00222ab483 ensure that dependencies on AST_C_DEFINE_CHECK symbols work properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:50:29 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Joshua Colp 760fc3403c Make sure values are interpreted as character strings and not format strings.
(AST-2008-004)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:13:07 +00:00
Jason Parker 5900cd9047 Block this here. Already committed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:10:45 +00:00
Joshua Colp 10cdbe28a8 Merged revisions 109386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109386 | file | 2008-03-18 11:58:39 -0300 (Tue, 18 Mar 2008) | 3 lines

Put a maximum limit on the number of payloads accepted, and also make sure a given payload does not exceed our maximum value.
(AST-2008-002)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:08:09 +00:00
Jason Parker 263c658a6b Do not return with a successful authentication if the From header ends up empty.
(AST-2008-003)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:07:04 +00:00
Steve Murphy 4e29ae8806 Merged revisions 109309 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines

(closes issue #11903)
Reported by: atis

Many thanks to atis for spotting this problem and reporting it.
The fix was to straighten out how items are placed on and removed
from the file stack. Regressions as well as the provided test case
helped to straighten out all code paths. valgrind was used to make
sure all memory allocated was freed.

Sorry for not solving this earlier. I got distracted.

Added the ntest23 regression test, which is mainly a copy of ntest22, 
but with a few juicy errors thrown in, to replicate the kind of 
error that atis spotted.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 14:09:50 +00:00
Olle Johansson 0de4eba640 Add manager peerstatus events when peer can't authenticate.
(closes issue #11959)
Reported by: mostyn
Patches: 
      peerstatus3.patch uploaded by mostyn (license 398)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 07:23:45 +00:00
Sean Bright ad3748d6c5 Fix a typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 00:28:39 +00:00
Terry Wilson e727d15d34 Replace minimime with superior GMime library so that the entire contents of an http post are not read into memory.
This does introduce a dependency on the GMime library for handling HTTP POSTs, but it is available in most distros.

If the library is present, then the compile flag for ENABLE_UPLOADS is enabled by default in menuselect.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 22:10:06 +00:00
Mark Michelson b246e010d5 Merged revisions 109226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109226 | mmichelson | 2008-03-17 17:05:49 -0500 (Mon, 17 Mar 2008) | 12 lines

Fix a logic flaw in the code that stores lock info which is displayed
via the "core show locks" command. The idea behind this section of code was
to remove the previous lock from the list if it was a trylock that had failed.
Unfortunately, instead of checking the status of the previous lock, we were referencing
the index immediately following the previous lock in the lock_info->locks array. 
The result of this problem, under the right circumstances, was that the lock which 
we currently in the process of attempting to acquire could "overwrite" the previous lock 
which was acquired. While this does not in any way affect typical operation, it *could*
lead to misleading "core show locks" output.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 22:06:44 +00:00
Michiel van Baak 5e4cd22c0e block rev 109171 that is already here
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 17:58:34 +00:00
Steve Murphy 0af58d3f5c (closes issue #12238)
Reported by: mvanbaak
Tested by: murf, mvanbaak

Due to a bug that occurred when merge_contexts_and_delete scanned the "old" or existing contexts, and found a context
that doesn't exist in the new set, yet owned by a different registrar. The context is created in the new set, with the
old registrar, and and all the priorities and extens that have a different registrar are copied into it. But, not the
includes, ignorepats, and switches. I added code to do this immediately after the context is created.

This still leaves a logical hole in the code. If you define a context in two places, (eg. in extensions.conf and also 
in extensions.ael), and they both have includes, but different in composition, no new context will be generated, and
therefore the 'old' includes, switches, and ignorepats will not be copied. I'd have added code to simply add any non-duplicates
into the 'new' context that had a different registrar, but there is one big complication: includes, and switches are definitely
order dependent. (ignorepats I'm not sure about). And we'll have to develop some sort of policy about how we 
merge order dependent lists, especially if the intersection of the two sets is empty. (in other words, they do not have any
elements in common). Do the new go first, or the old? I've elected to punt this issue until a user complains. Hopefully,
this is pretty rare thing.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 17:47:36 +00:00
Michiel van Baak 5729b0ec40 Update the directory of placed calls on skinny phones
when dialing a channel that does not provide progress (analog ZAP lines)

The phone does handle the double update on calls to channels that do
provide progress and wont insert duplicate items

(closes issue #12239)
Reported by: DEA
Patches:
      chan_skinny-call-log.txt uploaded by DEA (license 3)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 17:43:46 +00:00
Kevin P. Fleming 451c76c3b1 don't define Zaptel features as libraries, they aren't, and we don't want '--with-zaptel-<foo>' configure options for them
also some minor cleanups


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 17:31:46 +00:00
Joshua Colp 7980ac1261 Remove something that is never ever used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 16:47:02 +00:00
Jason Parker 93b0f037b4 Add sample events for aastra phones.
aastra-check-cfg is the same as the other check-cfg entries,
 and aastra-xml is to load a pre-configured xml script.

(closes issue #12229)
Reported by: gowen72
Patches:
      aastra.patch uploaded by gowen72 (license 432)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 16:37:31 +00:00
Joshua Colp ba63fd28c2 Merged revisions 109107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109107 | file | 2008-03-17 13:24:29 -0300 (Mon, 17 Mar 2008) | 4 lines

200 OKs in response to a reinvite need to be sent reliably. If the remote side does not receive one the dialog will be torn down.
(closes issue #12208)
Reported by: atrash

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 16:26:36 +00:00
Jason Parker d9e2a63e46 Blocked revisions 109057 via svnmerge
........
r109057 | qwell | 2008-03-17 10:15:56 -0500 (Mon, 17 Mar 2008) | 4 lines

Backport revision 106439 from trunk.  I didn't realize this was broken in 1.4 as well.

Closes issue #12222.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 15:16:41 +00:00
Joshua Colp f7f58d194e Make sure that the temporary sip_request structure is empty so that copy_request doesn't think it already has an ast_str.
(closes issue #12231)
Reported by: IgorG


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 14:37:40 +00:00
Mark Michelson 2c67438ebe Merged revisions 109012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109012 | mmichelson | 2008-03-17 09:18:26 -0500 (Mon, 17 Mar 2008) | 6 lines

Make sure that we release the lock on the spyee channel if the spyee or spy has hung up

(closes issue #12232)
Reported by: atis


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 14:21:14 +00:00
Michiel van Baak b311134430 Merged revisions 108961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108961 | mvanbaak | 2008-03-16 22:47:10 +0100 (Sun, 16 Mar 2008) | 7 lines

add missing break to case AST_CONTROL_SRCUPDATE

(closes issue #12228)
Reported by: andrew
Patches:
      SRC.patch uploaded by andrew (license 240)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 21:50:58 +00:00
Russell Bryant dfe03485a6 Remove an unnecessary thread attribute instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:55:53 +00:00
Russell Bryant 7ccd146656 Fix polling for mailbox changes in mailboxes that are not in the default vm context.
(closes issue #12223)
Reported by: DEA
Patches: 
      vm-polled-imap.txt uploaded by DEA (license 3)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:53:46 +00:00
Russell Bryant 072eb8a913 Remove a double write lock of the contexts lock in ast_wrlock_contexts().
How did this ever work?

(closes issue #12219)
Reported by: ys
Patches: 
      pbx.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-15 16:21:04 +00:00
Russell Bryant 928475694a Doxygenify dnsmgr.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 21:20:36 +00:00
Russell Bryant 1e5e1cbc0c Make sure configure is run before menuselect on a clean checkout
(closes issue #12197)
Reported by: juggie
Patches:
      12197.diff uploaded by juggie (license 24)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:14:06 +00:00
Russell Bryant 5bd4e32a4c Merged revisions 108796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108796 | russell | 2008-03-14 15:09:22 -0500 (Fri, 14 Mar 2008) | 5 lines

Fix a channel name issue.  chan_oss registers the "Console" channel type,
but it created channels with an "OSS" prefix.

(closes issue #12194, reported by davidw, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:09:37 +00:00
Russell Bryant a658a02aaa Merged revisions 108792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108792 | russell | 2008-03-14 15:04:35 -0500 (Fri, 14 Mar 2008) | 4 lines

Update the SuSE init script to start networking before asterisk, as well.

(closes issue #12200, reported by and change suggested by reinerotto)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:04:56 +00:00