Connect to the network before doing a DNS lookup, if we're not connected already.

This commit is contained in:
Stephen Heumann 2017-04-18 18:05:00 -05:00
parent d08a36c9ca
commit 4bb7e378ba
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,10 @@ LongWord DoLookupName(NBPLookupNameRec *commandRec) {
hostInfo.cvtPort =
TCPIPMangleDomainName(0, &resultBuf->entityName.buffer[0]);
} else {
// Make sure we're connected before doing DNS lookup.
if (TCPIPGetConnectStatus() == FALSE)
TCPIPConnect(NULL);
hostInfo.cvtPort =
TCPIPMangleDomainName(0xE000, &resultBuf->entityName.buffer[0]);
TCPIPDNRNameToIP(&resultBuf->entityName.buffer[0], &dnrInfo);