Fixed segfault that happened because calls could be hanged up more

than once.
This commit is contained in:
irungentoo 2014-06-26 17:05:13 -04:00
parent 3063f09f2b
commit 2735b4a8de
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 3 additions and 1 deletions

View File

@ -1641,6 +1641,7 @@ int msi_hangup ( MSISession *session, int32_t call_index )
for ( ; _it < session->calls[call_index]->peer_count; _it ++ ) for ( ; _it < session->calls[call_index]->peer_count; _it ++ )
send_message ( session, session->calls[call_index], _msg_end, session->calls[call_index]->peers[_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 ); free_message ( _msg_end );

View File

@ -50,7 +50,8 @@ typedef enum {
call_inviting, /* when sending call invite */ call_inviting, /* when sending call invite */
call_starting, /* when getting call invite */ call_starting, /* when getting call invite */
call_active, call_active,
call_hold call_hold,
call_hanged_up
} MSICallState; } MSICallState;