summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-12-15 19:51:24 +0000
committerMark Michelson <mmichelson@digium.com>2008-12-15 19:51:24 +0000
commitc855c2c3815206ee08b7368b221e9f77af444a64 (patch)
tree75bd6fc1c7c7b2be1ee3ded81f7e1afbf9a814b0 /include/asterisk
parent42e26ee70050c3df692c931356f9edb7fe162c6f (diff)
Merged revisions 164416 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r164416 | mmichelson | 2008-12-15 13:45:07 -0600 (Mon, 15 Dec 2008) | 4 lines Add notes to autoservice and pbx doxygen regarding a potential deadlock scenario so that it is avoided in the future ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/channel.h5
-rw-r--r--include/asterisk/pbx.h20
2 files changed, 25 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 93ef1f1b6..3c3e0f6e1 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -1429,6 +1429,11 @@ int ast_autoservice_start(struct ast_channel *chan);
/*!
* \brief Stop servicing a channel for us...
*
+ * \note if chan is locked prior to calling ast_autoservice_stop, it
+ * is likely that there will be a deadlock between the thread that calls
+ * ast_autoservice_stop and the autoservice thread. It is important
+ * that chan is not locked prior to this call
+ *
* \retval 0 success
* \retval -1 error, or the channel has been hungup
*/
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 2bb95930f..a2f1222c4 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -381,6 +381,10 @@ int ast_get_hint(char *hint, int maxlen, char *name, int maxnamelen,
* \param priority priority of the action within the extension
* \param callerid callerid to search for
*
+ * \note It is possible for autoservice to be started and stopped on c during this
+ * function call, it is important that c is not locked prior to calling this. Otherwise
+ * a deadlock may occur
+ *
* \return If an extension within the given context(or callerid) with the given priority
* is found a non zero value will be returned. Otherwise, 0 is returned.
*/
@@ -396,6 +400,10 @@ int ast_exists_extension(struct ast_channel *c, const char *context, const char
* \param label label of the action within the extension to match to priority
* \param callerid callerid to search for
*
+ * \note It is possible for autoservice to be started and stopped on c during this
+ * function call, it is important that c is not locked prior to calling this. Otherwise
+ * a deadlock may occur
+ *
* \retval the priority which matches the given label in the extension
* \retval -1 if not found.
*/
@@ -405,6 +413,10 @@ int ast_findlabel_extension(struct ast_channel *c, const char *context,
/*!
* \brief Find the priority of an extension that has the specified label
*
+ * \note It is possible for autoservice to be started and stopped on c during this
+ * function call, it is important that c is not locked prior to calling this. Otherwise
+ * a deadlock may occur
+ *
* \note This function is the same as ast_findlabel_extension, except that it accepts
* a pointer to an ast_context structure to specify the context instead of the
* name of the context. Otherwise, the functions behave the same.
@@ -421,6 +433,10 @@ int ast_findlabel_extension2(struct ast_channel *c, struct ast_context *con,
* \param priority priority of extension path
* \param callerid callerid of extension being searched for
*
+ * \note It is possible for autoservice to be started and stopped on c during this
+ * function call, it is important that c is not locked prior to calling this. Otherwise
+ * a deadlock may occur
+ *
* \return If "exten" *could be* a valid extension in this context with or without
* some more digits, return non-zero. Basically, when this returns 0, no matter
* what you add to exten, it's not going to be a valid extension anymore
@@ -437,6 +453,10 @@ int ast_canmatch_extension(struct ast_channel *c, const char *context,
* \param priority priority of extension path
* \param callerid callerid of extension being searched for
*
+ * \note It is possible for autoservice to be started and stopped on c during this
+ * function call, it is important that c is not locked prior to calling this. Otherwise
+ * a deadlock may occur
+ *
* \return If "exten" *could match* a valid extension in this context with
* some more digits, return non-zero. Does NOT return non-zero if this is
* an exact-match only. Basically, when this returns 0, no matter