Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem in call back function.



At 10:23 +0530 11/6/01, Rajendra Rao K wrote:
I am developing a plugin for Netscape. I need to download some file from
the plugin.

I am using Open Transport for downloading. But each time I try to download
something, the system always hangs in the call back function , i.e the call
back it never comes out of the switch statement of T_DATA after I receive
the data.

My guess is that you're running afoul of interrupt level issues. When OT calls your notifier, it calls it at deferred task time. There are a lot of things you can't do at deferred task time, including allocating memory with the system Memory Manager and stepping through code in a source-level debugging. Also, Netscape is probably not expecting to be called back at deferred task time (although I don't know the plugin API so I can't be sure). Does this sound like the problem?

For a complete list of what you can do at deferred task time, see DTS Technote 1104 "Interrupt-Safe Routines".

<http://developer.apple.com/technotes/tn/tn1104.html>

A better idea might be to change your code to use a sync/block endpoint with sync idle events to yield time to other tasks. This approach is a lot simpler for application-level code.

<http://developer.apple.com/techpubs/mac/NetworkingOT/NetworkingWOT-30.html#MARKER-9-22>

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


References: 
 >Problem in call back function. (From: Rajendra Rao K <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.