diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-07 16:21:06 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-07 16:21:06 +0000 |
commit | 841877d9c42928f3dd34d2b595c0c0ccd7b959f4 (patch) | |
tree | 974247e6cdbb5f1a95ac30ef61a8d4fafc103b24 /src/scalarproduct | |
parent | 131ce32586090474404fb26f7ea5f25f5dde1690 (diff) | |
download | gnunet-841877d9c42928f3dd34d2b595c0c0ccd7b959f4.tar.gz gnunet-841877d9c42928f3dd34d2b595c0c0ccd7b959f4.zip |
- more abnormal session-termination handling
Diffstat (limited to 'src/scalarproduct')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c index 4d435f10b..5e40f2d65 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct.c +++ b/src/scalarproduct/gnunet-service-scalarproduct.c | |||
@@ -732,10 +732,16 @@ prepare_bobs_cryptodata_message_multipart (void *cls) | |||
732 | //disconnect our client | 732 | //disconnect our client |
733 | if (NULL == session->service_transmit_handle) { | 733 | if (NULL == session->service_transmit_handle) { |
734 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via cadet!)\n")); | 734 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via cadet!)\n")); |
735 | 735 | ||
736 | GNUNET_free (msg); | ||
737 | session->msg = NULL; | ||
738 | GNUNET_CONTAINER_DLL_remove (from_service_head, from_service_tail, session); | ||
739 | |||
736 | session->response->client_notification_task = | 740 | session->response->client_notification_task = |
737 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, | 741 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, |
738 | session->response); | 742 | session->response); |
743 | free_session_variables(session); | ||
744 | GNUNET_free(session); | ||
739 | return; | 745 | return; |
740 | } | 746 | } |
741 | if (session->transferred_element_count != session->used_elements_count) { | 747 | if (session->transferred_element_count != session->used_elements_count) { |
@@ -821,9 +827,16 @@ prepare_bobs_cryptodata_message (void *cls, | |||
821 | if (NULL == session->service_transmit_handle) { | 827 | if (NULL == session->service_transmit_handle) { |
822 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via cadet!)\n")); | 828 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via cadet!)\n")); |
823 | 829 | ||
830 | GNUNET_free (msg); | ||
831 | session->msg = NULL; | ||
832 | GNUNET_CONTAINER_DLL_remove (from_service_head, from_service_tail, session); | ||
833 | |||
824 | session->response->client_notification_task = | 834 | session->response->client_notification_task = |
825 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, | 835 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, |
826 | session->response); | 836 | session->response); |
837 | free_session_variables(session); | ||
838 | GNUNET_free(session); | ||
839 | return; | ||
827 | } | 840 | } |
828 | if (session->transferred_element_count != session->used_elements_count) { | 841 | if (session->transferred_element_count != session->used_elements_count) { |
829 | // multipart | 842 | // multipart |