mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed segfault that happened because calls could be hanged up more
than once.
This commit is contained in:
parent
3063f09f2b
commit
2735b4a8de
|
@ -1641,6 +1641,7 @@ int msi_hangup ( MSISession *session, int32_t call_index )
|
|||
for ( ; _it < session->calls[call_index]->peer_count; _it ++ )
|
||||
send_message ( session, session->calls[call_index], _msg_end, session->calls[call_index]->peers[_it] );
|
||||
|
||||
session->calls[call_index]->state = call_hanged_up;
|
||||
|
||||
free_message ( _msg_end );
|
||||
|
||||
|
|
|
@ -50,7 +50,8 @@ typedef enum {
|
|||
call_inviting, /* when sending call invite */
|
||||
call_starting, /* when getting call invite */
|
||||
call_active,
|
||||
call_hold
|
||||
call_hold,
|
||||
call_hanged_up
|
||||
|
||||
} MSICallState;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user