Click to See Complete Forum and Search --> : I am the biggest moron I've ever met!!!
I spent yesterday writing a TFTP client, read-only. It took a few hours, mostly getting the java stream classes working right and working with a binary protocol, but I got the whole thing together, except the modes. It's supposed to support netascii and octet (raw 8bit bytes). I wasn't doing any differentiating between the modes: I'd tell the server what mode to send it in, then I'd just output the data to file as is, regardless of what mode was used. the only thing I had to worry about w/ modes is that the netascii will have a CRandLF at the end of each line, which would have to be fixed. Well, here I am retrieving these files. I do it in netascii, and everything is transferred perfectly. I do it in octet, and the files are larger. That's bizarre. Octet should be transferring perfectly, and the netascii files should be messed up. I open one of the ones I transferred with octet; it looks just like the one on the server. I open it up in binary mode (vim -b), and low and behold, a ^M at the end of each line! Obviously, I somehow got my modes mixed. I looked for two hours last night! Went to bed, couldn't sleep, got up and looked for another half hour. I was going insane.
Finally, this morning, I telnet in and take a look at the file... I was checking to see if strings matched, and I should have said
if( strcmp(....) == 0) then match
I was saying if (... != 0)
How could I not see that. I need to be shot in the nuts at point blank range with a 12 gauge.
That's my story for today.
TheLinuxDuck
11-13-2000, 12:02 PM
Originally posted by kmj:
I need to be shot in the nuts at point blank range with a 12 gauge.
I want you to take a moment to imagine this happening to yourself.
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
YaRness
11-13-2000, 12:17 PM
Originally posted by kmj:
nuts ... 12 gauge
those terms shouldn't be used in the same sentence, unless part of some odd compliment on the capability of your... hardware http://www.linuxnewbie.org/ubb/eek.gif
------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------
TheLinuxDuck
11-13-2000, 12:21 PM
Originally posted by kmj:
*shiver*
SHIVER ME TIMBERS, MATEY!
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
Sweede
11-13-2000, 01:18 PM
Originally posted by YaRness:
those terms shouldn't be used in the same sentence, unless part of some odd compliment on the capability of your... hardware http://www.linuxnewbie.org/ubb/eek.gif
"im going to hit myself in the nuts with the butt of a 12 gauge."
is that ok ?
it'd still hurt like hell, but it'd a wiser move...
Strike
11-13-2000, 02:34 PM
Originally posted by YaRness:
those terms shouldn't be used in the same sentence, unless part of some odd compliment on the capability of your... hardware http://www.linuxnewbie.org/ubb/eek.gif
What if you are talking about the size of the ring in your "Prince Albert"? ::shudder::
Originally posted by Strike:
What if you are talking about the size of the ring in your "Prince Albert"? ::shudder::
LOL http://www.linuxnewbie.org/ubb/biggrin.gif
TheLinuxDuck
11-13-2000, 06:13 PM
I knew a guy who got his done. I still don't get it.
He said that he can't go to the bathroom normally anymore.. if he does, the stream will curve around the ring, and shoot all over his legs. http://www.linuxnewbie.org/ubb/biggrin.gif http://www.linuxnewbie.org/ubb/biggrin.gif http://www.linuxnewbie.org/ubb/biggrin.gif
I laughed hard when he described the first time he found that out.
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq