aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-06 22:43:47 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-06 22:43:47 +0000
commite2d37ecae1269f387a7f7ed57cfc4575224e52b9 (patch)
treec657902a26f1c1bf8eb579520a6c3235142f5b74 /src
parent9d487bb2fe029b369f362bdbe4697005061a4e5e (diff)
downloadgnunet-e2d37ecae1269f387a7f7ed57cfc4575224e52b9.tar.gz
gnunet-e2d37ecae1269f387a7f7ed57cfc4575224e52b9.zip
-mark minor todos
Diffstat (limited to 'src')
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_bob.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c
index ee74b515a..fdc2d955d 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c
@@ -625,6 +625,7 @@ transmit_bobs_cryptodata_message (struct BobServiceSession *s)
625 * @param vector the vector to compute over 625 * @param vector the vector to compute over
626 * @param length the length of the vector 626 * @param length the length of the vector
627 * @return an MPI value containing the calculated sum, never NULL 627 * @return an MPI value containing the calculated sum, never NULL
628 * TODO: code duplication with Alice!
628 */ 629 */
629static gcry_mpi_t 630static gcry_mpi_t
630compute_square_sum (const gcry_mpi_t *vector, 631compute_square_sum (const gcry_mpi_t *vector,
@@ -770,16 +771,14 @@ compute_service_response (struct BobServiceSession *session)
770} 771}
771 772
772 773
773
774
775
776/** 774/**
777 * Iterator to copy over messages from the hash map 775 * Iterator to copy over messages from the hash map
778 * into an array for sorting. 776 * into an array for sorting.
779 * 777 *
780 * @param cls the `struct AliceServiceSession *` 778 * @param cls the `struct BobServiceSession *`
781 * @param key the key (unused) 779 * @param key the key (unused)
782 * @param value the `struct GNUNET_SCALARPRODUCT_Element *` 780 * @param value the `struct GNUNET_SCALARPRODUCT_Element *`
781 * TODO: code duplication with Alice!
783 */ 782 */
784static int 783static int
785copy_element_cb (void *cls, 784copy_element_cb (void *cls,
@@ -810,6 +809,7 @@ copy_element_cb (void *cls,
810 * @param a pointer to first `struct MpiValue *` 809 * @param a pointer to first `struct MpiValue *`
811 * @param b pointer to first `struct MpiValue *` 810 * @param b pointer to first `struct MpiValue *`
812 * @return -1 for a < b, 0 for a=b, 1 for a > b. 811 * @return -1 for a < b, 0 for a=b, 1 for a > b.
812 * TODO: code duplication with Alice!
813 */ 813 */
814static int 814static int
815element_cmp (const void *a, 815element_cmp (const void *a,
@@ -833,6 +833,7 @@ element_cmp (const void *a,
833static void 833static void
834transmit_cryptographic_reply (struct BobServiceSession *s) 834transmit_cryptographic_reply (struct BobServiceSession *s)
835{ 835{
836 /* TODO: code duplication with Alice! */
836 s->sorted_elements 837 s->sorted_elements
837 = GNUNET_malloc (GNUNET_CONTAINER_multihashmap_size (s->intersected_elements) * 838 = GNUNET_malloc (GNUNET_CONTAINER_multihashmap_size (s->intersected_elements) *
838 sizeof (struct MpiElement)); 839 sizeof (struct MpiElement));