-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
syslog (LOG_ERR, "NIS+: failed to read local socket info");
return NULL;
}
- port = sin.sin_port;
+ port = ntohs (sin.sin_port);
get_myaddress (&sin);
snprintf (addr, sizeof (addr), "%s.%d.%d", inet_ntoa (sin.sin_addr),
- port & 0x00FF, (port & 0xFF00) >> 8);
+ (port & 0xFF00) >> 8, port & 0x00FF);
cb->serv->ep.ep_val[0].uaddr = strdup (addr);
return cb;