should namecache_fetch support negative responses?

Michael Adam ma at sernet.de
Mon Aug 28 14:46:10 GMT 2006


Hi,

libsmb/namecache.c:namecache_fetch() returns true only if
the gencache_get call was successful and if an IP address
is returned (line 212):

        return *num_names > 0; /* true only if some ip has been fetched */
	

On the other hand, the call of namecache_fetch in 
libsmb/namequery.c:internal_resolve_name()suggests, 
that namecache_fetch() supports negative responses (line 1159):

	if (namecache_fetch(name, name_type, return_iplist, return_count)) {
		/* This could be a negative response */
		return (*return_count > 0);
        }

What is the desired behaviour?

Cheers, Michael



More information about the samba-technical mailing list