Import ncpfs 0.8

This commit is contained in:
ncpfs archive import
2026-04-28 20:39:57 +02:00
parent f2bcb2c71e
commit c6124785a9
10 changed files with 62 additions and 22 deletions

View File

@@ -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;