Port value in servent struct is in network byte order.
This was making net_server listening wrong service port. Telnet & FTP works again in non stand-alone mode. This close #7108. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40241 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -400,7 +400,7 @@ Services::_ToService(const BMessage& message, struct service*& service)
|
|||||||
if (message.FindInt32("port", &servicePort) != B_OK) {
|
if (message.FindInt32("port", &servicePort) != B_OK) {
|
||||||
struct servent* servent = getservbyname(name, string);
|
struct servent* servent = getservbyname(name, string);
|
||||||
if (servent != NULL)
|
if (servent != NULL)
|
||||||
servicePort = servent->s_port;
|
servicePort = ntohs(servent->s_port);
|
||||||
else
|
else
|
||||||
servicePort = -1;
|
servicePort = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user