mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 07:34:19 +00:00
add prototype for local_stream test it and let me know what you think
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5461 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
ed0076eb18
commit
f4c1039a16
9 files changed
+639
-10
No files matched your search
@@ -43,6 +43,7 @@ static switch_memory_pool_t *module_pool = NULL;
|
||||
|
||||
static struct {
|
||||
int32_t RUNNING;
|
||||
int32_t STARTED;
|
||||
switch_mutex_t *mutex;
|
||||
} globals;
|
||||
|
||||
@@ -76,6 +77,14 @@ static timer_matrix_t TIMER_MATRIX[MAX_ELEMENTS + 1];
|
||||
static inline switch_status_t timer_init(switch_timer_t *timer)
|
||||
{
|
||||
timer_private_t *private_info;
|
||||
int sanity = 0;
|
||||
|
||||
while(globals.STARTED == 0) {
|
||||
switch_yield(100000);
|
||||
if (++sanity == 10) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (globals.RUNNING != 1 || !globals.mutex) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@@ -220,9 +229,9 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_softtimer_runtime)
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
|
||||
|
||||
globals.RUNNING = 1;
|
||||
|
||||
|
||||
globals.STARTED = globals.RUNNING = 1;
|
||||
|
||||
while (globals.RUNNING == 1) {
|
||||
reference += STEP_MIC;
|
||||
|
||||
|
||||
Reference in new issue
Block a user