[svn-commits] file: branch file/bridging r65642 -
/team/file/bridging/main/bridging.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed May 23 08:57:47 MST 2007
Author: file
Date: Wed May 23 10:57:46 2007
New Revision: 65642
URL: http://svn.digium.com/view/asterisk?view=rev&rev=65642
Log:
Add more debugging messages and prepare to handle error cases from bridge technologies.
Modified:
team/file/bridging/main/bridging.c
Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=65642&r1=65641&r2=65642
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Wed May 23 10:57:46 2007
@@ -267,7 +267,10 @@
if (bridge->technology->create) {
if (option_debug)
ast_log(LOG_DEBUG, "Giving bridge technology %s the bridge structure %p to setup\n", bridge->technology->name, bridge);
- bridge->technology->create(bridge);
+ if (bridge->technology->create(bridge)) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Bridge technology %s failed to setup bridge structure %p\n", bridge->technology->name, bridge);
+ }
}
return bridge;
@@ -314,7 +317,10 @@
if (bridge->technology->destroy) {
if (option_debug)
ast_log(LOG_DEBUG, "Giving bridge technology %s the bridge structure %p to destroy\n", bridge->technology->name, bridge);
- bridge->technology->destroy(bridge);
+ if (bridge->technology->destroy(bridge)) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Bridge technology %s failed to destroy bridge structure %p... trying our best\n", bridge->technology->name, bridge);
+ }
}
/* Destroy the mutex that protects the bridge */
@@ -391,7 +397,10 @@
if (bridge->technology->join) {
if (option_debug)
ast_log(LOG_DEBUG, "Giving bridge technology %s notification that %p is joining bridge %p\n", bridge->technology->name, bridge_channel, bridge);
- bridge->technology->join(bridge, bridge_channel);
+ if (bridge->technology->join(bridge, bridge_channel)) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Bridge technology %s failed to join %p to bridge %p\n", bridge->technology->name, bridge_channel, bridge);
+ }
}
/* Go into a loop waiting for the bridge thread to make us do something */
@@ -426,8 +435,11 @@
/* If the bridge technology wants notification that this channel is leaving the bridge, give it it */
if (bridge->technology->leave) {
if (option_debug)
- ast_log(LOG_DEBUG, "Giving bridge technology %p notification that %p is leaving bridge %p\n", bridge->technology->name, bridge_channel, bridge);
- bridge->technology->leave(bridge, bridge_channel);
+ ast_log(LOG_DEBUG, "Giving bridge technology %s notification that %p is leaving bridge %p\n", bridge->technology->name, bridge_channel, bridge);
+ if (bridge->technology->leave(bridge, bridge_channel)) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Bridge technology %s failed to allow %p to leave bridge %p\n", bridge->technology->name, bridge_channel, bridge);
+ }
}
/* Remove ourselves from the bridge */
More information about the svn-commits
mailing list