Russell Bryant
4fe3960478
move ast_carefulwrite from manager.c to utils.c so that cli.c and
...
res_agi.c no longer depend on manager.h (issue #6397 , casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
326afa4900
use ast_malloc instead of malloc
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Luigi Rizzo
2876a25505
add 'show threads' and 'show profile' commands.
...
These are momstly debugging tools for developers,
a bit documented in the header files (utils.h),
although more documentation is definitely necessary.
The performance impact is close to zero(*) so there is no
need to compile it conditionally.
(*) not completely true - thread destruction still needs
to search a list _but_ this can be easily optimized if we
end up with hundreds of active threads (in which case, though,
the problem is clearly elsewhere).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Tilghman Lesher
2cd46d59ea
Bug 6829 - asprintf for Solaris
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Luigi Rizzo
a7ec530a64
initial implementation of support for native atomic ops.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Kevin P. Fleming
2b408e88a9
don't wrap this in ifdef... using va_start is safe on all platforms :-)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Olle Johansson
5ed117e976
Doxygen changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Olle Johansson
ab758ab2ed
Portability issue - make stringfields work on FreeBSD 4.x (oej/rizzo)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Kevin P. Fleming
302c943001
add 'consumed' argument to ast_get_time_t, so callers can know how many characters were used in the parser
...
update pbx_dundi to use ast_get_time_t
eliminate some compiler warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Kevin P. Fleming
4662d58b01
add API function for parsing strings to time_t (issue #6320 , with mods)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Russell Bryant
8232b40884
eliminate warning on older versions of gcc
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
19 years ago
Tilghman Lesher
34bcd0e0b6
Bug 6322 - Implementation of SHA1 in Asterisk (plus dialplan function to use it)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
4467ab62c8
string field manager improvements:
...
use multiple memory blocks, instead of realloc(), ensuring that field pointers will never become invalid or change
don't run vs(n)printf twice when doing a field build unless required
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Olle Johansson
aa7974450b
Declare missing randomlock
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Tilghman Lesher
935c80d5e6
Bug 5961 - new RAND() function
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
1fe5108763
ensure that string field 'build' operation only evaluates arguments one time
...
fix some minor documentation errors
return proper type from string field space allocator
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
80fa9689b7
add memory-pool based string field management for structures
...
convert chan_sip sip_pvt and sip_registry structures to use string fields
add 'const' qualifiers to a few API calls that don't modify their input strings
add an asprintf() wrapper to astmm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
0da13c21b4
- move the string join() function to utils.c since it is used in both cli.c and res_agi.c
...
- reimplement ast_join to be of linear effieciency instead of quadratic
- remove some useless checks for "if (e)"
- reorder checks for strings starting with '_' to avoid a useless call to ast_join()
- check array bounds when parsing arguments to AGI
(issue #5868 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
6ca9632df5
Merged revisions 7468 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7468 | kpfleming | 2005-12-13 10:06:27 -0600 (Tue, 13 Dec 2005) | 2 lines
correct broken math in tvfix() for timestamp values over one million
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
2c65582b66
remove extraneous svn:executable properties
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
0941c32d38
issue #5569 minus lock.h changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
7ffb604a2f
issue #4678
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
d6b64431b0
issue #5549
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
c3f9388b23
provide an alternate getloadavg implementation and a fallback for systems that don't have it at all (issue #5549 with minor mods)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
20a7a4ca96
silence compiler warning
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
a736096e0b
change ast_strlen_zero to also check for the string to be defined
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
87d4ff6fcd
remove duplicate header
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
6324072247
more doxygenification (issue #5513 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
3453e3efa5
Doxygen documentation update from oej (issue #5505 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
f5d5814f5f
Fix segfault in CVS head (sorry about that)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
e60ab6d916
Be sure to avoid octal interpretations of IP's (bug #5477 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
1ceb04cfb7
More utility cleanups
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
9835bc4330
add ast_build_string_va(), which accepts a varargs list directly
...
ensure the _entire_ manager_event() output is either queued or sent via ast_carefulwrite()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
91b72f5ff0
ensure scheduling priority is inherited into new threads (issue #5293 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
779d033f21
move process_quotes_and_slashes to utils.c since it is used by both pbx_ael and pbx_config
...
clean up some formatting
remove some commented out reference code
move unload_module in pbx_ael down to be with the rest of the standard module functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
5da915dcfd
update MANY more files with proper copyright/license info (thanks Ian!)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
aa92d9c1f8
don't double define our own string functions on platforms that don't have them (issue #5169 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
019310244e
fix a couple of warnings on osx
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
1824c2f630
encode/decode URIs in 'pedantic' mode (issue #3923 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
61ef3c1c7c
make the warning message be LOG_WARNING (issue #4960 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
82883698cc
more fixes for gcc4 warnings ...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
d07c47bac8
Fix solaris vasprintf (don't free the memory, duh) (bug #4890 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Mark Spencer
2d108b8826
Fix vasnprintf emulation (bug #4882 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
a6b0f6074f
move strtoq into new string files (bug #4740 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
4817bc599d
restore warning about negative timestamps now that it is fixed
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Russell Bryant
b134548d79
suppress timestamp message until we can figure out where it is coming from,
...
since it appears that this isn't causing a real problem
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
22b0f5d306
add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
9d8d86e19d
phase two of string portability stuff:
...
don't need ast_ prefixes on functions
use individual #defines for function presence
add vasprintf to portability library
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Kevin P. Fleming
494d253efe
more ifdef cleanup to match proper Linux macros
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago
Josh Roberson
937740bd89
Fix breakage caused by bug #4669 . Next time let's test the build on
...
linux before commiting a portability patch ;)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 years ago