revert
This commit is contained in:
parent
142fa9922c
commit
752ec93d37
|
@ -92,28 +92,22 @@ static void check_timeouts(void)
|
||||||
void *val;
|
void *val;
|
||||||
time_t now;
|
time_t now;
|
||||||
valet_lot_t *lot;
|
valet_lot_t *lot;
|
||||||
switch_console_callback_match_t *matches = NULL;
|
|
||||||
switch_console_callback_match_node_t *m;
|
now = switch_epoch_time_now(NULL);
|
||||||
|
|
||||||
|
switch_mutex_lock(globals.mutex);
|
||||||
|
|
||||||
|
|
||||||
|
for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
|
||||||
switch_hash_index_t *i_hi;
|
switch_hash_index_t *i_hi;
|
||||||
const void *i_var;
|
const void *i_var;
|
||||||
void *i_val;
|
void *i_val;
|
||||||
char *i_ext;
|
char *i_ext;
|
||||||
valet_token_t *token;
|
valet_token_t *token;
|
||||||
|
|
||||||
now = switch_epoch_time_now(NULL);
|
|
||||||
|
|
||||||
switch_mutex_lock(globals.mutex);
|
|
||||||
for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
|
|
||||||
switch_hash_this(hi, &var, NULL, &val);
|
switch_hash_this(hi, &var, NULL, &val);
|
||||||
switch_console_push_match(&matches, (const char *) var);
|
lot = (valet_lot_t *) val;
|
||||||
}
|
|
||||||
switch_mutex_unlock(globals.mutex);
|
|
||||||
|
|
||||||
|
|
||||||
if (matches) {
|
|
||||||
for (m = matches->head; m; m = m->next) {
|
|
||||||
|
|
||||||
lot = valet_find_lot(m->val);
|
|
||||||
switch_mutex_lock(lot->mutex);
|
switch_mutex_lock(lot->mutex);
|
||||||
|
|
||||||
top:
|
top:
|
||||||
|
@ -131,10 +125,7 @@ static void check_timeouts(void)
|
||||||
|
|
||||||
switch_mutex_unlock(lot->mutex);
|
switch_mutex_unlock(lot->mutex);
|
||||||
}
|
}
|
||||||
|
switch_mutex_unlock(globals.mutex);
|
||||||
switch_console_free_matches(&matches);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int next_id(valet_lot_t *lot, int min, int max, int in)
|
static int next_id(valet_lot_t *lot, int min, int max, int in)
|
||||||
|
|
Loading…
Reference in New Issue