mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
only allow call cancel during a pending invite
This commit is contained in:
parent
1fd0f92959
commit
610af9f196
|
@ -262,6 +262,10 @@ int toxav_cancel ( ToxAv *av, int32_t call_index, int peer_id, const char *reaso
|
||||||
return ErrorNoCall;
|
return ErrorNoCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( av->msi_session->calls[call_index]->state != call_inviting ) {
|
||||||
|
return ErrorInvalidState;
|
||||||
|
}
|
||||||
|
|
||||||
return msi_cancel(av->msi_session, call_index, peer_id, reason);
|
return msi_cancel(av->msi_session, call_index, peer_id, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user