Apply patch: ncpfs-hg-commit-414.patch

This commit is contained in:
Mario Fetka
2026-04-28 20:56:02 +02:00
parent 7589a3691c
commit 4740ddf9ae
2 changed files with 66 additions and 3 deletions

View File

@@ -875,7 +875,9 @@ NWCCODE ncp_find_server_addr(const char **serverName, int object_type, struct so
err = NWCCGetConnInfo(conn, NWCC_INFO_TRAN_ADDR, sizeof(ta), &ta);
if (!err) {
if (ta.type == NT_IPX) {
switch (ta.type) {
#ifdef NCP_IPX_SUPPORT
case NT_IPX: {
struct sockaddr_ipx* ipx = (struct sockaddr_ipx*)addr;
if (len < sizeof(*ipx)) {
@@ -887,7 +889,12 @@ NWCCODE ncp_find_server_addr(const char **serverName, int object_type, struct so
memcpy(&ipx->sipx_port, buffer + 10, 2);
ipx->sipx_type = 0x11;
}
} else if (ta.type == NT_UDP || ta.type == NT_TCP) {
break;
}
#endif
#ifdef NCP_IN_SUPPORT
case NT_UDP:
case NT_TCP: {
struct sockaddr_in* in = (struct sockaddr_in*)addr;
if (len < sizeof(*in)) {
@@ -897,8 +904,12 @@ NWCCODE ncp_find_server_addr(const char **serverName, int object_type, struct so
memcpy(&in->sin_addr.s_addr, buffer + 2, 4);
memcpy(&in->sin_port, buffer, 2);
}
} else {
break;
}
#endif
default:
err = EINVAL;
break;
}
if (!err) {
err = NWGetFileServerName(conn, sname);