From 26119abd201ceb77e16d165821b43e5a802baab9 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Mon, 17 Jan 2011 17:50:31 +0000 Subject: [PATCH] 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 --- src/servers/net/Services.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/net/Services.cpp b/src/servers/net/Services.cpp index 6196f5eef9..7b15ea4350 100644 --- a/src/servers/net/Services.cpp +++ b/src/servers/net/Services.cpp @@ -400,7 +400,7 @@ Services::_ToService(const BMessage& message, struct service*& service) if (message.FindInt32("port", &servicePort) != B_OK) { struct servent* servent = getservbyname(name, string); if (servent != NULL) - servicePort = servent->s_port; + servicePort = ntohs(servent->s_port); else servicePort = -1; }