Commit Graph

10725 Commits

Author SHA1 Message Date
Luigi Rizzo d0b9eb93b6 remove now useless extern declarations.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 16:35:49 +00:00
Kevin P. Fleming 518f25f65c Merged revisions 48577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48577 | kpfleming | 2006-12-19 08:57:09 -0600 (Tue, 19 Dec 2006) | 2 lines

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/trunk@48578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 14:57:45 +00:00
Luigi Rizzo a755ec928a introduce a temporary variable for tmp->chan to shorten expressions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 09:58:40 +00:00
Luigi Rizzo 9c81431c93 stop what i think is a memory leak in case Dial fails to
connect to a channel.

Before committing to 1.4 i would like some other people to
review and test this fix - thanks.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 09:33:57 +00:00
Luigi Rizzo 9d4531d636 move a large block related to privacy handling to a separate function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 09:15:23 +00:00
Joshua Colp 83d3b6adda Merged revisions 48571 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48571 | file | 2006-12-18 22:46:12 -0500 (Mon, 18 Dec 2006) | 2 lines

Use env -i to start a fresh environment when going to build menuselect. This is more portable then using unset. (issue #8543 reported by jtodd)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 03:47:44 +00:00
Luigi Rizzo 02e21cb5f2 unbreak the macro used for incrementing the frame counters.
I don't know when the bug was introduced, but with the typical usage

	c->fin = FRAMECOUNT_INC(c->fin)

the frame counters stay to 0.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 17:44:18 +00:00
Joshua Colp 381d49c9af Clean up find_idle_thread function and use atomic operations for dynamic thread count.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 17:30:53 +00:00
Joshua Colp c17181aae3 Merged revisions 48564 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48564 | file | 2006-12-18 12:15:49 -0500 (Mon, 18 Dec 2006) | 2 lines

Put thread into proper list if we abort handling due to an error, and also hold the lock while putting it back into the proper idle list so we don't prematurely get a signal. (issue #8604 reported by arkadia)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 17:18:18 +00:00
Jason Parker a504d9e64e ctrl-w != w (nano search) (surprisingly, the fix was ever so slightly different in 1.4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 16:57:24 +00:00
Jason Parker f42da4d8a7 Blocked revisions 48561 via svnmerge
........
r48561 | qwell | 2006-12-18 10:55:46 -0600 (Mon, 18 Dec 2006) | 2 lines

ctrl-w != w  (nano search)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 16:56:44 +00:00
Luigi Rizzo 23be2c0bf4 apply the proposed fix for bug 8602
http://bugs.digium.com/view.php?id=8602
(i am not sure if there is still missing cast in
front of the alloca() call - being a macro this is
probably triggered only when actually used).

Add function ast_str_reset() to reinitialize the
string to an empty string instead of playing with
the internal fields.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 16:24:44 +00:00
Luigi Rizzo ccebf3511c convert the final clients of ast_build_string to use ast_str_*()
Now the only module left using it is chan_sip.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 15:38:50 +00:00
Luigi Rizzo 684e4dc373 debugging shows that we always need more than 128 bytes
for the verbose and logging messages so start with a
larger buffer from the beginning.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 15:36:31 +00:00
Kevin P. Fleming 920de98f68 Merged revisions 48554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48554 | kpfleming | 2006-12-18 05:59:24 -0600 (Mon, 18 Dec 2006) | 3 lines

remove some now-unnecessary explicit includes of autoconfig.h
clean up per-file dependencies during 'make clean'

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 11:59:48 +00:00
Luigi Rizzo 79fb4e4579 Replace ast_build_string with ast_str_*().
On passing remove presumably duplicate code to generate
the message for the manager_hooks:

in the previous version, the message was almost the same as the one sent
to regular sessions, with the exception of the empty line at the end, and
a few (presumably unintentional) differences e.g.  timestamps,
debugging, and lowercase headers for "event" and "privilege".

now we reuse the same message as before.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 11:28:37 +00:00
Luigi Rizzo 7c5f06ddcd replace ast_build_string() with ast_str_*().
Unless i am very mistaken, function_realtime_read() was
broken in that it would always return an empty string
(because ast_build_string() advanced the pointer to the
end of the string, and there was no reference to the
initial value.

This commit should fix this problem.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-17 22:57:46 +00:00
Luigi Rizzo 18e5017634 replace ast_build_string() with ast_str_*();
simplify __queues_show()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-17 22:47:30 +00:00
Kevin P. Fleming e4d172c9b2 Merged revisions 48548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48548 | kpfleming | 2006-12-17 12:33:24 -0600 (Sun, 17 Dec 2006) | 2 lines

need an additional argument here to make the downloads actually occur

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-17 18:33:53 +00:00
Luigi Rizzo d5eef300d8 define a mask SIP_INSECURE sam as for other sets of flags.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-17 12:47:08 +00:00
Kevin P. Fleming a40b78b885 Merged revisions 48528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48528 | kpfleming | 2006-12-16 15:34:41 -0600 (Sat, 16 Dec 2006) | 2 lines

use m4 quoting for AC_MSG_NOTICE calls, to keep these calls from thinking they have multiple arguments

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 21:38:10 +00:00
Kevin P. Fleming 89c41e2403 Merged revisions 48525 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48525 | kpfleming | 2006-12-16 15:14:34 -0600 (Sat, 16 Dec 2006) | 2 lines

simplify dependency tracking system, using the compiler's built-in method for generating them, and only doing dependency tracking if developer mode is enabled via the configure script

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 21:24:52 +00:00
Kevin P. Fleming a2ec1d322c update to use trunk's version of the threadstorage API
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 21:24:08 +00:00
Kevin P. Fleming 018a9c86e4 Merged revisions 48521 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48521 | kpfleming | 2006-12-16 14:12:41 -0600 (Sat, 16 Dec 2006) | 2 lines

since we really, really have to have autoconfig.h included before all other headers (especially system headers), the Makefile will now force it to happen (this will fix build problems with files like ast_expr2f.c, where we can't control the inclusion order in the file itself)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 20:19:19 +00:00
Luigi Rizzo 2703a1a9df forgot this part...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 11:23:07 +00:00
Luigi Rizzo 97ce2f8fd8 another conversion from ast_build_str to ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:56:31 +00:00
Luigi Rizzo c1220dd27e convert ast_build_str to ast_str_*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:46:20 +00:00
Luigi Rizzo 20b382cfff replace ast_build_string() with ast_str_*() functions.
This makes the code easier to follow and saves some
copies to intermediate buffers.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:33:31 +00:00
Kevin P. Fleming b2bd05ee83 Merged revisions 48513 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48513 | kpfleming | 2006-12-15 22:25:09 -0600 (Fri, 15 Dec 2006) | 2 lines

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/trunk@48514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 04:25:46 +00:00
Luigi Rizzo a61418e1df prevent a compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 02:42:53 +00:00
Luigi Rizzo 055abfe9d9 simplify the ast_dynamic_str_*.... routines by
renaming them to ast_str ... and putting the
struct ast_threadstorage pointer into the struct ast_str.

This makes the code a lot more readable.

At this point we can use these routines also to
replace ast_build_string().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 23:10:42 +00:00
Luigi Rizzo 961754d4b1 move the dynamic string support in a better place i.e. string.h
While doing this, add a bit of documentation, and slightly
extend the functionality as follows:
 + a max_len of -1 means that we take whatever the current size
   is, and never try to extend the buffer;
 + add support for alloca()-ted dynamic strings, which is very
   useful for all cases where we do an ast_build_string() now.

Next step is to simplify the interface by using shorter names
(e.g. ast_str as a prefix) and removing the _thread variant
of the functions by saving the threadstorage reference into
the struct ast_str. This can be done by overloading the
'type' field.

Finally, I will do my best to remove the convoluted interface
that results from trying to support platforms without va_copy().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 22:08:46 +00:00
Luigi Rizzo 4a0738a665 remove a duplicate include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 22:00:48 +00:00
Joshua Colp 915647d267 Merged revisions 48506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48506 | file | 2006-12-15 14:55:28 -0500 (Fri, 15 Dec 2006) | 2 lines

Turn payload_lock into bridge_lock and make it encompass all RTP structure contents that may relate to bridge information, including who we are bridged to.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 19:57:04 +00:00
Joshua Colp 6bdd1a3388 Merged revisions 48504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48504 | file | 2006-12-15 14:38:51 -0500 (Fri, 15 Dec 2006) | 2 lines

Hold call structure lock in places where a qualify or peer action can destroy it.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 19:40:29 +00:00
Joshua Colp 12565be69e Merged revisions 48502 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48502 | file | 2006-12-15 14:24:15 -0500 (Fri, 15 Dec 2006) | 2 lines

Lock network retransmission queue in all places that it is used.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 19:26:45 +00:00
Luigi Rizzo 4e427d84bd unbreak the output for http session.
Not long ago i replaced lseek() with fseek() but
forgot that filr FILE's you need ftell to
give you the current position.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 18:37:29 +00:00
Luigi Rizzo b6d1722c83 remove ast_safe_string_alloc() - it is completely
equivalent to asprintf().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 15:44:59 +00:00
Luigi Rizzo 7db228ac95 replace ast_safe_string_alloc() with asprintf()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 15:40:57 +00:00
Luigi Rizzo a736605bf4 replace ast_safe_string_alloc() with asprintf()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 15:39:29 +00:00
Luigi Rizzo 286f02bf40 small documentation improvements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 14:33:59 +00:00
Olle Johansson 0722c9ae77 Doxygen changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 13:36:34 +00:00
Olle Johansson 168deb2366 Issue #8592 - treat 504 as congestion (imported from 1.2/1.4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 10:58:36 +00:00
Olle Johansson bf2172faac Update to latest IANA specs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 10:54:06 +00:00
Joshua Colp bbe0a579b2 Add support to see what holds the lock when doing trylock.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 06:34:29 +00:00
Joshua Colp 315f8bb1b2 Merged revisions 48478 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48478 | file | 2006-12-15 01:28:05 -0500 (Fri, 15 Dec 2006) | 2 lines

Use a wakeup variable so that we don't wait on IO indefinitely if packets need to be retransmitted.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 06:31:26 +00:00
Luigi Rizzo 1122621981 constify ast_state2str() and note it is not reentrant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 04:03:42 +00:00
Luigi Rizzo 5ba11f9855 remove the macro LOAD_OH and expand it inline in the only
place where it was used.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 03:59:31 +00:00
Joshua Colp f6649ae0af Merged revisions 48472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48472 | file | 2006-12-14 12:36:12 -0500 (Thu, 14 Dec 2006) | 2 lines

Payload values on the RTP structure can change AFTER a bridge has started. This comes from the packet handling of the SIP response when indication that it was answered has been sent. Therefore we need to protect this data with a lock when we read/write. (issue #8232 reported by tgrman)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 17:39:16 +00:00
Joshua Colp 1c4c365377 Merged revisions 48461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48461 | file | 2006-12-13 22:33:30 -0500 (Wed, 13 Dec 2006) | 2 lines

Remove direct RTCP bridging. I've come to the conclusion that we should handle this through the core and not just forward it on. Should solve a few bugs.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 03:39:39 +00:00