*/
int direction;
+ /**
+ * GNUNET_YES if a response was received
+ */
+ int received_response;
+
/**
* Length of the data that follows this struct.
*/
if (rh->was_transmitted != GNUNET_SYSERR)
{
if (NULL != rh->name_callback)
- rh->name_callback (rh->cls, NULL);
+ {
+ if (rh->received_response == GNUNET_NO)
+ rh->name_callback (rh->cls,
+ no_resolve ((const struct sockaddr *) &rh[1], rh->data_len));
+ else
+ rh->name_callback (rh->cls, NULL);
+ }
if (NULL != rh->addr_callback)
rh->addr_callback (rh->cls, NULL, 0);
}
if (rh->was_transmitted != GNUNET_SYSERR)
{
if (NULL != rh->name_callback)
- rh->name_callback (rh->cls, NULL);
+ rh->name_callback (rh->cls, NULL);
if (NULL != rh->addr_callback)
rh->addr_callback (rh->cls, NULL, 0);
}
#endif
if (rh->was_transmitted != GNUNET_SYSERR)
rh->name_callback (rh->cls, hostname);
+ rh->received_response = GNUNET_YES;
GNUNET_CLIENT_receive (client,
&handle_response,
rh,
memcpy (&rh[1], sa, salen);
rh->data_len = salen;
rh->direction = GNUNET_YES;
+ rh->received_response = GNUNET_NO;
if (GNUNET_NO == do_resolve)
{
rh->task = GNUNET_SCHEDULER_add_now (&numeric_reverse, rh);