• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OT Notifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT Notifier


  • Subject: Re: OT Notifier
  • From: Quinn <email@hidden>
  • Date: Thu, 21 Feb 2002 00:22:09 +0000

At 18:22 -0500 20/2/02, Michael Paluszek wrote:
static pascal void EventHandler( void* context, OTEventCode event, OTResult
result, void* cookie )
{
TCall mycall;
InetAddress caddr;
TEndpoint *ep;
OSStatus err;
int kSc;

// Endpoint information
EPInfo* epi = (EPInfo*) context;

The asynchronous handler is installed using:

OTNotifyUPP theHandler = NewOTNotifyUPP( EventHandler );

err = OTAsyncOpenEndpointInContext( OTCreateConfiguration(kTCPName), 0,
&info, theHandler, 0, NULL );

The above code doesn't make sense to me. The notifier casts the context parameter to an (EPInfo *), but when you call OTAsyncOpenEndpointInContext you pass 0 to the contextPtr parameter (the 5th parameter) of OTAsyncOpenEndpointInContext. Surely you should allocate an EPInfo instructure just before you open and pass its address in to the contextPtr parameter, right?

On MacOS 9.x cookie in EventHandler contains the endpoint. On OS X it is a
null pointer.

Well, that's interesting. I just checked the source for the OT compatibility library in Mac OS X 10.1 and it definitely tries to pass the EndpointRef to the cookie parameter. Are you sure you're not mixing up your cookies and your contexts?

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.

References: 
 >OT Notifier (From: Michael Paluszek <email@hidden>)

  • Prev by Date: OT Notifier
  • Next by Date: Re: OT Notifier
  • Previous by thread: OT Notifier
  • Next by thread: Re: OT Notifier
  • Index(es):
    • Date
    • Thread