core/net/resolv: Misc. updates and cleanups.

This commit is contained in:
Robert Quattlebaum 2013-03-14 19:14:32 -07:00
parent 7e9f472faa
commit da81360731
2 changed files with 5 additions and 9 deletions

View file

@ -331,11 +331,6 @@ static int mdns_needs_host_announce;
PROCESS(mdns_probe_process, "mDNS probe");
#endif /* RESOLV_CONF_SUPPORTS_MDNS */
#if RESOLV_AUTO_REMOVE_TRAILING_DOTS
/* For removing trailing dots in resolv_query() and resolve_lookup2(). */
static char dns_name_without_dots[RESOLV_CONF_MAX_DOMAIN_NAME_SIZE + 1];
#endif /* RESOLV_AUTO_REMOVE_TRAILING_DOTS */
/*---------------------------------------------------------------------------*/
#if RESOLV_VERIFY_ANSWER_NAMES || VERBOSE_DEBUG
/** \internal
@ -806,7 +801,7 @@ newdata(void)
queryptr = skip_name(queryptr) + sizeof(struct dns_question),
--nquestions
) {
#if RESOLV_CONF_SUPPORTS_MDNS
if(!is_request) {
/* If this isn't a request, we don't need to bother
* looking at the individual questions. For the most
@ -815,7 +810,6 @@ newdata(void)
continue;
}
#if RESOLV_CONF_SUPPORTS_MDNS
{
struct dns_question *question = (struct dns_question *)skip_name(queryptr);
@ -1022,8 +1016,7 @@ newdata(void)
#endif
*/
DEBUG_PRINTF("resolver: Answer for \"%s\" is usable.\n",
namemapptr->name);
DEBUG_PRINTF("resolver: Answer for \"%s\" is usable.\n", namemapptr->name);
namemapptr->state = STATE_DONE;
#if RESOLV_SUPPORTS_RECORD_EXPIRATION
@ -1196,6 +1189,7 @@ PROCESS_THREAD(resolv_process, ev, data)
#if RESOLV_AUTO_REMOVE_TRAILING_DOTS
static const char *
remove_trailing_dots(const char *name) {
static char dns_name_without_dots[RESOLV_CONF_MAX_DOMAIN_NAME_SIZE + 1];
size_t len = strlen(name);
if(name[len - 1] == '.') {

View file

@ -131,6 +131,8 @@ set_connection_address(uip_ipaddr_t *ipaddr)
status = RESOLV_STATUS_RESOLVING;
} else if(status == RESOLV_STATUS_CACHED && resolved_addr != NULL) {
PRINTF("Lookup of \"%s\" succeded!\n",QUOTEME(UDP_CONNECTION_ADDR));
} else if(status == RESOLV_STATUS_RESOLVING) {
PRINTF("Still looking up \"%s\"...\n",QUOTEME(UDP_CONNECTION_ADDR));
} else {
PRINTF("Lookup of \"%s\" failed. status = %d\n",QUOTEME(UDP_CONNECTION_ADDR),status);
}