summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Summermatter <elias.summermatter@seccom.ch>2021-03-18 18:44:46 +0100
committerElias Summermatter <elias.summermatter@seccom.ch>2021-03-18 18:44:46 +0100
commit7d85c27e9b61ac900932337c9ec6a72c6326f6fc (patch)
tree253bfe29b05f81992b6d4eb6929ce4befaa672b5
parent8cd1e1929db7206937491100a9101022f02d7d64 (diff)
Fixed setu tests and state maschine
-rw-r--r--src/setu/gnunet-service-setu.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 91a5f45a2..f6ccc94d1 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -2080,16 +2080,25 @@ handle_union_p2p_full_element (void *cls,
uint16_t element_size;
+ if(PHASE_EXPECT_IBF == op->phase) {
+ op->phase = PHASE_FULL_RECEIVING;
+ }
+
+
+
/* Allow only receiving of full element message if in expect IBF or in PHASE_FULL_RECEIVING state */
- if ( (PHASE_EXPECT_IBF != op->phase) &&
- (PHASE_FULL_RECEIVING != op->phase) )
- {
- GNUNET_break_op (0);
- fail_union_operation (op);
- return;
- }
+ if ((PHASE_FULL_RECEIVING != op->phase) &&
+ (PHASE_FULL_SENDING != op->phase))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Handle full element phase is %u\n",
+ (unsigned) op->phase);
+ GNUNET_break_op (0);
+ fail_union_operation (op);
+ return;
+ }
+
- op->phase = PHASE_FULL_RECEIVING;
element_size = ntohs (emsg->header.size)
- sizeof(struct GNUNET_SETU_ElementMessage);