Skip to content

Commit

Permalink
Print an understandable error if netbios resolving fails in the dsm t…
Browse files Browse the repository at this point in the history
…est tool
  • Loading branch information
mstorsjo authored and jbkempf committed Apr 16, 2019
1 parent 45e48b7 commit a4c7e2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/dsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ int main(int ac, char **av)
fname = av[argoffset++];

ns = netbios_ns_new();
if (netbios_ns_resolve(ns, host, NETBIOS_FILESERVER, &addr.sin_addr.s_addr))
if (netbios_ns_resolve(ns, host, NETBIOS_FILESERVER, &addr.sin_addr.s_addr)) {
printf("Unable to resolve %s as a NetBIOS name\n", host);
exit(-1);
}

printf("%s's IP address is : %s\n", host, inet_ntoa(addr.sin_addr));

Expand Down

0 comments on commit a4c7e2b

Please sign in to comment.