[asterisk-commits] file: branch file/bridging r80251 - in /team/file/bridging: include/asterisk/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 22 10:07:14 CDT 2007


Author: file
Date: Wed Aug 22 10:07:13 2007
New Revision: 80251

URL: http://svn.digium.com/view/asterisk?view=rev&rev=80251
Log:
Add another state for features and handle it.

Modified:
    team/file/bridging/include/asterisk/bridging.h
    team/file/bridging/main/bridging.c

Modified: team/file/bridging/include/asterisk/bridging.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/bridging.h?view=diff&rev=80251&r1=80250&r2=80251
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Wed Aug 22 10:07:13 2007
@@ -50,6 +50,7 @@
 	AST_BRIDGE_CHANNEL_STATE_HANGUP,   /*! Bridge requested that this channel be hungup, unless otherwise instructed */
 	AST_BRIDGE_CHANNEL_STATE_DEPART,   /*! Depart from the bridge */
 	AST_BRIDGE_CHANNEL_STATE_SWAP,     /*! Channel is being swapped out */
+	AST_BRIDGE_CHANNEL_STATE_FEATURE,  /*! Channel is currently executing a feature */
 };
 
 /*! \brief Flags used for bridge features */

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=80251&r1=80250&r2=80251
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Wed Aug 22 10:07:13 2007
@@ -402,7 +402,7 @@
 	/* Reclaim our bridge lock */
 	ast_mutex_lock(&bridge->lock);
 
-	return 0;
+	return bridge_channel->state;
 }
 
 /*! \brief Run in a singlethreaded model. Each joined channel yields itself to the main bridge thread. */
@@ -423,9 +423,16 @@
 		} else if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_DEPART) {
 			ast_debug(1, "Bridge channel %p entering depart state.\n", bridge_channel);
 			break;
-		}
-	}
-	return 0;
+		} else if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_SWAP) {
+			ast_debug(1, "Bridge channel %p entering swap state.\n", bridge_channel);
+			break;
+		} else if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_FEATURE) {
+			ast_debug(1, "Bridge channel %p entering feature state.\n", bridge_channel);
+			break;
+		}
+	}
+
+	return bridge_channel->state;
 }
 
 /*! \brief Join a channel to a bridge and handle anything the bridge may want us to do */




More information about the asterisk-commits mailing list