Import ncpfs 0.8
This commit is contained in:
@@ -411,14 +411,34 @@ ipx_sap_find_server(char *name, int server_type, int timeout,
|
||||
{
|
||||
goto finished;
|
||||
}
|
||||
|
||||
|
||||
result->sipx_family = AF_IPX;
|
||||
result->sipx_network = n_addr->network;
|
||||
result->sipx_port = n_addr->port;
|
||||
ipx_assign_node(result->sipx_node, n_addr->node);
|
||||
|
||||
/* Now we connect to the ultimate target, again with a test
|
||||
for reachability. This time nothing is done except connecting. */
|
||||
|
||||
server.addr = *result;
|
||||
|
||||
if (ncp_connect(&server) != 0)
|
||||
{
|
||||
if ( (errno != ENETUNREACH)
|
||||
|| (ipx_make_reachable(ntohl(server.addr.sipx_network))!=0)
|
||||
|| (ncp_connect(&server) != 0)) {
|
||||
goto finished;
|
||||
}
|
||||
}
|
||||
|
||||
if (ncp_disconnect(&server) != 0)
|
||||
{
|
||||
goto finished;
|
||||
}
|
||||
|
||||
res = 0;
|
||||
|
||||
|
||||
finished:
|
||||
close(sock);
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user