aboutsummaryrefslogtreecommitdiffstats
path: root/res
AgeCommit message (Collapse)AuthorFilesLines
2007-11-29Properly escape input buffers (Fixes AST-2007-025)tilghman1-13/+66
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90160 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Changing some calls from free() to ast_free() since they were allocated withmmichelson1-3/+3
ast_calloc(). (closes issue #11390, reported and patched by Laureano) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89727 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Add module counting removal for error conditions.file1-0/+3
(closes issue #11333) Reported by: Laureano Patches: res_features_v2.c.patch uploaded by Laureano (license 265) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89599 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-25We previously attempted to use the ESCAPE clause to set the escape delimiter totilghman2-6/+23
a backslash. Unfortunately, this does not universally work on all databases, since on databases which natively use the backslash as a delimiter, the backslash itself needs to be delimited, but on other databases that have no delimiter, backslashing the backslash causes an error. So the only solution that I can come up with is to create an option in res_odbc that explicitly specifies whether or not backslash is a native delimiter. If it is, we use it natively; if not, we use the ESCAPE clause to make it one. Reported by: elguero Patch by: tilghman (Closes issue #11364) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89559 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24Free some frames that would otherwise leak on error.tilghman1-0/+3
Reported by: Laureano Patch by: Laureano,tilghman (Closes issue #11351) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89545 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23Use ESCAPE clause for the first parameter, not just 2nd-Nth parameters.tilghman1-1/+2
Reported by: apsaras Patch by: tilghman (Closes issue #11353) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21If a channel gets masqueraded in the middle of a park, don't play thetwilson1-8/+18
announcement to the masqueraded channel, and dial back to the original channel on timeout. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89491 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Print out the correct filename (features.conf) in the log message when ↵file1-1/+1
parkpos options are incorrect. (closes issue #11295) Reported by: Laureano Patches: res_features.c.patch uploaded by Laureano (license 265) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89419 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13Revert change from revision 67064.qwell1-1/+1
It is documented behavior that if a parking extension already exists while using PARKINGEXTEN, dialplan execution will continue. If blind transferring to a Park with PARKINGEXTEN, you must keep this in mind, and handle the failure yourself. Issue 11237, reported by jon. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89248 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07In response to 10578, I just ran 1.4 thru valgrind; some of the config ↵murf1-0/+1
leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89088 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06Fix init_classes() so that classes that actually do have files loaded aren'trussell1-1/+1
treated as empty, and immediately destroyed ... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89053 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06If someone were to delete the files used by an existing MOH class, and thenrussell1-3/+15
issue a reload, further use of that class could result in a crash due to dividing by zero. This set of changes fixes up some places to prevent this from happening. (closes issue #10948) Reported by: jcomellas Patches: res_musiconhold_division_by_zero.patch uploaded by jcomellas (license 282) Additional changes added by me. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89037 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05Don't check used pooled connections for connection status, as it will cause ↵tilghman1-1/+1
issues for prepared queries. Reported by: Nick Gorham (via -dev list) Patch by: tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88539 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31Make sure we free some allocated memory before returning.qwell1-0/+1
Issue 11131, patch by eliel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87908 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30Add two more checks before printing out a warning message about bridging. If ↵file1-2/+2
either channel has hungup of course the bridge will have failed. (closes issue #10009) Reported by: dimas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87571 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-12Fix a spelling error in a log message. SMDI, not SDMI.russell1-2/+2
(closes issue #10959) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85517 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-07Presence packets from a client who's connected with our Jabber ID arephsultan1-2/+6
valid, therefore, those clients must be considered as buddies. The resource string helps us make the distinction between clients. Closes issue #10707, reported by yusufmotiwala. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84902 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-07Prevent Asterisk from crashing when receiving a presence packetphsultan1-9/+4
without resource from a buddy that is known to have a resource list. Revert a change I previously made, where Asterisk could point to a freed memory location. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84890 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-02Fix some odd formatting I missed..qwell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84437 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-02Finish up on transferee channel before return on failure.qwell1-2/+7
Issue 10821, patch by Ivan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84410 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Add another sanity check in the AGI read loop. We really don't care aboutrussell1-0/+2
EAGAIN unless we didn't read an entire line. If there is a newline at the end if the read buffer, break, because we got the whole thing. (reported and patched by bmd) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84236 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Fix randomness. save_pos was being set to 0 initially instead of -1, causing ↵file1-0/+1
it to jump to position 0 when moh started. (closes issue #10859) Reported by: jamesgolovich Patches: asterisk-mohpos2.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84160 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set ofrussell1-6/+6
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18Add a new patch to handle interrupting the fgets() call when using FastAGI.russell1-4/+25
This version of the patch maintains the original behavior of the code when not using FastAGI. (closes issue #10553) Reported by: juggie Patches: res_agi_fgets-4.patch uploaded by juggie (license 24) res_agi_fgets_1.4svn.patch uploaded by juggie (license 24) Slight mods by me Tested by: juggie, festr git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82929 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Handle the case where there are multiple dynamic features with the same digitrussell1-4/+8
mapping, but won't always match the activated on/by access controls. In that case, the code needs to keep trying features for a match. (reported by Atis on the asterisk-dev list, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82594 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Fix a check of the wrong pointer, as pointed out by an XXX comment left in russell1-1/+1
the code. The problem was harmless, however. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82296 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12revert patch from issue #10553, as someone not using fastagi reported that thisrussell1-16/+1
broke their system. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82278 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-11(closes issue #10553)russell1-7/+25
Reported by: juggie Patches: res_agi_fgets-2.patch uploaded by juggie (license 24) Tested by: juggie When using fastagi, fgets() can return before a full line is read. Add explicit handling for the case where it gets interrupted. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82245 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06Fixes a memory leakmmichelson1-1/+1
(closes issue #10658, reported and patched by Ivan) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81682 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06According to both RFC 3920 - section 9.1.2 - and Google's XMPP serverphsultan1-1/+1
complaint, if set, the 'from' attribute must be set to the user's full JID. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81650 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-05Fix an issue that can occur when you do an attended transfer to parking. Ifrussell1-1/+5
you complete the transfer before the announcement of the parking spot finishes, then the channel being parked will hear the remainder of the announcement. These changes make it so that will not happen anymore. Basically, res_features sets a flag on the channel is playing the announcement to so that the file streaming core knows that it needs to watch out for a channel masquerade, and if it occurs, to abort the announcement. (closes BE-182) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81599 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-31Make it the engine's responsible to check for the presence of results.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81406 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-31(closes issue #10618)file1-8/+1
Reported by: dimas Don't pass through the stopped sounds frame.... just drop it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81403 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-30(closes issue #10009)file1-1/+2
Reported by: dimas Don't output a bridge failed warning message if it failed because one of the channels was part of the masquerade process. That is perfectly normal. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81401 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-30(issue #10599)file1-0/+7
Reported by: dimas Handle the -1 control subclass during feature dialing (it indicates to stop sounds). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81369 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-27(closes issue #10419)russell1-5/+5
Reported by: mustardman Patches: asterisk-mohposition.diff.txt uploaded by jamesgolovich (license 176) This patch fixes a few problems with music on hold. * Fix issues with starting at the beginning of a file when it shouldn't. * Fix the inuse counter to be decremented even if the class had not been set to be deleted when not in use anymore * Don't arbitrarily limit the number of MOH files to 255 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23When executing a dynamic feature, don't look it up a second time by digit ↵russell1-16/+9
pattern after we already looked it up by name. This causes broken behavior if there is more than one feature defined with the same digit pattern. (closes issue #10539, reported by bungalow, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80573 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23Revert res_agi fix that didn't quite work until we get it right ...russell1-8/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80469 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-22Juggie in #asterisk-dev was reporting problems where fgets would returnrussell1-1/+9
without reading the whole line when using fastagi. When this happens, errno was set to EINTR or EAGAIN. This patch accounts for the possibility and lets fgets continue in that case. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80360 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Fix a little race condition that could cause a crash if two channels had MOHrussell1-3/+1
stopped at the same time that were using a class that had been marked for deletion when its use count hits zero. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79792 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16This patch fixes a bug where reloading the module with "module reload" did notrussell1-30/+48
delete classes from memory that were no longer in the config. This patch fixes that problem as well as another one. Previously, if you reloaded MOH using the "moh reload" CLI command, which behaved differently than "module reload ...", MOH had to be stopped on every channel and started again immediately. However, there was no way to tell what class was being used, so they would all fall back to the default class. (closes issue #10139) Reported by: blitzrage Patches: asterisk-10139-advanced.diff.txt uploaded by jamesgolovich (license 176) Tested by: jamesgolovich git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79778 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16A fix for two critical problems detected while working with Danielphsultan1-0/+27
McKeehan in issue #10184. Upon priority change, the resource list is not NULL terminated when moving an item to the end of the list. This makes Asterisk endlessy loop whenever it needs to read the list. Jids with different resource and priority values, like in Gmail's and GoogleTalk's jabber clients put that problem in evidence. Upon reception of a 'from' attribute with an empty resource string, Asterisk crashes when trying to access the found->cap pointer if the resource list for the given buddy is not empty. This situation is perfectly valid and must be handled. The Gizmoproject's jabber client put that problem in evidence. Also added a few comments in the code as well as a handle for the capabilities from Gmail's jabber client, which are stored in a caps:c tag rather than the usual c tag. Closes issue #10184. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79665 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-14(closes issue #10415)file1-7/+11
Reported by: atis Revert fix for #10327 as it causes more issues then it solves. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13Instead of accepting a single DTMF character accept a full string.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79334 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13Add an API call to allow the engine to know that DTMF was received.file1-0/+15
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79207 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-11Ensure the connection gets marked as used at allocation time (closes issue ↵tilghman1-2/+10
#10429, report and fix by mnicholson) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79142 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Fix the build of this module on 64-bit platformsrussell1-8/+12
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78488 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Don't free the environment handle when the connection fails, because other ↵tilghman1-3/+0
connections might be depending upon it git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78437 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Reconnection doesn't happen automatically when a DB goes down (fixes issue ↵tilghman1-98/+57
#9389) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@78415 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Add a flag to the speech API that allows an engine to set whether it ↵file1-1/+2
received results or not. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77831 f38db490-d61c-443f-a65b-d21fe96a405b