net: app: Print info if address family is not set properly

If the IP address family is not set to correct value, then print
information about it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2017-10-08 12:56:51 +03:00 committed by Anas Nashif
parent 9bff68fc2e
commit 4befa1316d

View File

@ -115,6 +115,9 @@ char *_net_app_sprint_ipaddr(char *buf, int buflen,
snprintk(buf, buflen, "%s:%u", ipaddr,
ntohs(net_sin(addr)->sin_port));
#endif
} else {
snprintk(buf, buflen, "<AF_UNSPEC %d>",
addr->sa_family);
}
return buf;