summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAutomerge script <automerge@asterisk.org>2012-12-13 22:17:36 +0000
committerAutomerge script <automerge@asterisk.org>2012-12-13 22:17:36 +0000
commit5af578c0227af701a8cd689ee393b641ed876be4 (patch)
tree90a94708e2e41d85a4b04de903aaebd57695979c /include
parentc9037da8dc09ac12f0109c7d901c33dbc36d2386 (diff)
Merged revisions 378000-378002 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk ................ r378000 | seanbright | 2012-12-13 15:20:32 -0600 (Thu, 13 Dec 2012) | 8 lines Make generate_exchange_uuid() always return the passed ast_str pointer. I changed this code earlier to return NULL if it wasn't able to generate a UUID, whereas the earlier code would always return the ast_str that was passed in. Switch back to returning the ast_str, only set it to the empty string instead if UUID generation fails. We still do a validity check later which will catch this and blow up if necessary. ................ r378001 | wedhorn | 2012-12-13 15:25:31 -0600 (Thu, 13 Dec 2012) | 9 lines Minor fixes for chan_skinny Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and correct len of 2 strcmp in skinny_setdebug(). (see opticron's review on https://reviewboard.asterisk.org/r/2240/) ........ Merged revisions 377991 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ r378002 | rmudgett | 2012-12-13 15:28:15 -0600 (Thu, 13 Dec 2012) | 35 lines confbridge: Fix MOH on simultaneous user entry to a new conference. When two users entered a new conference simultaneously, one of the callers hears MOH. This happened if two unmarked users entered simultaneously and also if a waitmarked and a marked user entered simultaneously. * Created a confbridge internal MOH API to eliminate the inlined MOH handling code. Note that the conference mixing bridge needs to be locked when actually starting/stopping MOH because there is a small window between the conference join unsuspend MOH and actually joining the mixing bridge. * Created the concept of suspended MOH so it can be interrupted while conference join announcements to the user and DTMF features can operate. * Suspend any MOH until the user is about to actually join the mixing bridge of the conference. This way any pre-join file playback does not need to worry about MOH. * Made post-join actions only play deferred entry announcement files. Changing the user/conference state during that time is not protected or controlled by the state machine. (closes issue ASTERISK-20606) Reported by: Eugenia Belova Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2232/ ........ Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377993 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/bridging.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h
index 0f194f418..2c41f4618 100644
--- a/include/asterisk/bridging.h
+++ b/include/asterisk/bridging.h
@@ -271,6 +271,32 @@ struct ast_bridge {
*/
struct ast_bridge *ast_bridge_new(uint32_t capabilities, int flags);
+/*!
+ * \brief Lock the bridge.
+ *
+ * \param bridge Bridge to lock
+ *
+ * \return Nothing
+ */
+#define ast_bridge_lock(bridge) _ast_bridge_lock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge)
+static inline void _ast_bridge_lock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
+{
+ __ao2_lock(bridge, AO2_LOCK_REQ_MUTEX, file, function, line, var);
+}
+
+/*!
+ * \brief Unlock the bridge.
+ *
+ * \param bridge Bridge to unlock
+ *
+ * \return Nothing
+ */
+#define ast_bridge_unlock(bridge) _ast_bridge_unlock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge)
+static inline void _ast_bridge_unlock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
+{
+ __ao2_unlock(bridge, file, function, line, var);
+}
+
/*! \brief See if it is possible to create a bridge
*
* \param capabilities The capabilities that the bridge will use