[Thread Prev][Thread Next][Thread Index]
Daemon Mode
- To: pilotmgr@xxxxxxxxxxxxxxxxxxxx
- Subject: Daemon Mode
- From: Kevin Fink <kevin@xxxxxxxx>
- Date: Mon, 5 Apr 1999 17:28:01 -0700 (PDT)
- Sender: owner-pilotmgr@moshpit
Although daemon mode attempts to turn off the 10 second connect timeout in
&hotSync(), it isn't entirely successful. There appears to be another
timeout within PDA::Pilot::accept() which makes it return -1 after about 3
minutes or so. Because of this PilotManager (slowly) loops, printing lots
of annoying output.
To fix this, I would suggest a couple of changes.
First, don't print out the request to press the Hotsync button when
in daemon mode (the user probably won't see it anyway):
***************
*** 2074,2080 ****
return;
}
! msg("Please press the Hotsync button on your Pilot cradle");
$CANCEL = 0;
--- 2074,2081 ----
return;
}
! msg("Please press the Hotsync button on your Pilot cradle")
! unless($MODE eq "DAEMON");
$CANCEL = 0;
Next, don't decrement $retries when in daemon mode, as that'll just make
us waste time looping:
***************
*** 2096,2102 ****
$retries = 3;
while (1)
{
! $retries--;
$gWm->update unless (defined $MODE);
--- 2097,2103 ----
$retries = 3;
while (1)
{
! $retries-- unless($MODE eq 'DAEMON');
$gWm->update unless (defined $MODE);
Finally, check to make sure $dlp isn't -1 before saying that we're
connected:
***************
*** 2115,2121 ****
$gWm->update unless (defined $MODE);
! if ($dlp)
{
msg("Connected.");
last;
--- 2114,2120 ----
$gWm->update unless (defined $MODE);
! if ($dlp && $dlp != -1)
{
msg("Connected.");
last;
Kevin
------------------------------------------------------------------------------
Kevin Fink <kevin@xxxxxxxx> N2H2, Creators of Bess and Searchopolis
Chief Technology Officer 900 Fourth Avenue, Suite 3400
http://www.n2h2.com/ Seattle, WA 98164
VOICE: 206-336-1501 / 800-971-2622 FAX: 206-336-1556
------------------------------------------------------------------------------
------------------------------------------------------------------------
***********************************************************
* This is a public mailing list! *
* Please do not publish Sun proprietary information here! *
* - - - - - - - - - - - - - - *
* http://www.moshpit.org/pilotmgr *
***********************************************************
|
|