Skip to content

Commit 2231cd4

Browse files
committed
Merge branch 'JFreegman-avcancel'
2 parents 1fd0f92 + 610af9f commit 2231cd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

toxav/toxav.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ int toxav_cancel ( ToxAv *av, int32_t call_index, int peer_id, const char *reaso
262262
return ErrorNoCall;
263263
}
264264

265+
if ( av->msi_session->calls[call_index]->state != call_inviting ) {
266+
return ErrorInvalidState;
267+
}
268+
265269
return msi_cancel(av->msi_session, call_index, peer_id, reason);
266270
}
267271

0 commit comments

Comments
 (0)