-
- if ((ntohs (msg->size) < sizeof(struct GNUNET_NSE_ClientMessage))
- || (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_NSE_ESTIMATE))
- {
-#if DEBUG_NSE
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "%s: received incorrect message (size %d < %d) from service!",
- "NSE API", ntohs (msg->size),
- sizeof(struct GNUNET_NSE_ClientMessage));
-#endif
- return;
- }
-
- client_msg = (struct GNUNET_NSE_ClientMessage *)msg;
-
- h->recv_cb (h->recv_cb_cls, client_msg->size_estimate,
- client_msg->std_deviation);
-
- GNUNET_CLIENT_receive (h->client,
- &message_handler, h, GNUNET_TIME_UNIT_FOREVER_REL);
+ }
+ if ((ntohs (msg->size) != sizeof (struct GNUNET_NSE_ClientMessage)) ||
+ (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_NSE_ESTIMATE))
+ {
+ GNUNET_break (0);
+ return;
+ }
+ client_msg = (const struct GNUNET_NSE_ClientMessage *) msg;
+ h->recv_cb (h->recv_cb_cls, GNUNET_TIME_absolute_ntoh (client_msg->timestamp),
+ GNUNET_ntoh_double (client_msg->size_estimate),
+ GNUNET_ntoh_double (client_msg->std_deviation));
+ GNUNET_CLIENT_receive (h->client, &message_handler, h,
+ GNUNET_TIME_UNIT_FOREVER_REL);