- char buf[INET6_ADDRSTRLEN];
-
- if (NULL != rh->name_callback)
- LOG (GNUNET_ERROR_TYPE_INFO,
- _("Timeout trying to resolve IP address `%s'.\n"),
- inet_ntop (rh->af,
- (const void *) &rh[1],
- buf,
- sizeof(buf)));
- else
- LOG (GNUNET_ERROR_TYPE_INFO,
- _("Timeout trying to resolve hostname `%s'.\n"),
- (const char *) &rh[1]);
- /* check if request was canceled */
- if (GNUNET_SYSERR != rh->was_transmitted)
- {
- if (NULL != rh->name_callback)
- {
- /* no reverse lookup was successful, return IP as string */
- if (GNUNET_NO == rh->received_response)
- {
- nret = no_resolve (rh->af,
- &rh[1],
- rh->data_len);
- rh->name_callback (rh->cls, nret);
- GNUNET_free (nret);
- }
- /* finally, make termination call */
- rh->name_callback (rh->cls,
- NULL);
- }
- if (NULL != rh->addr_callback)
- rh->addr_callback (rh->cls,
- NULL,
- 0);
- }
- rh->was_transmitted = GNUNET_NO;
- GNUNET_RESOLVER_request_cancel (rh);
- GNUNET_CLIENT_disconnect (client);
- client = NULL;