diff options
author | irungentoo <irungentoo@gmail.com> | 2014-06-18 16:36:08 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-06-18 16:36:08 -0400 |
commit | 5f06aba419423eb6db92d6851e3abd8d4f035fb1 (patch) | |
tree | 0b339d1c092a1a6e16da8cc8dd057b9e50f3b905 /toxav/msi.c | |
parent | 888ebea619e3068fce10508c9187b7d2c81c2c17 (diff) | |
parent | 78bd8b3f179219b6824555449e1439b76d2196fe (diff) |
Merge branch 'tux3-nullptr-1'
Diffstat (limited to 'toxav/msi.c')
-rw-r--r-- | toxav/msi.c | 12 |
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 | ||