aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2014-05-26 08:43:57 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2014-05-26 08:43:57 +0000
commitd5108ffe43fb02ccc862f1ffc770f5bc02a67248 (patch)
treecabf94e5371fde53ea0cae86a7e769d8633f9fd5 /src/scalarproduct
parentd0d8c852a37bffe6be52f5ee48653728ee4ce5f6 (diff)
downloadgnunet-d5108ffe43fb02ccc862f1ffc770f5bc02a67248.tar.gz
gnunet-d5108ffe43fb02ccc862f1ffc770f5bc02a67248.zip
- SP now uses the correct msg type for session initialization
- fixed bug when handling of failed set operations
Diffstat (limited to 'src/scalarproduct')
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c
index a6f398fbe..0ce5ffccc 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct.c
@@ -594,6 +594,10 @@ cb_transfer_message (void *cls,
594 s->client_transmit_handle = NULL; 594 s->client_transmit_handle = NULL;
595 free_session_variables (s); 595 free_session_variables (s);
596 break; 596 break;
597
598 case GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SESSION_INITIALIZATION:
599 s->service_transmit_handle = NULL;
600 break;
597 601
598 case GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA: 602 case GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA:
599 case GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA_MULTIPART: 603 case GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA_MULTIPART:
@@ -1268,6 +1272,7 @@ cb_intersection_element_removed (void *cls,
1268 compute_service_response (s); 1272 compute_service_response (s);
1269 return; 1273 return;
1270 } 1274 }
1275 break;
1271 default: 1276 default:
1272 if (NULL != s->intersection_listen) 1277 if (NULL != s->intersection_listen)
1273 { 1278 {
@@ -1452,7 +1457,7 @@ prepare_alices_computation_request (struct ServiceSession * s)
1452 GNUNET_i2s (&s->peer)); 1457 GNUNET_i2s (&s->peer));
1453 1458
1454 msg = GNUNET_new (struct ServiceRequestMessage); 1459 msg = GNUNET_new (struct ServiceRequestMessage);
1455 msg->header.type = htons (GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA); 1460 msg->header.type = htons (GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SESSION_INITIALIZATION);
1456 memcpy (&msg->session_id, &s->session_id, sizeof (struct GNUNET_HashCode)); 1461 memcpy (&msg->session_id, &s->session_id, sizeof (struct GNUNET_HashCode));
1457 msg->header.size = htons (sizeof (struct ServiceRequestMessage)); 1462 msg->header.size = htons (sizeof (struct ServiceRequestMessage));
1458 1463
@@ -2611,7 +2616,7 @@ run (void *cls,
2611 {NULL, NULL, 0, 0} 2616 {NULL, NULL, 0, 0}
2612 }; 2617 };
2613 static const struct GNUNET_CADET_MessageHandler cadet_handlers[] = { 2618 static const struct GNUNET_CADET_MessageHandler cadet_handlers[] = {
2614 { &handle_alices_computation_request, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0}, 2619 { &handle_alices_computation_request, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SESSION_INITIALIZATION, 0},
2615 { &handle_alices_cyrptodata_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0}, 2620 { &handle_alices_cyrptodata_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0},
2616 { &handle_alices_cyrptodata_message_multipart, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA_MULTIPART, 0}, 2621 { &handle_alices_cyrptodata_message_multipart, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA_MULTIPART, 0},
2617 { &handle_bobs_cryptodata_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA, 0}, 2622 { &handle_bobs_cryptodata_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA, 0},