aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/setu/gnunet-service-setu.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index f06e9cf9b..540628afa 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -2058,13 +2058,7 @@ check_union_p2p_full_element (void *cls,
2058 struct Operation *op = cls; 2058 struct Operation *op = cls;
2059 2059
2060 (void) op; 2060 (void) op;
2061 /* Allow only receiving of full element message if in expect IBF or in PHASE_FULL_RECEIVING state */ 2061
2062 if ( (PHASE_EXPECT_IBF != op->phase) &&
2063 (PHASE_FULL_RECEIVING != op->phase) )
2064 {
2065 GNUNET_break_op (0);
2066 return GNUNET_SYSERR;
2067 }
2068 // FIXME: check that we expect full elements here? 2062 // FIXME: check that we expect full elements here?
2069 return GNUNET_OK; 2063 return GNUNET_OK;
2070} 2064}
@@ -2085,6 +2079,16 @@ handle_union_p2p_full_element (void *cls,
2085 struct KeyEntry *ke; 2079 struct KeyEntry *ke;
2086 uint16_t element_size; 2080 uint16_t element_size;
2087 2081
2082
2083 /* Allow only receiving of full element message if in expect IBF or in PHASE_FULL_RECEIVING state */
2084 if ( (PHASE_EXPECT_IBF != op->phase) &&
2085 (PHASE_FULL_RECEIVING != op->phase) )
2086 {
2087 GNUNET_break_op (0);
2088 fail_union_operation (op);
2089 return;
2090 }
2091
2088 op->phase = PHASE_FULL_RECEIVING; 2092 op->phase = PHASE_FULL_RECEIVING;
2089 2093
2090 element_size = ntohs (emsg->header.size) 2094 element_size = ntohs (emsg->header.size)