[asterisk-commits] rmudgett: trunk r368712 - in /trunk: include/asterisk/channel.h main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 8 15:49:04 CDT 2012


Author: rmudgett
Date: Fri Jun  8 15:49:00 2012
New Revision: 368712

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=368712
Log:
Tweak ast_channel_softhangup_withcause_locked() to take a typed parameter.

Modified:
    trunk/include/asterisk/channel.h
    trunk/main/channel.c

Modified: trunk/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=368712&r1=368711&r2=368712
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Fri Jun  8 15:49:00 2012
@@ -1407,11 +1407,11 @@
 
 /*!
  * \brief Lock the given channel, then request softhangup on the channel with the given causecode
- * \param obj channel on which to hang up
- * \param causecode cause code to use
- * \return 0
- */
-int ast_channel_softhangup_withcause_locked(void *obj, int causecode);
+ * \param chan channel on which to hang up
+ * \param causecode cause code to use (Zero if don't use cause code)
+ * \return Nothing
+ */
+void ast_channel_softhangup_withcause_locked(struct ast_channel *chan, int causecode);
 
 /*!
  * \brief Compare a offset with the settings of when to hang a channel up

Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=368712&r1=368711&r2=368712
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Fri Jun  8 15:49:00 2012
@@ -602,10 +602,8 @@
 	return res;
 }
 
-int ast_channel_softhangup_withcause_locked(void *obj, int causecode)
-{
-	struct ast_channel *chan = obj;
-
+void ast_channel_softhangup_withcause_locked(struct ast_channel *chan, int causecode)
+{
 	ast_channel_lock(chan);
 
 	if (causecode > 0) {
@@ -618,8 +616,6 @@
 	ast_softhangup_nolock(chan, AST_SOFTHANGUP_EXPLICIT);
 
 	ast_channel_unlock(chan);
-
-	return 0;
 }
 
 static int ast_channel_softhangup_cb(void *obj, void *arg, int flags)




More information about the asterisk-commits mailing list