Fixed possible bug if more than one ringing msi packet was sent to us.

This commit is contained in:
irungentoo 2014-06-26 17:42:37 -04:00
parent 2735b4a8de
commit ac4def6cd8
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -1204,6 +1204,12 @@ int handle_recv_ringing ( MSISession *session, MSICall *call, MSIMessage *msg )
pthread_mutex_lock(&session->mutex); pthread_mutex_lock(&session->mutex);
if ( call->ringing_timer_id ) {
LOGGER_WARNING("Call already ringing");
pthread_mutex_unlock(&session->mutex);
return 0;
}
LOGGER_DEBUG("Session: %p Handling 'ringing' on call: %s", session, call->id ); LOGGER_DEBUG("Session: %p Handling 'ringing' on call: %s", session, call->id );
call->ringing_timer_id = event.timer_alloc ( handle_timeout, call, call->ringing_tout_ms ); call->ringing_timer_id = event.timer_alloc ( handle_timeout, call, call->ringing_tout_ms );