Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/talkd sa_family on wire format is network byteorder



details:   https://anonhg.NetBSD.org/src/rev/1cfd1e016f0d
branches:  trunk
changeset: 537903:1cfd1e016f0d
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Oct 08 02:50:51 2002 +0000

description:
sa_family on wire format is network byteorder
from Alexander Yurchenko <grange%rt.mipt.ru@localhost>

diffstat:

 libexec/talkd/talkd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 59de8d1810c5 -r 1cfd1e016f0d libexec/talkd/talkd.c
--- a/libexec/talkd/talkd.c     Tue Oct 08 02:47:59 2002 +0000
+++ b/libexec/talkd/talkd.c     Tue Oct 08 02:50:51 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: talkd.c,v 1.14 2002/09/19 14:39:51 itojun Exp $        */
+/*     $NetBSD: talkd.c,v 1.15 2002/10/08 02:50:51 itojun Exp $        */
 
 /*
  * Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)talkd.c    8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: talkd.c,v 1.14 2002/09/19 14:39:51 itojun Exp $");
+__RCSID("$NetBSD: talkd.c,v 1.15 2002/10/08 02:50:51 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -137,7 +137,7 @@
                mp->r_tty[sizeof(mp->r_tty) - 1] = '\0';
 
                (void)memcpy(&ctl_addr, &mp->ctl_addr, sizeof(ctl_addr));
-               ctl_addr.sa_family = mp->ctl_addr.sa_family;
+               ctl_addr.sa_family = ntohs(mp->ctl_addr.sa_family);
                ctl_addr.sa_len = sizeof(ctl_addr);
                if (ctl_addr.sa_family != AF_INET)
                        continue;



Home | Main Index | Thread Index | Old Index