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/