diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 4ff4918fd..8b595c376 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 8 06:54:54 1997 Gary Houston + + * net_db.c (scm_getserv): add missing SCM_ALLOW_INTS. + use htons in getservbyport argument. + Tue Jan 7 18:11:24 1997 Jim Blandy * ports.h (SCM_PTOBNUM): Removed extraneous semicolon. diff --git a/libguile/net_db.c b/libguile/net_db.c index 5b26ba900..51daac85b 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -316,6 +316,7 @@ scm_getserv (name, proto) entry = getservent (); if (!entry) scm_syserror (s_getserv); + SCM_ALLOW_INTS; return scm_return_entry (entry); } SCM_ASSERT (SCM_NIMP (proto) && SCM_STRINGP (proto), proto, SCM_ARG2, s_getserv); @@ -328,10 +329,11 @@ scm_getserv (name, proto) { SCM_ASSERT (SCM_INUMP (name), name, SCM_ARG1, s_getserv); SCM_DEFER_INTS; - entry = getservbyport (SCM_INUM (name), SCM_CHARS (proto)); + entry = getservbyport (htons (SCM_INUM (name)), SCM_CHARS (proto)); } if (!entry) scm_syserror (s_getserv); + SCM_ALLOW_INTS; return scm_return_entry (entry); } diff --git a/libguile/socket.c b/libguile/socket.c index fcdddb1a6..06fe86ac4 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -465,7 +465,7 @@ scm_addr_vector (address, proc) ve[2] = scm_ulong2num ((unsigned long) ntohs (nad->sin_port)); } else - scm_misc_error (proc, "Unrecognised internet address type: %s", + scm_misc_error (proc, "Unrecognised address family: %s", scm_listify (SCM_MAKINUM (fam), SCM_UNSPECIFIED)); return result;