From: Richard Mudgett Date: Fri, 8 Jun 2012 20:49:00 +0000 (+0000) Subject: Tweak ast_channel_softhangup_withcause_locked() to take a typed parameter. X-Git-Tag: 11.0.0-beta1~244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b2412db289b43202ef33053fb4efc4481d99bd4;p=thirdparty%2Fasterisk.git Tweak ast_channel_softhangup_withcause_locked() to take a typed parameter. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368712 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index da3515754d..f183fe00ea 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1407,11 +1407,11 @@ int ast_check_hangup_locked(struct ast_channel *chan); /*! * \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 + * \param chan channel on which to hang up + * \param causecode cause code to use (Zero if don't use cause code) + * \return Nothing */ -int ast_channel_softhangup_withcause_locked(void *obj, int causecode); +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 diff --git a/main/channel.c b/main/channel.c index 8bd973501a..bfca3ec8df 100644 --- a/main/channel.c +++ b/main/channel.c @@ -602,10 +602,8 @@ int ast_check_hangup_locked(struct ast_channel *chan) return res; } -int ast_channel_softhangup_withcause_locked(void *obj, int causecode) +void ast_channel_softhangup_withcause_locked(struct ast_channel *chan, int causecode) { - struct ast_channel *chan = obj; - ast_channel_lock(chan); if (causecode > 0) { @@ -618,8 +616,6 @@ int ast_channel_softhangup_withcause_locked(void *obj, int causecode) 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)