Commit Graph

13173 Commits

Author SHA1 Message Date
Steve Murphy
7c1d2de899 app_page was failing to compile in dev-mode on my gcc-4.2.4 system. This change gets rid of the warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 19:34:35 +00:00
Tilghman Lesher
99313c7b92 Don't read into a buffer without first checking if a value is beyond the end.
(closes issue #13600)
 Reported by: atis
 Patches: 
       20090106__bug13600.diff.txt uploaded by Corydon76 (license 14)
 Tested by: atis


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 19:02:55 +00:00
Mark Michelson
3af85c8b97 Fix a logic error I found while searching through chan_agent.c
I found that the allow_multiple_logins function would never return
0 due to an incorrect comparison being used when traversing the
list of agents. While I was modifying this function, I also did
a little bit of coding guidelines cleanup, too.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 16:19:26 +00:00
Terry Wilson
b3ea953313 Don't overflow when paging more than 128 extensions
The number of available slots for calls in app_page was hardcoded to 128.
Proper bounds checking was not in place to enforce this limit, so if more than
128 extensions were passed to the Page() app, Asterisk would crash.  This patch
instead dynamically allocates memory for the ast_dial structures and removes
the (non-functional) arbitrary limit.

This issue would have special importance to anyone who is dynamically creating
the argument passed to the Page application and allowing more than 128
extensions to be added by an outside user via some external interface.

The patch posted by a_villacis was slightly modified for some coding guidelines
and other cleanups.  Thanks, a_villacis!
(closes issue #14217)
Reported by: a_villacis
Patches: 
      20080912-asterisk-app_page-fix-buffer-overflow.patch uploaded by a (license 660)
Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 01:27:18 +00:00
Russell Bryant
9161b7fc87 Revert unnecessary indications API change from rev 122314
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 19:13:05 +00:00
Terry Wilson
1dc0a2d811 Don't pass a value with a side effect to a macro
(closes issue #14176)
Reported by: paraeco
Patches: 
      chan_sip.c.diff uploaded by paraeco (license 658)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 18:34:14 +00:00
Tilghman Lesher
ebe9c9c5db If either conditional is NULL, don't try copying it.
(closes issue #14226)
 Reported by: caspy
 Patches: 
       20090113__bug14226.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 17:48:00 +00:00
Jeff Peeler
b01ec2512d (closes issue #13881)
Reported by: hoowa

Update the app CDR field for AGI commands that are not executing an application via "exec".


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 21:42:34 +00:00
Jeff Peeler
f1c216e940 (closes issue #12269)
Reported by: IgorG
Tested by: denisgalvao

This gits rid of the notion of an owning_app allowing the request and hangup to be initiated by different threads. Originating from an active agent channel requires this. The implementation primarily changes __login_exec to wait on a condition variable rather than a lock.

Review: http://reviewboard.digium.com/r/35/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 20:26:22 +00:00
Mark Michelson
2d10fef93e I am reverting the fix made in revision 168128 (and its upward merges)
after being contacted by Olle Johansson and being shown how this fix is
incorrect. Thanks to Olle for clearing this up for me.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 14:58:25 +00:00
Russell Bryant
5dca47a8bf s/ringdance/ringcadence/ for Bulgaria
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 14:57:27 +00:00
Kevin P. Fleming
a8af968c1d small commit to test new server
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-10 20:47:31 +00:00
Kevin P. Fleming
066f4cac24 small commit to test new server
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-10 20:38:38 +00:00
Kevin P. Fleming
e87d91c541 update to use new sound file packages that include license files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 23:12:29 +00:00
Russell Bryant
b28fcc36f2 Make this compile for mvanbaak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 22:14:38 +00:00
Richard Mudgett
c992d555e3 * Fix for JIRA AST-175/ABE-1757
*  Miscellaneous doxygen comments added.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 21:28:42 +00:00
Mark Michelson
2fe132ca35 Add check_via calls to more request handlers
INFO, NOTIFY, OPTIONS, REFER, and MESSAGE requests
were not checking the topmost Via to determine where
to send the response. Adding check_via calls to those
request handlers solves this.

(closes issue #13071)
Reported by: baron
Patches:
      check_via.patch uploaded by baron (license 531)
Tested by: baron


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 20:08:04 +00:00
Tilghman Lesher
8c0191f0dc Don't truncate database results at 255 chars.
(closes issue #14069)
 Reported by: evandro
 Patches: 
       20081214__bug14069.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 22:08:56 +00:00
Kevin P. Fleming
ead4ba5cd8 remove an unnecessary argument to queue_request()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 17:24:21 +00:00
Kevin P. Fleming
975a706909 When a SIP request or response arrives for a dialog with an associated Asterisk channel, and the lock on that channel cannot be obtained because it is held by another thread, instead of dropping the request/response, queue it for later processing when the channel lock becomes available.
http://reviewboard.digium.com/r/117/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 23:32:21 +00:00
Russell Bryant
5fe8bde41a Fix the last couple of places where free() was improperly used directly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:35:36 +00:00
Russell Bryant
2839e074ef Don't fclose() the file early, the filestream destructor will handle it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:26:42 +00:00
Russell Bryant
301945890d Only try to close the file if one was actually opened
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:19:47 +00:00
Russell Bryant
c67d152525 Don't use free() directly. This caused a crash since ast_filestream is now an ao2 object.
Reported by JunK-Y on IRC, #asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:03:59 +00:00
Russell Bryant
24ccfad6dc Treat an empty string the same way as a NULL country argument.
In passing, simplify the handling of returning a default tone zone.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 17:29:53 +00:00
Mark Michelson
5eca294b65 Use the correct variable when creating the format string
(closes issue #14177)
Reported by: nic_bellamy
Patches:
      asterisk-trunk-svn-r167242-ast_db_gettree.patch uploaded by nic (license 299)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 21:35:57 +00:00
Tilghman Lesher
8476207008 Merged revisions 167259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r167259 | tilghman | 2009-01-06 14:44:03 -0600 (Tue, 06 Jan 2009) | 2 lines
  
  Security fix AST-2009-001.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 20:48:05 +00:00
Mark Michelson
543dfee83c A couple of changes to T.38 SDP attribute handling
There are some boolean attributes for T.38 such
as T38FaxFillBitRemoval, T38FaxTranscodingMMR, and
T38FaxTranscodingJBIG. By simply being present, we
should treat these as a "true" value. The current
code, however, was requiring a 1 or 0 as the value
of the attribute in order to parse it. This is due
to the fact that there are some T.38 endpoints and
gateways that also transmit this information
incorrectly. This patch follows the "be liberal in
what you accept and strict in what you send"
philosophy by accepting both the correctly- and 
incorrectly-formatted attributes, but only sending
information as it is supposed to be sent.

It was also discovered that a particular type of 
T.38 gateway sends some non-standard T.38 SDP
attributes. Instead of using T38FaxMaxDatagram
and T38MaxBitRate, it used T38MaxDatagram and
T38FaxMaxRate respectively. We now will properly
accept these attributes as well.

Note that there are a lot of patches cited in
the below commit message template. This is
because the person who submitted these patches is
an awesome person and wrote 1.4, 1.6.0, and 1.6.1
variants.

(closes issue #13976)
Reported by: linulin
Patches:
     chan_sip.c.1.4-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.0-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.1-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.4-relaxedT38_update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.0-relaxedT38_update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.1-relaxedT38_update1.diff uploaded by arcivanov (license 648)
Tested by: arcivanov



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-05 16:51:59 +00:00
Tilghman Lesher
30fe8c619d Repeat attempts to write when we receive -EAGAIN from the driver, as detailed
in the ALSA sample code (see http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html#a32)
Reported by: Jerry Geis (via the -users list)
Fixed by: me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-01 00:01:22 +00:00
Tilghman Lesher
f3f0f40223 Also inherit the musiconhold class.
(Closes #14153)
Reported by: Jerry Geis, via the users list.
Patch by: me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 19:20:35 +00:00
Russell Bryant
d4ac0f7651 Use strncat() instead of an sprintf() in which source and target buffers overlap
http://lists.digium.com/pipermail/asterisk-dev/2008-December/035919.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-28 15:13:48 +00:00
Tilghman Lesher
5dd486be22 Compile, even if both DAHDI and Zaptel are not installed.
(Closes issue #14120)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:35:38 +00:00
Mark Michelson
62c8625f2e Fix a crash resulting from a datastore with inheritance but no duplicate callback
The fix for this is to simply set the newly created datastore's data pointer
to NULL if it is inherited but has no duplicate callback.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:16:26 +00:00
Tilghman Lesher
45bc54db0a Use the integer form of condition for integer comparisons.
(closes issue #14127)
 Reported by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 04:05:25 +00:00
Mark Michelson
4133fa7cfc Fix a deadlock relating to channel locks and autoservice
It has been discovered that if a channel is locked prior
to a call to ast_autoservice_stop, then it is likely that
a deadlock will occur. The reason is that the call to 
ast_autoservice_stop has a check built into it to be sure
that the thread running autoservice is not currently trying
to manipulate the channel we are about to pull out of 
autoservice.

The autoservice thread, however, cannot advance beyond where
it currently is, though, because it is trying to acquire
the lock of the channel for which autoservice is attempting
to be stopped.

The gist of all this is that a channel MUST NOT be locked
when attempting to stop autoservice on the channel.

In this particular case, the channel was locked by a call
to ast_read. A call to ast_exists_extension led to autoservice
being started and stopped due to the existence of dialplan
switches.

It may be that there are future commits which handle the same
symptoms but in a different location, but based on my looks through
the code, it is very rare to see a construct such as this one.

(closes issue #14057)
Reported by: rtrauntvein
Patches:
      14057v3.patch uploaded by putnopvut (license 60)
Tested by: rtrauntvein

Review: http://reviewboard.digium.com/r/107/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 20:56:29 +00:00
Russell Bryant
8b68bd17e5 Fix up timeout handling in ast_carefulwrite().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 17:22:56 +00:00
Russell Bryant
acd0af78ea Re-work ref count handling of MoH classes using astobj2 to resolve crashes.
(closes issue #13566)
Reported by: igorcarneiro
Tested by: russell
Review: http://reviewboard.digium.com/r/106/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 14:45:27 +00:00
Mark Michelson
7fdf99803e Backport of AUDIOHOOK_INHERIT for Asterisk 1.4
(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:34:57 +00:00
Steve Murphy
e3700a13a4 This merges the masqpark branch into 1.4
These changes eliminate the need for (and use of)
the KEEPALIVE return code in res_features.c;
There are other places that use this result code
for similar purposes at a higher level, these appear
to be left alone in 1.4, but attacked in trunk.

The reason these changes are being made in 1.4, is
that parking ends a channel's life, in some situations,
and the code in the bridge (and some other places),
was not checking the result code properly, and dereferencing
the channel pointer, which could lead to memory corruption
and crashes.

Calling the masq_park function eliminates this danger 
in higher levels.

A series of previous commits have replaced some parking calls
with masq_park, but this patch puts them ALL to rest,
(except one, purposely left alone because a masquerade
is done anyway), and gets rid of the code that tests
the KEEPALIVE result, and the NOHANGUP_PEER result codes.

While bug 13820 inspired this work, this patch does
not solve all the problems mentioned there.

I have tested this patch (again) to make sure I have
not introduced regressions. 

Crashes that occurred when a parked party hung up
while the parking party was listening to the numbers
of the parking stall being assigned, is eliminated.

These are the cases where parking code may be activated:

1. Feature one touch (eg. *3)
2. Feature blind xfer to parking lot (eg ##700)
3. Run Park() app from dialplan (eg sip xfer to 700)
   (eg. dahdi hookflash xfer to 700)
4. Run Park via manager.

The interesting testing cases for parking are:
I. A calls B, A parks B
    a. B hangs up while A is getting the numbers announced.
    b. B hangs up after A gets the announcement, but 
       before the parking time expires
    c. B waits, time expires, A is redialed,
       A answers, B and A are connected, after
       which, B hangs up.
    d. C picks up B while still in parking lot.

II. A calls B, B parks A
    a. A hangs up while B is getting the numbers announced.
    b. A hangs up after B gets the announcement, but 
       before the parking time expires
    c. A waits, time expires, B is redialed,
       B answers, A and B are connected, after
       which, A hangs up.
    d. C picks up A while still in parking lot.

Testing this throroughly involves acting all the permutations
of I and II, in situations 1,2,3, and 4.

Since I added a few more changes (ALL references to KEEPALIVE in the bridge
code eliimated (I missed one earlier), I retested
most of the above cases, and no crashes.

H-extension weirdness.

Current h-extension execution is not completely
correct for several of the cases.

For the case where A calls B, and A parks B, the
'h' exten is run on A's channel as soon as the park
is accomplished. This is expected behavior.

But when A calls B, and B parks A, this will be
current behavior:

After B parks A, B is hung up by the system, and
the 'h' (hangup) exten gets run, but the channel
mentioned will be a derivative of A's...

Thus, if A is DAHDI/1, and B is DAHDI/2,
the h-extension will be run on channel
Parked/DAHDI/1-1<ZOMBIE>, and the 
start/answer/end info will be those 
relating to Channel A.

And, in the case where A is reconnected to
B after the park time expires, when both parties
hang up after the joyful reunion, no h-exten
will be run at all.

In the case where C picks up A from the 
parking lot, when either A or C hang up,
the h-exten will be run for the C channel.

CDR's are a separate issue, and not addressed
here.

As to WHY this strange behavior occurs, 
the answer lies in the procedure followed
to accomplish handing over the channel
to the parking manager thread. This procedure
is called masquerading. In the process,
a duplicate copy of the channel is created,
and most of the active data is given to the
new copy. The original channel gets its name
changed to XXX<ZOMBIE> and keeps the PBX
information for the sake of the original
thread (preserving its role as a call 
originator, if it had this role to begin
with), while the new channel is without
this info and becomes a call target (a
"peer").

In this case, the parking lot manager
thread is handed the new (masqueraded)
channel. It will not run an h-exten
on the channel if it hangs up while
in the parking lot. The h exten will
be run on the original channel instead,
in the original thread, after the bridge
completes.

See bug 13820 for our intentions as
to how to clean up the h exten behavior.

Review: http://reviewboard.digium.com/r/29/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 22:30:32 +00:00
Jeff Peeler
e0bec5d67d (closes issue #13480)
Reported by: tzafrir

Replace a bunch of if defined checks for Zaptel/DAHDI through several new defines in dahdi_compat.h. This removes a lot of code duplication. Example from bug:

#ifdef HAVE_ZAPTEL
  fd = open("/dev/zap/pseudo", O_RDWR);
#else
  fd = open("/dev/dahdi/pseudo", O_RDWR);
#endif

is replaced with:
  fd = open(DAHDI_FILE_PSEUDO, O_RDRW);



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 19:48:00 +00:00
Russell Bryant
5de6848d0c Ensure that the chanspy datastore is fully initialized.
This patch resolved some random crash issues observed by a user on a BSD system

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 15:03:02 +00:00
Russell Bryant
991494f2c0 Make ast_carefulwrite() be more careful.
This patch handles some additional cases that could result in partial writes
to the file description.  This was done to address complaints about partial
writes on AMI.

(issue #13546) (more changes needed to address potential problems in 1.6)
Reported by: srt
Tested by: russell
Review: http://reviewboard.digium.com/r/99/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:39:25 +00:00
Tilghman Lesher
139be9556b Add mutexes around accesses to the IMAP library interface. This prevents
certain crashes, especially when shared mailboxes are used.
(closes issue #13653)
 Reported by: howardwilkinson
 Patches: 
       asterisk-1.4.21.2-appvoicemail-sharedimap-lock.patch uploaded by howardwilkinson (license 590)
 Tested by: jpeeler


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:14:47 +00:00
Russell Bryant
0d24c2ed92 Set the process group ID on the MOH process so that all children will get killed
(closes issue #14099)
Reported by: caspy
Patches:
      res_musiconhold.c.patch.killpg.try2 uploaded by caspy (license 645)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 18:52:18 +00:00
Joshua Colp
3a354c3500 Only care about a compatible codec for early bridging if we are actually bridging to another channel. If we are not we actually want to bring the audio back to us.
(closes issue #13545)
Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 17:11:42 +00:00
Joshua Colp
3a0e7aec6a Do not crash if we are not passed in a followme id.
(closes issue #14106)
Reported by: ys
Patches:
      app_followme.c.2.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 16:07:37 +00:00
Tilghman Lesher
8468d435e8 Reverse the fix from issue #6176 and add proper handling for that issue.
(Closes issue #13962, closes issue #13363)
Fixed by myself (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:14:37 +00:00
Mark Michelson
a391fd9b1c Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@165255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 20:51:38 +00:00
Mark Michelson
c49c8b9a3a After looking through SIP registration code most of the day, this
is one of the few things I could find that was just plain wrong.
Even though it probably isn't possible for it to happen, it seems weird
to have code that checks if a pointer is NULL and then immediately dereferences
that pointer if it was NULL.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 23:04:27 +00:00
Russell Bryant
63444acf6b Fix an issue where DEBUG_THREADS may erroneously report that a thread
is exiting while holding a lock.

If the last lock attempt was a trylock, and it failed, it will still be in the
list of locks so that it can be reported.

(closes issue #13219)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@164881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 21:38:29 +00:00