Thanks for the quick response!
It turns out the issue didn't seem to involve netlib. The problem was that
the code I was calling to do the polling was in a shared library. Some of
the functions were inline functions and those inline functions worked fine
when blazer was not running. When blazer was running those lines crashed the
phone. I'm not sure why this happened, but I just copied and pasted the code
instead of relying on the inlined functions and things seem to work fine
now.
Michael
On 2/8/07, Dmitry Grinberg <[EMAIL PROTECTED]> wrote:
>
> try not calling "NetLibOpenConfig". if blazer is on, there already
> exists a connection you can use.
>
> On 2/8/07, Michael Smith <[EMAIL PROTECTED]> wrote:
> > I'm trying to get my app to poll a server in the 'background.' I've
> > accomplished this by setting an alarm AlmSetAlarm to go off every 10
> minutes
> > that calls my application with the sysAppLaunchCmdAlarmTriggered launch
> > code. Once my code is launched it opens the netlib:
> >
> > err = NetLibOpen(*appNetRefP, &ifErrs);
> > if(err && err != netErrAlreadyOpen)
> > {
> > if(err == netErrConfigNotFound)
> > {
> > NetLibOpenConfig(*appNetRefP, 0, 0, &ifErrs);
> > err = NetLibOpen(*appNetRefP, &ifErrs);
> > }
> > //error occured while opening netlib
> > if( ifErrs)
> > {}// interface error
> > }
> >
> > connects to the socket, sends the data and closes the netlib.
> >
> > This works great most of the time. However, if I try polling while the
> > blazer application is running, the app crashes + the phone restarts. Any
> > thoughts, suggestions on how I can avoid this/not poll if the netlib is
> in
> > use by another application?
> >
> > thanks
> > Michael
> > -- For information on using the PalmSource Developer Forums, or to
> > unsubscribe, please see
> > http://www.palmos.com/dev/support/forums/
>
>
> --
> Best Regards, Dmitry Grinberg
> Software Engineer, http://PalmPowerups.com
> (847) 226 9295
> AIM: DmitryGrinberg
> MSN: [EMAIL PROTECTED]
> ICQ: 165589894
> Y! IM: dmitrygr2003
>
> --
> For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/