Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:1023] [Fwd: netrek: possible bug]





--
Nicolas Trown  (ntrown@corp.inprise.com)
Software Engineer - VisiBroker development
Inprise Corporation  http://www.inprise.com

-- BEGIN included message

Nick,

I've compiled netrek (vanilla) source at work and think I've found a
bug.  As far as I've been able to tell, you're the code owner.  If you
aren't, please let me know who is.

Here's the problem:

clue is defined as an extern int on lines 55 and 118 of ntserv/data.h

It appears this variable is indeed used for two different things, and
should have been given different names.  I'm not terribly familiar with
the code, but it seems clue is first set when the .sysdef file is
parsed.  clue is set to the value of CLUE to indicate if the server
should check for cluedness (new word?) in sysdefaults.c (line 91).

clue is later modified in time_access in timecheck.c but I think mods
you made when you re-wrote code for the .time file make this
modification obsolete.

Anyway, the side effect is that setting CLUE=1 in .sysdef SHOULD do
minimal clue checking (only ask twink to send word to self) but instead,
clue has been incremented a bunch of times (as side effect of
time_access() being called) and the more advanced question clue checking
is used.

Let me know what you think.  Am I stoned?

-Ross

-- END included message