mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Added mutex lock+unlock.
Should it be also added to the other parts of this function?
This commit is contained in:
parent
d8a85d9a78
commit
d012bb1e8e
|
@ -440,12 +440,16 @@ bool toxav_call_control(ToxAV *av, uint32_t friend_number, TOXAV_CALL_CONTROL co
|
||||||
|
|
||||||
case TOXAV_CALL_CONTROL_CANCEL: {
|
case TOXAV_CALL_CONTROL_CANCEL: {
|
||||||
/* Hang up */
|
/* Hang up */
|
||||||
|
pthread_mutex_lock(call->mutex);
|
||||||
if (msi_hangup(call->msi_call) != 0) {
|
if (msi_hangup(call->msi_call) != 0) {
|
||||||
rc = TOXAV_ERR_CALL_CONTROL_SYNC;
|
rc = TOXAV_ERR_CALL_CONTROL_SYNC;
|
||||||
|
pthread_mutex_unlock(call->mutex);
|
||||||
goto END;
|
goto END;
|
||||||
}
|
}
|
||||||
|
|
||||||
call->msi_call = NULL;
|
call->msi_call = NULL;
|
||||||
|
pthread_mutex_unlock(call->mutex);
|
||||||
|
|
||||||
/* No mather the case, terminate the call */
|
/* No mather the case, terminate the call */
|
||||||
call_kill_transmission(call);
|
call_kill_transmission(call);
|
||||||
call_remove(call);
|
call_remove(call);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user