aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-22 00:08:21 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-22 00:08:21 +0000
commit593233e983278cf53b30aa19738b6508e778c151 (patch)
tree8d02adf996ab55c020efe1ae43108e080e76d970 /include/asterisk
parent89e319954318210c7b32ce1b8ef0edbec89ff44b (diff)
remove an XXX comment and document that ast_autoservice_start() will return -1
if the channel is already in the autoservice list. Why is this a valid case to return -1, you ask? Well, there should never be any code where it is not clear if the channel is in autoservice or not because trying to read frames from a channel that is in the autoservice list will lead to bad results because more than one thread will be waiting on frames to arrive on the channel and then trying to read them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38076 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/channel.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 3d842bbe3..d3d5862ad 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -1060,10 +1060,20 @@ void ast_tonepair_stop(struct ast_channel *chan);
/*! Play a tone pair for a given amount of time */
int ast_tonepair(struct ast_channel *chan, int freq1, int freq2, int duration, int vol);
-/*! Automatically service a channel for us... */
+/*!
+ * \brief Automatically service a channel for us...
+ *
+ * \retval 0 success
+ * \retval -1 failure, or the channel is already being autoserviced
+ */
int ast_autoservice_start(struct ast_channel *chan);
-/*! Stop servicing a channel for us... Returns -1 on error or if channel has been hungup */
+/*!
+ * \brief Stop servicing a channel for us...
+ *
+ * \retval 0 success
+ * \retval -1 error, or the channel has been hungup
+ */
int ast_autoservice_stop(struct ast_channel *chan);
/* If built with zaptel optimizations, force a scheduled expiration on the