diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2014-01-31 09:34:00 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2014-01-31 09:34:00 +0000 |
commit | 69edde0c2a0258ce3e543b974537f20850d74530 (patch) | |
tree | 942db852edde02023b4a6ebe086c1c0bd6dfb61d /src/conversation/gnunet-conversation.c | |
parent | bc2ae071353cefb9f0bdd7f3cf9e1979106599f4 (diff) | |
download | gnunet-69edde0c2a0258ce3e543b974537f20850d74530.tar.gz gnunet-69edde0c2a0258ce3e543b974537f20850d74530.zip |
Fix #3294: Decrement call number when the call is cancelled or hung-up.
Diffstat (limited to 'src/conversation/gnunet-conversation.c')
-rw-r--r-- | src/conversation/gnunet-conversation.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c index 532107aca..67eccbf8a 100644 --- a/src/conversation/gnunet-conversation.c +++ b/src/conversation/gnunet-conversation.c | |||
@@ -288,6 +288,8 @@ phone_event_handler (void *cls, | |||
288 | GNUNET_CONTAINER_DLL_remove (cl_head, | 288 | GNUNET_CONTAINER_DLL_remove (cl_head, |
289 | cl_tail, | 289 | cl_tail, |
290 | cl); | 290 | cl); |
291 | GNUNET_assert (caller_num_gen > 0); | ||
292 | caller_num_gen--; | ||
291 | GNUNET_free (cl->caller_id); | 293 | GNUNET_free (cl->caller_id); |
292 | if (cl == cl_active) | 294 | if (cl == cl_active) |
293 | { | 295 | { |
@@ -917,11 +919,17 @@ do_reject (const char *args) | |||
917 | cl); | 919 | cl); |
918 | GNUNET_free (cl->caller_id); | 920 | GNUNET_free (cl->caller_id); |
919 | GNUNET_free (cl); | 921 | GNUNET_free (cl); |
922 | GNUNET_assert (caller_num_gen > 0); | ||
923 | caller_num_gen--; | ||
920 | break; | 924 | break; |
921 | case PS_ACCEPTED: | 925 | case PS_ACCEPTED: |
922 | /* expected state, do rejection logic */ | 926 | /* expected state, do rejection logic */ |
923 | GNUNET_assert (NULL != cl_active); | 927 | GNUNET_assert (NULL != cl_active); |
924 | GNUNET_CONVERSATION_caller_hang_up (cl_active->caller); | 928 | GNUNET_CONVERSATION_caller_hang_up (cl_active->caller); |
929 | GNUNET_free (cl_active->caller_id); | ||
930 | GNUNET_free (cl_active); | ||
931 | GNUNET_assert (caller_num_gen > 0); | ||
932 | caller_num_gen--; | ||
925 | cl_active = NULL; | 933 | cl_active = NULL; |
926 | phone_state = PS_LISTEN; | 934 | phone_state = PS_LISTEN; |
927 | break; | 935 | break; |