Revert "Removed mutex operations"

This commit is contained in:
Eniz Vukovic 2015-10-31 14:53:20 +01:00
parent e730bd54e6
commit fa0c87fa55

View File

@ -440,12 +440,15 @@ bool toxav_call_control(ToxAV *av, uint32_t friend_number, TOXAV_CALL_CONTROL co
case TOXAV_CALL_CONTROL_CANCEL: {
/* Hang up */
pthread_mutex_lock(call->mutex);
if (msi_hangup(call->msi_call) != 0) {
rc = TOXAV_ERR_CALL_CONTROL_SYNC;
pthread_mutex_unlock(call->mutex);
goto END;
}
call->msi_call = NULL;
pthread_mutex_unlock(call->mutex);
/* No mather the case, terminate the call */
call_kill_transmission(call);