only allow call cancel during a pending invite

This commit is contained in:
Jfreegman 2014-06-23 20:55:15 -04:00
parent 1fd0f92959
commit 610af9f196
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -262,6 +262,10 @@ int toxav_cancel ( ToxAv *av, int32_t call_index, int peer_id, const char *reaso
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);
}