Augh! Re: Proper usage of OTAsyncOpenEndpointInContext()
Augh! Re: Proper usage of OTAsyncOpenEndpointInContext()
- Subject: Augh! Re: Proper usage of OTAsyncOpenEndpointInContext()
- From: Dakidd <email@hidden>
- Date: Wed, 9 Jun 2004 23:41:57 -0700
>
Message: 5
>
Date: Wed, 9 Jun 2004 20:13:37 -0700
>
To: email@hidden
>
From: Dakidd <email@hidden>
>
Subject: Proper usage of OTAsyncOpenEndpointInContext()
>
>
After getting things more or less functional in my app, I decided to go
>
from the synchronous, to the asynchronous model for handling networking.
<snip>
>
So maybe *YOU* can see the problem? I hope so, 'cause it's doing a real
>
good job of hiding from me!
Ummmmm...
The word "D'OH!", preferably in great big flashing neon red letters 50 feet
tall comes to mind right about now.
I've been beating on this problem some more since posting that message, and
a hunch hit me a couple of minutes after the digest with that post in it
arrived. 'The program is behaving kinda like the time I started making
windows and trying to draw in them before I had called InitGraf(). The code
that was dying looked perfectly fine then, too. I wonder if...'
Went to work doing a line-by-line step-through, and sure enough...
I didn't realize it until just minutes ago, but the call to my test routine
that eventually invokes ClearPeerEntry() got moved in a frenzy of code
neatening and rearranging inspired by my decision to try to switch from
sync to async usage.
Everything looked fine up until the call to the test routine that was
checking the operation of my PeerList code. That code is the first place in
the program that'll try to call an OT function other than
InitOpenTransportInContext(). That's when I realized that the NEXT function
to be called after my test routine was the one that would eventually invoke
InitOpenTransportInContext().
AUGH!!!!!! I feel like such an idiot!
Placing the call to the test routine AFTER the call that inits OT and
trying again gives me 100% as-expected functionality.
On the plus side, the code that was complaining was (and still is) correct.
It wasn't my fault. Well, it was, but not because THAT code was wrong, but
because the test call got moved.
Live 'N Learn...
Don Bruder - email@hidden <--- Preferred Email - unmunged
I will choose a path that's clear: I will choose Free Will! - N. Peart
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.