Separate UI to new file, still not quite complete.
Also fixed code style in files, and settings used by CLion.
This commit is contained in:
parent
4d6ff1e9f8
commit
851c2f79e3
6 changed files with 184 additions and 105 deletions
16
dns.cpp
16
dns.cpp
|
@ -8,14 +8,14 @@ PRErrorCode LookupName(char *hostname, PRNetAddr *result) {
|
|||
// PRNetAddr tempAddr;
|
||||
// do {
|
||||
iter = PR_EnumerateAddrInfo(iter, addrInfos, 0, result);
|
||||
char ipString[80];
|
||||
PRStatus status = PR_NetAddrToString(result, ipString, 75);
|
||||
if(status == PR_FAILURE) {
|
||||
const PRErrorCode err = PR_GetError();
|
||||
fprintf(stderr, "Error: Converting PRNetAddr to string %d: %s\n",
|
||||
err, PR_ErrorToName(err));
|
||||
return err;
|
||||
}
|
||||
char ipString[80];
|
||||
PRStatus status = PR_NetAddrToString(result, ipString, 75);
|
||||
if (status == PR_FAILURE) {
|
||||
const PRErrorCode err = PR_GetError();
|
||||
fprintf(stderr, "Error: Converting PRNetAddr to string %d: %s\n",
|
||||
err, PR_ErrorToName(err));
|
||||
return err;
|
||||
}
|
||||
printf("Found IP Address: %s\n", ipString);
|
||||
return 0;
|
||||
// break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue