[Verse-dev] A bug

Emil Brink emil at obsession.se
Wed Sep 6 09:27:13 CEST 2006


Samuel Siltanen wrote:
> On Tue, 5 Sep 2006, Emil Brink wrote:
> 
>> A fixed version of this function is now in CVS, please try and do let me
>> know if it works better.
> 
> Yes, it works better if there is a semicolon, but without it, it does 
> not work. Fortunatelly, I managed to localize the problem quickly. In 
> v_n_set_network_address () there is this line:
> 
> address->port = htons(VERSE_STD_CONNECT_TO_PORT);
> 
> which should be:
> 
> address->port = VERSE_STD_CONNECT_TO_PORT;
> 
> because otherwise the byte order is changed twice with htons ().

Bah. I was even specially looking at the way those fields are handled with
respect to endianness, and discussing it with Eskil (on IRC, #verse on
Freenode, a channel that is warmly recommended for *all* Verse developers).

Of course my test case during the re-write of that code used a non-default
port, since that was the case under test. Blah. Regression, anyone? :/

Sorry for the mess-up, again. :/ It's fixed in CVS now, of course. And
very quickly tested, at least with one non-default and one default port.

Regards,

/Emil


More information about the Verse-dev mailing list