fix build

This commit is contained in:
Ryan Tharp 2018-11-03 06:31:33 -07:00
parent 7af23dcaad
commit eeab475875

View File

@ -138,8 +138,6 @@ llarp_dotlokilookup_checkQuery(void *u, uint64_t orig, uint64_t left)
return; return;
} }
*/ */
llarp::service::Context *routerHiddenServiceContext =
(llarp::service::Context *)dll->user;
llarp::huint32_t foundAddr; llarp::huint32_t foundAddr;
if(!routerHiddenServiceContext->FindBestAddressFor(addr, foundAddr)) if(!routerHiddenServiceContext->FindBestAddressFor(addr, foundAddr))
{ {
@ -156,12 +154,12 @@ llarp_dotlokilookup_checkQuery(void *u, uint64_t orig, uint64_t left)
loki_tld_lookup_cache[addr.ToString()]=response; loki_tld_lookup_cache[addr.ToString()]=response;
*/ */
// we can't delete response now... // we can't delete response now...
sockaddr_in saddr; // sockaddr_in saddr;
saddr.sin_family = AF_INET; // saddr.sin_family = AF_INET;
saddr.sin_addr.s_addr = llarp::xhtonl(foundAddr).n; // saddr.sin_addr.s_addr = llarp::xhtonl(foundAddr).n;
// FIXME: flush cache to disk // FIXME: flush cache to disk
// on crash we'll need to bring up all the same IPs we assigned before... // on crash we'll need to bring up all the same IPs we assigned before...
writesend_dnss_response((sockaddr *)&saddr, qr->from, qr->request); writesend_dnss_response(&foundAddr, qr->from, qr->request);
delete qr; delete qr;
return; return;
} }