Apply patch: ncpfs-hg-commit-414.patch
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user