Skip to content
Snippets Groups Projects
Commit 4a25c6d3 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Check that query_address returns something before trying to use it.

Rev: lib/modules/Tools.pmod/Standalone.pmod/features.pike:1.12
parent 265d60b1
No related branches found
No related tags found
No related merge requests found
...@@ -26,9 +26,12 @@ void test_ipv6() ...@@ -26,9 +26,12 @@ void test_ipv6()
if (check) { if (check) {
// The following fails on Solaris machines which haven't // The following fails on Solaris machines which haven't
// been configured for IPv6 (ENETUNREACH). // been configured for IPv6 (ENETUNREACH).
if( port->query_address() )
{
int portno = array_sscanf(port->query_address(), "%*s %d")[0]; int portno = array_sscanf(port->query_address(), "%*s %d")[0];
check = Stdio.File()->connect("::1", portno); check = Stdio.File()->connect("::1", portno);
} }
}
item("IPv6 connecting", check); item("IPv6 connecting", check);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment