[Mono-list] Weird Queue morphing
Erik C
eriksl2@yahoo.com
Fri, 8 Nov 2002 09:16:48 -0800 (PST)
--0-1336945531-1036775808=:98068
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Ok please help me figure out if my code is bad(most
likely the case)...or if this is a bug in the Queue
class. It looks like the Queue fills up with 20
objects and then as I dequeue them suddenly the value
objects changes after I've dequeued 16 of them?!?!
The following debug output was made from the attached
code(the code is an attempt of making a port scanner)
thanks in advance,
-Erik-
University of Florida
my compile line::
mcs -checked -o Scanner.exe -t:exe Scanner.cs
my run line::
mono Scanner.exe -p 1-20 127.0.0.1
snip of output::
Just dequeued emptyQ=False targetQ.COunt=5 port=15
ip=127.0.0.1
Q size=5
This is the Queue now:
Port=16 IP=127.0.0.1 isOpen=False
Port=17 IP=127.0.0.1 isOpen=False
Port=18 IP=127.0.0.1 isOpen=False
Port=19 IP=127.0.0.1 isOpen=False
Port=20 IP=127.0.0.1 isOpen=False
Just dequeued emptyQ=False targetQ.COunt=4 port=16
ip=127.0.0.1
Q size=4
This is the Queue now:
Port=1 IP=127.0.0.1 isOpen=False
Port=2 IP=127.0.0.1 isOpen=False
Port=3 IP=127.0.0.1 isOpen=False
Port=4 IP=127.0.0.1 isOpen=False
Just dequeued emptyQ=False targetQ.COunt=3 port=1
ip=127.0.0.1
Q size=3
This is the Queue now:
Port=2 IP=127.0.0.1 isOpen=False
Port=3 IP=127.0.0.1 isOpen=False
Port=4 IP=127.0.0.1 isOpen=False
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
--0-1336945531-1036775808=:98068
Content-Type: application/octet-stream; name="Scanner.cs"
Content-Transfer-Encoding: base64
Content-Description: Scanner.cs
Content-Disposition: attachment; filename="Scanner.cs"
LyogVE9ETzogDQogKiAtQWRkIGFsZ28gdG8gcmFuZG9taXplIHRhcmdldHNM
aXN0DQogKiAtQWRkIFhNTCBvdXRwdXQgY2hvaWNlDQogKiAtU2VlIGl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