aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-07 21:55:41 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-07 21:55:41 +0000
commit7082f581f7f7c32fba7af6c22175efc6db2dae61 (patch)
tree3d37efbd3bd20b706faf731e792109b19bedd426 /src
parent67eeadf357c24abec2dd790a54be74b7db71560d (diff)
downloadgnunet-7082f581f7f7c32fba7af6c22175efc6db2dae61.tar.gz
gnunet-7082f581f7f7c32fba7af6c22175efc6db2dae61.zip
-simplify further, too much checking...
Diffstat (limited to 'src')
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct.h10
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_alice.c7
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_bob.c2
3 files changed, 0 insertions, 19 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.h b/src/scalarproduct/gnunet-service-scalarproduct.h
index 82b2d10c5..f0c3fa22d 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct.h
+++ b/src/scalarproduct/gnunet-service-scalarproduct.h
@@ -101,16 +101,6 @@ struct BobCryptodataMessage
101 struct GNUNET_MessageHeader header; 101 struct GNUNET_MessageHeader header;
102 102
103 /** 103 /**
104 * For alignment, always zero.
105 */
106 uint32_t reserved GNUNET_PACKED;
107
108 /**
109 * How many elements the Bob has in the intersection (in NBO).
110 */
111 uint32_t intersection_element_count GNUNET_PACKED;
112
113 /**
114 * How many elements this individual message delivers (in NBO). 104 * How many elements this individual message delivers (in NBO).
115 */ 105 */
116 uint32_t contained_element_count GNUNET_PACKED; 106 uint32_t contained_element_count GNUNET_PACKED;
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
index 522af201d..ce796aa05 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
@@ -731,13 +731,6 @@ handle_bobs_cryptodata_message (void *cls,
731 return GNUNET_SYSERR; 731 return GNUNET_SYSERR;
732 } 732 }
733 msg = (const struct BobCryptodataMessage *) message; 733 msg = (const struct BobCryptodataMessage *) message;
734 GNUNET_break_op (0 == ntohl (msg->reserved));
735 if (s->used_element_count != ntohl (msg->intersection_element_count))
736 {
737 /* Alice and Bob disagree on intersection set size, bad news! */
738 GNUNET_break_op (0);
739 return GNUNET_SYSERR;
740 }
741 contained = ntohl (msg->contained_element_count); 734 contained = ntohl (msg->contained_element_count);
742 required_size = sizeof (struct BobCryptodataMessage) 735 required_size = sizeof (struct BobCryptodataMessage)
743 + 2 * contained * sizeof (struct GNUNET_CRYPTO_PaillierCiphertext) 736 + 2 * contained * sizeof (struct GNUNET_CRYPTO_PaillierCiphertext)
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c
index 2001c39e8..8f946f7a3 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c
@@ -595,8 +595,6 @@ transmit_bobs_cryptodata_message (struct BobServiceSession *s)
595 (2 + s->cadet_transmitted_element_count * 2) 595 (2 + s->cadet_transmitted_element_count * 2)
596 * sizeof (struct GNUNET_CRYPTO_PaillierCiphertext), 596 * sizeof (struct GNUNET_CRYPTO_PaillierCiphertext),
597 GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA); 597 GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA);
598 msg->reserved = htonl (0);
599 msg->intersection_element_count = htonl (s->used_element_count);
600 msg->contained_element_count = htonl (s->cadet_transmitted_element_count); 598 msg->contained_element_count = htonl (s->cadet_transmitted_element_count);
601 599
602 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 600 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,