asterisk/main
Russell Bryant 8372a9bf08 3) In addition to merging the changes below, change trunk back to a regular
LIST instead of an RWLIST.  The way this list works makes it such that
   a RWLIST provides no additional benefit.  Also, a mutex is needed for
   use with the thread condition.


Merged revisions 105563 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105563 | russell | 2008-03-03 09:50:43 -0600 (Mon, 03 Mar 2008) | 24 lines

Merge in some changes from team/russell/autoservice-nochans-1.4

These changes fix up some dubious code that I came across while auditing what
happens in the autoservice thread when there are no channels currently in
autoservice.

1) Change it so that autoservice thread doesn't keep looping around calling
   ast_waitfor_n() on 0 channels twice a second.  Instead, use a thread condition
   so that the thread properly goes to sleep and does not wake up until a
   channel is put into autoservice.

   This actually fixes an interesting bug, as well.  If the autoservice thread
   is already running (almost always is the case), then when the thread goes
   from having 0 channels to have 1 channel to autoservice, that channel would
   have to wait for up to 1/2 of a second to have the first frame read from it.

2) Fix up the code in ast_waitfor_nandfds() for when it gets called with no
   channels and no fds to poll() on, such as was the case with the previous code
   for the autoservice thread.  In this case, the code would call alloca(0), and
   pass the result as the first argument to poll().  In this case, the 2nd
   argument to poll() specified that there were no fds, so this invalid pointer
   shouldn't actually get dereferenced, but, this code makes it explicit and
   ensures the pointers are NULL unless we have valid data to put there.

(related to issue #12116)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:59:50 +00:00
..
db1-ast clean up assembler and preprocessor files if they are here too 2007-10-29 22:24:44 +00:00
editline Merged revisions 97350 via svnmerge from 2008-01-09 00:51:59 +00:00
libresample Add doxygen documentation to libresample.h while it's still fresh on my mind 2008-01-02 21:49:44 +00:00
minimime more header removal/normalization 2007-11-21 00:23:49 +00:00
stdtime Merged revisions 103845 via svnmerge from 2008-02-20 18:28:00 +00:00
Makefile Merged revisions 104868 via svnmerge from 2008-02-28 00:11:31 +00:00
abstract_jb.c Doxygen updates 2008-01-22 08:58:46 +00:00
acl.c Merged revisions 101772 via svnmerge from 2008-02-01 16:01:22 +00:00
adsistub.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
aescrypt.c use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
aeskey.c use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
aesopt.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
aestab.c use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
alaw.c another bunch of include removals (errno.h and asterisk/logger.h) 2007-11-19 19:09:03 +00:00
app.c Asterisk, when parking can drop rights a caller when a parking timeout occurs. Also, when doing built-in attended transfers, sometimes incorrectly passes rights from the transferrer to the transferee. This patch tries to fixes the parking issue and lays some groundwork for later fixing the transfer issue. 2008-03-01 01:30:37 +00:00
ast_expr2.c Terry found this problem with running the expr2 parser on OSX. Make the #defines come out the same between the parser & lexer. 2008-01-16 01:35:10 +00:00
ast_expr2.fl Merged revisions 97849 via svnmerge from 2008-01-10 20:45:05 +00:00
ast_expr2.h Terry found this problem with running the expr2 parser on OSX. Make the #defines come out the same between the parser & lexer. 2008-01-16 01:35:10 +00:00
ast_expr2.y Terry found this problem with running the expr2 parser on OSX. Make the #defines come out the same between the parser & lexer. 2008-01-16 01:35:10 +00:00
ast_expr2f.c Fix up some doxygen issues. 2008-02-15 17:29:08 +00:00
asterisk.c 3) In addition to merging the changes below, change trunk back to a regular 2008-03-03 15:59:50 +00:00
astmm.c Get rid of any remaining ast_verbose calls in the code in favor of 2008-02-05 23:00:15 +00:00
astobj2.c Merged revisions 90348 via svnmerge from 2007-11-30 19:34:47 +00:00
audiohook.c *mumble* 2008-02-20 03:52:57 +00:00
autoservice.c 3) In addition to merging the changes below, change trunk back to a regular 2008-03-03 15:59:50 +00:00
buildinfo.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
callerid.c Add support for monitoring MWI on FXO lines. 2007-12-04 19:08:30 +00:00
cdr.c Merged revisions 105005 via svnmerge from 2008-02-28 19:21:15 +00:00
channel.c 3) In addition to merging the changes below, change trunk back to a regular 2008-03-03 15:59:50 +00:00
chanvars.c another bunch of include removals (errno.h and asterisk/logger.h) 2007-11-19 19:09:03 +00:00
cli.c Context tracing for channels 2008-02-18 04:43:33 +00:00
config.c Merged revisions 104092 via svnmerge from 2008-02-25 20:50:57 +00:00
cryptostub.c another bunch of include removals (errno.h and asterisk/logger.h) 2007-11-19 19:09:03 +00:00
cygload.c Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
db.c Several manager changes: 2008-01-10 00:12:35 +00:00
devicestate.c Merged revisions 96644 via svnmerge from 2008-01-05 02:12:10 +00:00
dial.c Merged revisions 104841 via svnmerge from 2008-02-28 20:14:04 +00:00
dlfcn.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
dns.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
dnsmgr.c Merged revisions 100465 via svnmerge from 2008-01-27 22:35:29 +00:00
dsp.c Largely refactor DSP tone detection routines. 2008-02-20 21:36:46 +00:00
ecdisa.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
enum.c A few more "moremanager" fixes 2007-11-27 21:10:50 +00:00
event.c Fix a small logic error in ast_event_iterator_next. The previous logic allowed for the iterator 2008-02-13 00:55:09 +00:00
features.c Asterisk, when parking can drop rights a caller when a parking timeout occurs. Also, when doing built-in attended transfers, sometimes incorrectly passes rights from the transferrer to the transferee. This patch tries to fixes the parking issue and lays some groundwork for later fixing the transfer issue. 2008-03-01 01:30:37 +00:00
file.c Merged revisions 104783 via svnmerge from 2008-02-27 20:37:32 +00:00
fixedjitterbuf.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
fixedjitterbuf.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
frame.c Add a non-invasive API for application level manipulation of T38 on a channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it. 2008-02-18 23:47:01 +00:00
fskmodem.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
global_datastores.c Asterisk, when parking can drop rights a caller when a parking timeout occurs. Also, when doing built-in attended transfers, sometimes incorrectly passes rights from the transferrer to the transferee. This patch tries to fixes the parking issue and lays some groundwork for later fixing the transfer issue. 2008-03-01 01:30:37 +00:00
hashtab.c A small fix from snuffy 2007-12-03 23:49:40 +00:00
http.c Rename version.h to ast_version.h. Next, I will be re-adding version.h as an 2008-02-26 20:02:14 +00:00
image.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
indications.c Just some minor coding style cleanup... 2008-02-11 18:27:47 +00:00
io.c Merged revisions 94977 via svnmerge from 2007-12-27 20:11:20 +00:00
jitterbuf.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
loader.c Merged revisions 104596 via svnmerge from 2008-02-27 17:12:08 +00:00
logger.c Just some minor coding style cleanup... 2008-02-11 18:27:47 +00:00
manager.c Merged revisions 104704 via svnmerge from 2008-02-27 18:20:35 +00:00
md5.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
netsock.c HUGE improvements to QoS/CoS handling by IgorG 2007-12-16 10:51:53 +00:00
pbx.c Merged revisions 105005 via svnmerge from 2008-02-28 19:21:15 +00:00
plc.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
poll.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
privacy.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
rtp.c Fix T38 passthrough regression introduced by state changes. 2008-02-27 15:31:09 +00:00
say.c Change verbosity into debug for Hebrew (and various whitespace fixes) 2008-02-19 00:59:40 +00:00
sched.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
sha1.c more header removal/normalization 2007-11-21 00:23:49 +00:00
slinfactory.c Add support for 16KHz signed linear. 2008-03-01 03:59:41 +00:00
srv.c Convert ast_verbose to ast_verb. 2007-12-14 14:48:38 +00:00
strcompat.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
tcptls.c Get rid of any remaining ast_verbose calls in the code in favor of 2008-02-05 23:00:15 +00:00
tdd.c another bunch of include removals (errno.h and asterisk/logger.h) 2007-11-19 19:09:03 +00:00
term.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
threadstorage.c Merged revisions 91192 via svnmerge from 2007-12-05 17:49:03 +00:00
translate.c Just some minor coding style cleanup... 2008-02-11 18:27:47 +00:00
udptl.c Merge changes from team/mvanbaak/cli-command-audit 2008-02-08 21:26:32 +00:00
ulaw.c another bunch of include removals (errno.h and asterisk/logger.h) 2007-11-19 19:09:03 +00:00
utils.c Merged revisions 105116 via svnmerge from 2008-02-28 22:39:26 +00:00