[asterisk-commits] file: branch file/bridging r116882 - /team/file/bridging/bridges/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 16 21:01:08 CDT 2008
Author: file
Date: Fri May 16 21:01:07 2008
New Revision: 116882
URL: http://svn.digium.com/view/asterisk?view=rev&rev=116882
Log:
Add astobj2 compatible softmix module.
Modified:
team/file/bridging/bridges/bridge_softmix.c
Modified: team/file/bridging/bridges/bridge_softmix.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/bridges/bridge_softmix.c?view=diff&rev=116882&r1=116881&r2=116882
==============================================================================
--- team/file/bridging/bridges/bridge_softmix.c (original)
+++ team/file/bridging/bridges/bridge_softmix.c Fri May 16 21:01:07 2008
@@ -158,8 +158,10 @@
struct timeval base = ast_tvnow();
int skew = 0, previous_skew = 0, last_adjust = 0;
ast_cond_t cond;
-
+ ast_mutex_t lock;
+
ast_cond_init(&cond, NULL);
+ ast_mutex_init(&lock);
while (bridge->thread != AST_PTHREADT_STOP) {
struct ast_bridge_channel *bridge_channel = NULL;
@@ -229,7 +231,9 @@
ts.tv_nsec = next_wakeup.tv_usec * 1000;
/* Wait until then */
- ast_cond_timedwait(&cond, &bridge->lock, &ts);
+ ast_mutex_lock(&lock);
+ ast_cond_timedwait(&cond, &lock, &ts);
+ ast_mutex_unlock(&lock);
/* Before we calculate the skew value... record the previous one */
previous_skew = skew;
@@ -238,6 +242,7 @@
skew = ast_tvdiff_ms(ast_tvnow(), next_wakeup);
}
+ ast_mutex_destroy(&lock);
ast_cond_destroy(&cond);
return 0;
More information about the asterisk-commits
mailing list