summaryrefslogtreecommitdiff
path: root/include/asterisk/_private.h
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-03-03 15:59:50 +0000
committerRussell Bryant <russell@russellbryant.com>2008-03-03 15:59:50 +0000
commit8372a9bf08a152a65f8483324d6c0f679b660ff2 (patch)
treea6d06a50ae1030a97839ce039dcd1f7fc6e8f583 /include/asterisk/_private.h
parentb21ca22fb0e0c0e6182153aa98b43af15f78139e (diff)
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
Diffstat (limited to 'include/asterisk/_private.h')
-rw-r--r--include/asterisk/_private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h
index 33ba83593..b477d0e93 100644
--- a/include/asterisk/_private.h
+++ b/include/asterisk/_private.h
@@ -33,6 +33,7 @@ int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
int astobj2_init(void); /*!< Provided by astobj2.c */
int ast_file_init(void); /*!< Provided by file.c */
int ast_features_init(void); /*!< Provided by features.c */
+void ast_autoservice_init(void); /*!< Provided by autoservice.c */
/*!
* \brief Reload asterisk modules.