[asterisk-commits] tilghman: branch 1.4 r225105 - in /branches/1.4: apps/ include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 21 11:03:25 CDT 2009


Author: tilghman
Date: Wed Oct 21 11:02:12 2009
New Revision: 225105

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=225105
Log:
Fix documentation for ast_softhangup() and correct the misuse thereof.
(closes issue #16103)
 Reported by: majorbloodnok

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

Modified: branches/1.4/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=225105&r1=225104&r2=225105
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Wed Oct 21 11:02:12 2009
@@ -3919,7 +3919,7 @@
 		ast_indicate(event->trunk_ref->trunk->chan, AST_CONTROL_HOLD);
 	}
 
-	ast_softhangup(event->trunk_ref->chan, AST_CAUSE_NORMAL);
+	ast_softhangup(event->trunk_ref->chan, AST_SOFTHANGUP_DEV);
 	event->trunk_ref->chan = NULL;
 }
 

Modified: branches/1.4/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/include/asterisk/channel.h?view=diff&rev=225105&r1=225104&r2=225105
==============================================================================
--- branches/1.4/include/asterisk/channel.h (original)
+++ branches/1.4/include/asterisk/channel.h Wed Oct 21 11:02:12 2009
@@ -774,14 +774,14 @@
  * \param chan channel to be soft-hung-up
  * Call the protocol layer, but don't destroy the channel structure (use this if you are trying to
  * safely hangup a channel managed by another thread.
- * \param cause	Ast hangupcause for hangup
+ * \param reason an AST_SOFTHANGUP_* reason code
  * \return Returns 0 regardless
  */
 int ast_softhangup(struct ast_channel *chan, int cause);
 
 /*! \brief Softly hangup up a channel (no channel lock) 
  * \param chan channel to be soft-hung-up
- * \param cause	Ast hangupcause for hangup (see cause.h) */
+ * \param reason an AST_SOFTHANGUP_* reason code */
 int ast_softhangup_nolock(struct ast_channel *chan, int cause);
 
 /*! \brief Check to see if a channel is needing hang up 

Modified: branches/1.4/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/pbx.c?view=diff&rev=225105&r1=225104&r2=225105
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Wed Oct 21 11:02:12 2009
@@ -2504,8 +2504,9 @@
 	}
 	if (!found && !error)
 		ast_log(LOG_WARNING, "Don't know what to do with '%s'\n", c->name);
-	if (res != AST_PBX_KEEPALIVE)
-		ast_softhangup(c, c->hangupcause ? c->hangupcause : AST_CAUSE_NORMAL_CLEARING);
+	if (res != AST_PBX_KEEPALIVE) {
+		ast_softhangup(c, AST_SOFTHANGUP_APPUNLOAD);
+	}
 	ast_channel_lock(c);
 	if ((emc = pbx_builtin_getvar_helper(c, "EXIT_MACRO_CONTEXT"))) {
 		emc = ast_strdupa(emc);




More information about the asterisk-commits mailing list