diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-10-08 17:18:31 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-10-08 17:18:31 +0000 |
commit | 042cb093ce1f6c8d7ff2e806903ea9d65947f34e (patch) | |
tree | 9b2b3d790a76a08b4336b751f50de49a985700da /src/scalarproduct | |
parent | ad501d7d03b2c998ad703abc8dc8f02b3acec2ac (diff) | |
download | gnunet-042cb093ce1f6c8d7ff2e806903ea9d65947f34e.tar.gz gnunet-042cb093ce1f6c8d7ff2e806903ea9d65947f34e.zip |
couple of summary fixes to the previous changes
Diffstat (limited to 'src/scalarproduct')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c index 6462a1407..e543000fe 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct.c +++ b/src/scalarproduct/gnunet-service-scalarproduct.c | |||
@@ -1907,7 +1907,6 @@ handle_service_request_multipart (void *cls, | |||
1907 | uint32_t contained_elements; | 1907 | uint32_t contained_elements; |
1908 | uint32_t msg_length; | 1908 | uint32_t msg_length; |
1909 | unsigned char * current; | 1909 | unsigned char * current; |
1910 | struct ServiceSession * responder_session; | ||
1911 | int32_t i = -1; | 1910 | int32_t i = -1; |
1912 | 1911 | ||
1913 | // are we in the correct state? | 1912 | // are we in the correct state? |
@@ -1954,9 +1953,9 @@ handle_service_request_multipart (void *cls, | |||
1954 | if (session->transferred_element_count == used_elements) { | 1953 | if (session->transferred_element_count == used_elements) { |
1955 | // single part finished | 1954 | // single part finished |
1956 | session->state = SERVICE_REQUEST_RECEIVED; | 1955 | session->state = SERVICE_REQUEST_RECEIVED; |
1957 | if (responder_session) { | 1956 | if (session->response) { |
1958 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Got session with key %s and a matching element set, processing.\n"), GNUNET_h2s (&session->key)); | 1957 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Got session with key %s and a matching element set, processing.\n"), GNUNET_h2s (&session->key)); |
1959 | if (GNUNET_OK != compute_service_response (session, responder_session)) { | 1958 | if (GNUNET_OK != compute_service_response (session, session->response)) { |
1960 | //something went wrong, remove it again... | 1959 | //something went wrong, remove it again... |
1961 | GNUNET_CONTAINER_DLL_remove (from_service_head, from_service_tail, session); | 1960 | GNUNET_CONTAINER_DLL_remove (from_service_head, from_service_tail, session); |
1962 | goto except; | 1961 | goto except; |
@@ -2322,8 +2321,8 @@ handle_service_response (void *cls, | |||
2322 | goto invalid_msg; | 2321 | goto invalid_msg; |
2323 | } | 2322 | } |
2324 | current += PAILLIER_ELEMENT_LENGTH; | 2323 | current += PAILLIER_ELEMENT_LENGTH; |
2325 | session->r = GNUNET_malloc (sizeof (gcry_mpi_t) * count); | 2324 | session->r = GNUNET_malloc (sizeof (gcry_mpi_t) * session->used_element_count); |
2326 | session->r_prime = GNUNET_malloc (sizeof (gcry_mpi_t) * count); | 2325 | session->r_prime = GNUNET_malloc (sizeof (gcry_mpi_t) * session->used_element_count); |
2327 | // Convert each k[][perm] to its MPI_value | 2326 | // Convert each k[][perm] to its MPI_value |
2328 | for (i = 0; i < contained_element_count; i++) { | 2327 | for (i = 0; i < contained_element_count; i++) { |
2329 | if (0 != (rc = gcry_mpi_scan (&session->r[i], GCRYMPI_FMT_USG, current, | 2328 | if (0 != (rc = gcry_mpi_scan (&session->r[i], GCRYMPI_FMT_USG, current, |