[svn-commits] russell: branch 1.4 r89893 - in /branches/1.4: include/asterisk/pbx.h main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 27 18:20:14 CST 2007


Author: russell
Date: Tue Nov 27 18:20:13 2007
New Revision: 89893

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89893
Log:
 - update documentation for some of the goto functions to note that they
   handle locking the channel as needed
 - update ast_explicit_goto() to lock the channel as needed

Modified:
    branches/1.4/include/asterisk/pbx.h
    branches/1.4/main/pbx.c

Modified: branches/1.4/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/pbx.h?view=diff&rev=89893&r1=89892&r2=89893
==============================================================================
--- branches/1.4/include/asterisk/pbx.h (original)
+++ branches/1.4/include/asterisk/pbx.h Tue Nov 27 18:20:13 2007
@@ -804,10 +804,29 @@
   set to 1, sets to auto fall through.  If newval set to 0, sets to no auto
   fall through (reads extension instead).  Returns previous value. */
 int pbx_set_autofallthrough(int newval);
+
+/*!
+ * \note This function will handle locking the channel as needed.
+ */
 int ast_goto_if_exists(struct ast_channel *chan, const char *context, const char *exten, int priority);
-/* I can find neither parsable nor parseable at dictionary.com, but google gives me 169000 hits for parseable and only 49,800 for parsable */
+
+/*!
+ * \note I can find neither parsable nor parseable at dictionary.com, 
+ *       but google gives me 169000 hits for parseable and only 49,800 
+ *       for parsable 
+ *
+ * \note This function will handle locking the channel as needed.
+ */
 int ast_parseable_goto(struct ast_channel *chan, const char *goto_string);
+
+/*!
+ * \note This function will handle locking the channel as needed.
+ */
 int ast_explicit_goto(struct ast_channel *chan, const char *context, const char *exten, int priority);
+
+/*!
+ * \note This function will handle locking the channel as needed.
+ */
 int ast_async_goto_if_exists(struct ast_channel *chan, const char *context, const char *exten, int priority);
 
 struct ast_custom_function* ast_custom_function_find(const char *name);

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=89893&r1=89892&r2=89893
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Tue Nov 27 18:20:13 2007
@@ -4581,6 +4581,8 @@
 	if (!chan)
 		return -1;
 
+	ast_channel_lock(chan);
+
 	if (!ast_strlen_zero(context))
 		ast_copy_string(chan->context, context, sizeof(chan->context));
 	if (!ast_strlen_zero(exten))
@@ -4591,6 +4593,8 @@
 		if (ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP))
 			chan->priority--;
 	}
+
+	ast_channel_unlock(chan);
 
 	return 0;
 }




More information about the svn-commits mailing list