diff options
Diffstat (limited to 'src/setu/gnunet-service-setu.c')
-rw-r--r-- | src/setu/gnunet-service-setu.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c index 38027983a..a65db418a 100644 --- a/src/setu/gnunet-service-setu.c +++ b/src/setu/gnunet-service-setu.c | |||
@@ -4115,26 +4115,20 @@ handle_union_p2p_offer (void *cls, | |||
4115 | perf_store.demand.sent += 1; | 4115 | perf_store.demand.sent += 1; |
4116 | perf_store.demand.sent_var_bytes += sizeof(struct GNUNET_HashCode); | 4116 | perf_store.demand.sent_var_bytes += sizeof(struct GNUNET_HashCode); |
4117 | #endif | 4117 | #endif |
4118 | ev = GNUNET_MQ_msg_header_extra (demands, | ||
4119 | sizeof(struct GNUNET_HashCode), | ||
4120 | GNUNET_MESSAGE_TYPE_SETU_P2P_DEMAND); | ||
4121 | /* Save send demand message for message control */ | 4118 | /* Save send demand message for message control */ |
4122 | if (GNUNET_YES != | 4119 | if (GNUNET_YES != |
4123 | update_message_control_flow ( | 4120 | update_message_control_flow ( |
4124 | op->message_control_flow, | 4121 | op->message_control_flow, |
4125 | MSG_CFS_SENT, | 4122 | MSG_CFS_SENT, |
4126 | hash, | 4123 | hash, |
4127 | DEMAND_MESSAGE) | 4124 | DEMAND_MESSAGE)) |
4128 | ) | ||
4129 | { | 4125 | { |
4130 | // GNUNET_free (ev); | ||
4131 | LOG (GNUNET_ERROR_TYPE_ERROR, | 4126 | LOG (GNUNET_ERROR_TYPE_ERROR, |
4132 | "Double demand message sent found!\n"); | 4127 | "Double demand message sent found!\n"); |
4133 | GNUNET_break (0); | 4128 | GNUNET_break (0); |
4134 | fail_union_operation (op); | 4129 | fail_union_operation (op); |
4135 | return; | 4130 | return; |
4136 | } | 4131 | } |
4137 | ; | ||
4138 | 4132 | ||
4139 | /* Mark offer as received received */ | 4133 | /* Mark offer as received received */ |
4140 | if (GNUNET_YES != | 4134 | if (GNUNET_YES != |
@@ -4142,37 +4136,31 @@ handle_union_p2p_offer (void *cls, | |||
4142 | op->message_control_flow, | 4136 | op->message_control_flow, |
4143 | MSG_CFS_RECEIVED, | 4137 | MSG_CFS_RECEIVED, |
4144 | hash, | 4138 | hash, |
4145 | OFFER_MESSAGE) | 4139 | OFFER_MESSAGE)) |
4146 | ) | ||
4147 | { | 4140 | { |
4148 | // GNUNET_free (ev); | ||
4149 | LOG (GNUNET_ERROR_TYPE_ERROR, | 4141 | LOG (GNUNET_ERROR_TYPE_ERROR, |
4150 | "Double offer message received found!\n"); | 4142 | "Double offer message received found!\n"); |
4151 | GNUNET_break (0); | 4143 | GNUNET_break (0); |
4152 | fail_union_operation (op); | 4144 | fail_union_operation (op); |
4153 | return; | 4145 | return; |
4154 | } | 4146 | } |
4155 | ; | ||
4156 | |||
4157 | /* Mark element to be expected to received */ | 4147 | /* Mark element to be expected to received */ |
4158 | if (GNUNET_YES != | 4148 | if (GNUNET_YES != |
4159 | update_message_control_flow ( | 4149 | update_message_control_flow ( |
4160 | op->message_control_flow, | 4150 | op->message_control_flow, |
4161 | MSG_CFS_EXPECTED, | 4151 | MSG_CFS_EXPECTED, |
4162 | hash, | 4152 | hash, |
4163 | ELEMENT_MESSAGE) | 4153 | ELEMENT_MESSAGE)) |
4164 | ) | ||
4165 | { | 4154 | { |
4166 | // GNUNET_free (ev); | ||
4167 | LOG (GNUNET_ERROR_TYPE_ERROR, | 4155 | LOG (GNUNET_ERROR_TYPE_ERROR, |
4168 | "Element already expected!\n"); | 4156 | "Element already expected!\n"); |
4169 | GNUNET_break (0); | 4157 | GNUNET_break (0); |
4170 | fail_union_operation (op); | 4158 | fail_union_operation (op); |
4171 | return; | 4159 | return; |
4172 | } | 4160 | } |
4173 | ; | 4161 | ev = GNUNET_MQ_msg_header_extra (demands, |
4174 | 4162 | sizeof(struct GNUNET_HashCode), | |
4175 | 4163 | GNUNET_MESSAGE_TYPE_SETU_P2P_DEMAND); | |
4176 | GNUNET_memcpy (&demands[1], | 4164 | GNUNET_memcpy (&demands[1], |
4177 | hash, | 4165 | hash, |
4178 | sizeof(struct GNUNET_HashCode)); | 4166 | sizeof(struct GNUNET_HashCode)); |