Hi, From: "Mark Probert" <probertm / nospam-acm.org> > "Bill Kelly" <billk / cts.com> wrote: > > > > Sorry I can't be of more help.... Only #send and #recv... > > > the @sock.syswrite() is the base call in all of Telnet, underlying the > print(), puts(), cmd() and so on. It is the primative that is called to > send data to the host. To the best of my (limited) knowledge, #send and #recv are lower level than syswrite(). *Assuming* #send and #recv translate in Ruby to the Berkeley socket system functions of the same names. (I have not looked at ruby's implementation of #syswrite and #send / #recv... so.. I could be mistaken. I'm just judging by their name and corresponding behavior.) > As an update, I managed to get the system to 'fail' with dump-log turned > on. the dump log records that the command is corrupted prior to it > being sent. The code flow looks like: > > puts "sending cmd -- #{c}" # c is correct here > @conn.write(c) # @conn is a Telnet object --> calls Telnet.write() > > def write(string) > length = string.length > while 0 < length > IO::select(nil, [@sock]) > @dumplog.log_dump('>', string[-length..-1]) if @options.has_key? > "Dump_log") # <--- string is bad here! length -= > @sock.syswrite(string[-length..-1]) > end > end > > so, i can only assume that one of the other threads is writing to the > this string. Is this possible? Or is there some other way that the > passed string can become corrupt? What if you try freezing "c" ? Maybe c.freeze before the printout at the top verifying it's correct... Perhaps another thread is unexpectedly modifying it? HTH, Regards, Bill