summaryrefslogtreecommitdiff
path: root/toxav/msi.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/msi.c')
-rw-r--r--toxav/msi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/toxav/msi.c b/toxav/msi.c
index 6a529699..8476c5be 100644
--- a/toxav/msi.c
+++ b/toxav/msi.c
@@ -928,13 +928,13 @@ MSICall *init_call ( MSISession *session, int peers, int ringing_timeout )
928 928
929 929
930 MSICall *_call = session->calls[_call_idx]; 930 MSICall *_call = session->calls[_call_idx];
931 _call->call_idx = _call_idx;
932 931
933 if ( _call == NULL ) { 932 if ( _call == NULL ) {
934 LOGGER_WARNING("Allocation failed!"); 933 LOGGER_WARNING("Allocation failed!");
935 return NULL; 934 return NULL;
936 } 935 }
937 936
937 _call->call_idx = _call_idx;
938 _call->type_peer = calloc ( sizeof ( MSICallType ), peers ); 938 _call->type_peer = calloc ( sizeof ( MSICallType ), peers );
939 939
940 if ( _call->type_peer == NULL ) { 940 if ( _call->type_peer == NULL ) {
@@ -1026,9 +1026,11 @@ void *handle_timeout ( void *arg )
1026 */ 1026 */
1027 MSICall *_call = arg; 1027 MSICall *_call = arg;
1028 1028
1029 LOGGER_DEBUG("[Call: %s] Request timed out!", _call->id); 1029 if (_call) {
1030 1030 LOGGER_DEBUG("[Call: %s] Request timed out!", _call->id);
1031 invoke_callback(_call->call_idx, MSI_OnRequestTimeout); 1031
1032 invoke_callback(_call->call_idx, MSI_OnRequestTimeout);
1033 }
1032 1034
1033 if ( _call && _call->session ) { 1035 if ( _call && _call->session ) {
1034 1036