prevent crash in crazy situation with xml_curl and bad urls FSCORE-169
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9307 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2d19b3bf02
commit
cb22c466da
|
@ -289,13 +289,17 @@ static switch_status_t timer_check(switch_timer_t *timer, switch_bool_t step)
|
|||
static switch_status_t timer_destroy(switch_timer_t *timer)
|
||||
{
|
||||
timer_private_t *private_info = timer->private_info;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
TIMER_MATRIX[timer->interval].count--;
|
||||
if (TIMER_MATRIX[timer->interval].count == 0) {
|
||||
TIMER_MATRIX[timer->interval].tick = 0;
|
||||
if (timer->interval < MAX_ELEMENTS) {
|
||||
switch_mutex_lock(globals.mutex);
|
||||
TIMER_MATRIX[timer->interval].count--;
|
||||
if (TIMER_MATRIX[timer->interval].count == 0) {
|
||||
TIMER_MATRIX[timer->interval].tick = 0;
|
||||
}
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
}
|
||||
if (private_info) {
|
||||
private_info->ready = 0;
|
||||
}
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
private_info->ready = 0;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue