GNUNET_free (nret);
}
/* finally, make termination call */
- rh->name_callback (rh->cls,
- NULL);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->name_callback (rh->cls,
+ NULL);
}
- if (NULL != rh->addr_callback)
- rh->addr_callback (rh->cls,
+ if ( (NULL != rh->addr_callback) &&
+ (GNUNET_SYSERR != rh->was_transmitted) )
+ rh->addr_callback (rh->cls,
NULL,
0);
}
(const struct sockaddr *) &v4,
sizeof (v4));
if ( (rh->af == AF_UNSPEC) &&
+ (GNUNET_SYSERR != rh->was_transmitted) &&
(1 == inet_pton (AF_INET6,
hostname,
&v6.sin6_addr)) )
(const struct sockaddr *) &v6,
sizeof (v6));
}
- rh->addr_callback (rh->cls,
- NULL,
- 0);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->addr_callback (rh->cls,
+ NULL,
+ 0);
GNUNET_free (rh);
return;
}
rh->addr_callback (rh->cls,
(const struct sockaddr *) &v6,
sizeof (v6));
- rh->addr_callback (rh->cls,
- NULL,
- 0);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->addr_callback (rh->cls,
+ NULL,
+ 0);
GNUNET_free (rh);
return;
}
GNUNET_break (0);
break;
}
- rh->addr_callback (rh->cls,
- NULL,
- 0);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->addr_callback (rh->cls,
+ NULL,
+ 0);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Finished resolving hostname `%s'.\n",
(const char *) &rh[1]);