Commit Graph

241 Commits

Author SHA1 Message Date
Tilghman Lesher
56e908b787 Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:36:33 +00:00
Jason Parker
f29e9e72ba swap location for this..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 19:51:39 +00:00
Jason Parker
01b6eae2e5 Document the 'l' option to the CDR() function.
(Thanks voipgate for pointing out the option, and Leif for providing text for it.)

Closes issue #11695.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 19:51:10 +00:00
Tilghman Lesher
1dde474916 Missing braces.
(closes issue #11912)
 Reported by: dimas
 Patches: 
       sprintf.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 05:10:02 +00:00
Joshua Colp
91762636b9 Don't try to copy the category from the group if no category exists.
(closes issue #11724)
Reported by: IgorG
Patches:
      group_count.v1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 15:07:12 +00:00
Joshua Colp
edfb14d0f6 If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue #11077)
Reported by: m4him


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 19:53:52 +00:00
Tilghman Lesher
3d142f0271 Allow the default "0" to be returned if the STAT fails
(Closes issue #11659)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 20:27:26 +00:00
Kevin P. Fleming
fd1e942f53 fix some copy-and-paste leftovers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:21:08 +00:00
Kevin P. Fleming
627f595c58 In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Russell Bryant
c1556baa9f fix some formatting i accidentally changed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 00:36:59 +00:00
Russell Bryant
2fc83c3db1 This set of changes is to make some callerID handling thread-safe.
The ast_set_callerid() function needed to lock the channel.  Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 00:20:34 +00:00
Tilghman Lesher
1d33d680b9 Default result of STAT should be "0" not "".
Reported via the -users mailing list, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 15:38:03 +00:00
Jason Parker
71319ccaa9 Allow some function modules to compile under dev mode.
Issue 11104, patch by andrew.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 17:13:04 +00:00
Tilghman Lesher
18eafd3074 Add autoservice to several more functions which might delay in their responses.
Also, make sure that func_odbc functions have a channel on which to set
variables.
Reported by russell
Fixed by tilghman
Closes issue #11099


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-28 13:46:55 +00:00
Tilghman Lesher
aa7f0bf1b2 The addition of autoservice to func_curl additionally made func_curl dependent
on the existence of a channel, with no real reason.  This should make func_curl
once again work without a channel.
Reported by jmls.
Fixed by tilghman.
Closes issue #11090


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26 13:54:30 +00:00
Tilghman Lesher
5ee24bef92 Backport alternate encoding of newline delimiters from trunk to 1.4, as approved by Russell
Reported by blitzrage
Closes issue #10903


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-25 22:53:06 +00:00
Steve Murphy
9ecad31855 closes issue #11052 -- where nothing after the ? will allow un-initialized variable values to corrupt and crash asterisk on 64-bit platforms
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-23 21:18:08 +00:00
Russell Bryant
f59ad2a3ed Using curl can take a substantial amount of time, so the channel should be
autoserviced while waiting for it to complete.
(closes issue #10725, reported by mnicholson)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 19:34:25 +00:00
Tilghman Lesher
a390611c48 The IF() function was not allowing true values that had embedded colons (closes issue #10613)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-31 19:16:52 +00:00
Russell Bryant
7b1aaf8791 Revert very broken fix for issue #10540 ... none of these values take ms so I
don't know what I was thinking


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 19:29:44 +00:00
Russell Bryant
e5be9cb65f Fix func_timeout to take values in floating point so 1.5 actually means
1.5 seconds instead of being rounded.
(closes issue #10540, reported by spendergrass, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 19:21:53 +00:00
Russell Bryant
cbdc6b5b2d To prevent 92138749238754 more reports of "I have unixodbc installed, but
still can't build *_odbc.so!", check for ltdl directly, instead of just listing
it as another library to include in the unixodbc check in the configure script.
This also makes ltdl show up as a dependency in menuselect so people know what
to go install.  (related to issue #9989, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@69702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 16:35:02 +00:00
Jason Parker
5305d9c27f Merged revisions 69258 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69258 | qwell | 2007-06-14 10:15:53 -0500 (Thu, 14 Jun 2007) | 4 lines

Change a quite broken while loop to a for loop, so "continue;" works as expected instead of eating 99% CPU...

Issue 9966, patch by me.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@69259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 15:21:29 +00:00
Tilghman Lesher
cb8813a250 Merged revisions 67161 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r67161 | tilghman | 2007-06-04 18:41:49 -0500 (Mon, 04 Jun 2007) | 2 lines

According to MATH, 0+1181000386 = 1181000448.  Oops.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 23:43:01 +00:00
Tilghman Lesher
70b882702c On some drivers, deallocating the statement handle isn't enough. We also have to clear the cursor (nice, Oracle)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-01 21:45:44 +00:00
Tilghman Lesher
e21412d53d Merged revisions 66537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r66537 | tilghman | 2007-05-29 16:49:35 -0500 (Tue, 29 May 2007) | 2 lines

If the value of a variable passed to FIELDQTY is blank, then FIELDQTY should return 0, not 1.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 21:56:07 +00:00
Dwayne M. Hubbard
f4fc851405 merged qwell's func_math patch for issue 9507
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@65866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 15:08:56 +00:00
Joshua Colp
1d4adc0174 Merged revisions 61804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r61804 | file | 2007-04-25 14:52:50 -0400 (Wed, 25 Apr 2007) | 2 lines

Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 19:21:54 +00:00
Tilghman Lesher
1572777fa0 Merged revisions 61680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r61680 | tilghman | 2007-04-18 21:30:18 -0500 (Wed, 18 Apr 2007) | 5 lines

Bug 9557 - Specifying the GetVar AMI action without a Channel parameter can
cause Asterisk to crash.  The reason this needs to be fixed in the functions
instead of in AMI is because Channel can legitimately be NULL, such as when
retrieving global variables.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@61681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-19 02:45:05 +00:00
Russell Bryant
c0aca26f30 Convert the RTPQOS function to just be additional parameter of the CHANNEL
function.  This way, it will be possible for other RTP based channel drivers
to expose this information in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 16:20:53 +00:00
Tilghman Lesher
7246207bd8 Oops, this should have been a %d all along
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-19 22:29:56 +00:00
Joshua Colp
54a94c650b Fix typo in help for CDR function. (issue #9295 reported by ajohnson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-19 15:52:28 +00:00
Tilghman Lesher
1771f9621d Function works fine, but the documentation is backwards.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-15 22:32:33 +00:00
Tilghman Lesher
2fd66654ac Issue 9162 - pbx_substitute_variables_helper assumes the buffer is initialized
to all zeroes.  This fixes a case where it wasn't.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-14 01:47:08 +00:00
Kevin P. Fleming
07462b8d1b add some inter-module dependencies
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-09 23:51:41 +00:00
Russell Bryant
51bcb9d3be Fix the FIELDQTY function to not crash. (reported by blitzrage and Corydon on IRC)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:24:52 +00:00
Joshua Colp
290fd87817 Make func_strings build under dev mode. Didn't I do this today already in the berkeley DB?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:06:02 +00:00
Tilghman Lesher
86f51691c5 Oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 20:13:40 +00:00
Tilghman Lesher
a94d8f5bd8 Merged revisions 53074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53074 | tilghman | 2007-02-01 14:07:35 -0600 (Thu, 01 Feb 2007) | 2 lines

Bug 8965 - Allow FIELDQTY to work with both variables and dialplan functions

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 20:09:52 +00:00
Tilghman Lesher
7e0a469bda Merged revisions 53069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53069 | tilghman | 2007-02-01 13:13:53 -0600 (Thu, 01 Feb 2007) | 2 lines

No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 19:21:20 +00:00
Jason Parker
76eb4e76dc Add some more checks for option_debug before ast_log(LOG_DEBUG, ...) calls.
Issue 8832, patch(es) by tgrman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 22:50:23 +00:00
Russell Bryant
8d0defa82b Fix some instances where when loading func_odbc, a double-free could occur.
Also, remove an unneeded error message.  If the failure condition is
actually a memory allocation failure, a log message will already be
generated automatically.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@51205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 23:31:11 +00:00
Russell Bryant
525f5e6d75 Fix the REALTIME() dialplan function. ast_build_string() advances the string
pointer to the position to begin the next write into the buffer.  So, this 
pointer can not be used to copy the contents of the string later.  The
beginning of the buffer must be saved.  Interestingly enough, this code could
not have ever worked.  (Pointed out by Sebb on IRC, thanks!)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 04:33:00 +00:00
Russell Bryant
ab43c25d33 Merged revisions 48955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48955 | russell | 2006-12-25 00:19:48 -0500 (Mon, 25 Dec 2006) | 6 lines

Fix an error introduced by copying and pasting the handling of the >= operator
for the MATH function.  If a single equal sign was used as an operator, the
function would treat it is as if it were the >= operator.  Now, it properly
handles it as an invalid operator.
(issue #8665, patch by tempest1)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-25 05:21:20 +00:00
Kevin P. Fleming
8e900c7db7 use the proper variable type for these unixODBC API calls, eliminating warnings on 64-bit platforms that use the 'new' 64-bit types for ODBC API calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 14:57:09 +00:00
Kevin P. Fleming
c2490f8e72 instead of initializing the curl library every time the CURL() function is invoked, do it only once per thread (this allows multiple calls to CURL() in the dialplan for a channel to run much more quickly, and also to re-use connections to the server) (thanks to JerJer for frequently complaining about this performance problem)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 04:25:09 +00:00
Tilghman Lesher
fda0dce406 STRFTIME() does not actually require an argument (issue 8540)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 05:37:09 +00:00
Steve Murphy
be037061e8 might as well also document the raw values of the flag vars
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-26 00:26:16 +00:00
Steve Murphy
f4b1302b95 A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-26 00:01:34 +00:00
Joshua Colp
039c552a47 Small documentation clarification for URIENCODE. (issue #8294 reported by salaud)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 21:30:44 +00:00