[asterisk-commits] file: branch file/bridging r79141 - in /team/file/bridging: include/asterisk/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 10 19:36:14 CDT 2007
Author: file
Date: Fri Aug 10 19:36:13 2007
New Revision: 79141
URL: http://svn.digium.com/view/asterisk?view=rev&rev=79141
Log:
Add callback for poking the bridge technology.
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=79141&r1=79140&r2=79141
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Fri Aug 10 19:36:13 2007
@@ -76,6 +76,7 @@
int (*write)(struct ast_bridge *bridge, struct ast_bridge_channel *bridged_channel, struct ast_frame *frame); /*! Callback for writing a frame to the bridge */
int (*fd)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, int fd); /*! Callback for when a file descriptor trips */
int (*thread)(struct ast_bridge *bridge); /*! Callback for replacement thread function */
+ int (*poke)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel); /*! Callback for poking a bridge technology */
int formats; /*! Formats this bridge technology can support */
int suspended:1; /*! Is this bridge technology suspended from use or not? */
AST_RWLIST_ENTRY(ast_bridge_technology) list; /*! Linked list information */
Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=79141&r1=79140&r2=79141
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Fri Aug 10 19:36:13 2007
@@ -146,9 +146,12 @@
winner = ast_waitfor_n(cs, count, &to);
ast_mutex_lock(&bridge->lock);
- /* If we had no winner, just continue on */
- if (!winner)
+ /* If we had no winner just poke the bridge technology if possible */
+ if (!winner) {
+ if (bridge->technology->poke)
+ bridge->technology->poke(bridge, NULL);
continue;
+ }
AST_LIST_TRAVERSE(&bridge->channels, bridge_channel, list) {
if (bridge_channel->chan == winner)
@@ -389,6 +392,8 @@
ast_frfree(frame);
} else if (outfd > -1) {
bridge->technology->fd(bridge, bridge_channel, outfd);
+ } else if (bridge->technology->poke) {
+ bridge->technology->poke(bridge, bridge_channel);
}
}
More information about the asterisk-commits
mailing list