[363] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

Re: bug in zwgc/library

daemon@ATHENA.MIT.EDU (mhpower@Athena.MIT.EDU)
Wed May 13 11:21:32 1992

From: mhpower@Athena.MIT.EDU
To: warlord@Athena.MIT.EDU
Cc: bug-zephyr@Athena.MIT.EDU
Date: Wed, 13 May 92 11:21:16 EDT

>Zephyr doesn't store the window-gram port number in Network-Byte
>order. ...

The number fprintf'd by zwgc corresponds to bindin.sin_port in
ZOpenPort, so I think this is in network byte order.

>Here are the patches to correct the problem ...

In zwgc, wouldn't it really be ntohs, not htons?

In any case, I don't regard this as a bug fix; it's a change in
functionality.

Whenever I'm logged in, I run a program of my own that reads WGFILE,
and it relies on the current byte-order behavior. I doubt I'm the only
person in the world who writes programs that talk to zwgc.

It seems that you're introducing a gratuitous incompatibility with
previous versions of the Zephyr library. IMHO, in the rare cases where
you want to tell a human your port number, you should run ntohs
yourself.

Matt

home help back first fref pref prev next nref lref last post