Bug 374 - --offline ignored
: --offline ignored
Status: RESOLVED FIXED
: Sylpheed-Claws (GTK1)
Other
: 0.9.7
: PC Linux
: P3 normal
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2003-10-30 02:43 by
Modified: 2003-11-21 10:43 (History)


Attachments
More logs to watch for --offline (1.59 KB, patch)
2003-11-02 14:22, Alfons Hoogervorst
no flags Details | Diff
diff -u of 2 log files (6.64 KB, text/plain)
2003-11-05 17:45, Pierre Fortin
no flags Details
screen shot -- server 1 (68.35 KB, image/png)
2003-11-20 02:41, Pierre Fortin
no flags Details
screen shot -- server 2 (76.95 KB, image/png)
2003-11-20 02:42, Pierre Fortin
no flags Details
screen shot -- server 3 (77.92 KB, image/png)
2003-11-20 02:43, Pierre Fortin
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-10-30 02:43:54
Needed to invoke "sylpheed --offline" for the first time today and discovered
that this option is ignored, causing s-c to timeout on every account being checked.
------- Comment #1 From 2003-10-31 22:39:24 -------
Works for me.

Any more information?
------- Comment #2 From 2003-11-01 00:15:28 -------
It works as long as a network connection exists...  I first noticed/experienced
this problem when I was completely disconnected...  just disconnected my eth0
(s-c 0.9.6-57) and I get one "connection failed" for each enabled account.  HTH.
------- Comment #3 From 2003-11-01 14:24:14 -------
Hmng? Should I interprete this as: 
 
"--offline does not work after the connection has gone down unexpectedly." 
 
? 
 
So claws thinks there is a connection and refuses --offline. If that's true we 
could just force close() on every existing socket, and wait until recv()s and 
send()s return with an socket exception. 
 
 
------- Comment #4 From 2003-11-01 14:35:55 -------
"--offline does not work after the connection has gone down unexpectedly." 

Not quite, though that is one interpretation...  in my case, I was out of town
and totally disconnected and powered off.... booted up my laptop (no network
connections) and issued "sylpheed &" as usual (wanting to read previously d/l'ed
mail), with the resultant delays.  Wanting to avoid this, I checked the man page
and noticed the --offline switch... "Great!" I thought...  issued the modified
command -- no change...  so the difference here is that there was no network at
any time prior to using the swtich...  HTH
------- Comment #5 From 2003-11-01 17:25:15 -------
You're making it pretty hard. :-) 
So did you start "sylpheed --offline" while having an existing sylpheed 
running? 
------- Comment #6 From 2003-11-02 01:49:17 -------
Sorry no...
s/delays.  Wanting/delays.  Stopped s-c.  Wanting/
s/avoid this/avoid checks & delays/
s/swtich/switch/
:^)
------- Comment #7 From 2003-11-02 14:21:59 -------
It still works for me.
Try the attached patch which adds some more debugging traces. Run sylpheed from
an xterm with "sylpheed --debug --offline" and when it has completely launched,
get the relevant log.
------- Comment #8 From 2003-11-02 14:22:43 -------
Created an attachment (id=103) [details]
More logs to watch for --offline
------- Comment #9 From 2003-11-05 17:44:17 -------
OK....  finally got some time to test this with patched 0.9.6-61...  my setup
has 3 of 6 accounts active; 2 are on my home server, and 1 in on the laptop
itself...  there are differences in processing depending on connection status...
 my tests were done with eth0 connected, then disconnected...

Both tests produced lots of identical output (obviously :) so I produced a diff
-u file from the logs...  In summary, with --offline, s-c connects to the remote
and local POP servers -- if there is no network connection, it doesn't check...
not even the local POP server which may be due to DNS failure from lack of
access to the remote POP/DNS server.
------- Comment #10 From 2003-11-05 17:45:26 -------
Created an attachment (id=105) [details]
diff -u of 2 log files
------- Comment #11 From 2003-11-05 18:02:40 -------
Pierre, thanks. I also need to have the output of main.c, can you grep the 
lines of both logs for "main.c"? I'm especially interested in those lines 
telling the off/online state. 
------- Comment #12 From 2003-11-05 18:41:28 -------
grep'ed for main.c in both files -- diff -u on this indicates both were
identical...

main.c:455:working off line
main.c:524:Processing (top level folder)...
main.c:532:done.
# repeat last 2 lines for each folder
main.c:346:working offline
main.c:353:should have set an online mode

HTH
------- Comment #13 From 2003-11-20 02:39:46 -------
Hi Alfons,

Well...  I was out of town last night and fired up the laptop with no network
connection whatsoever...  invoked s-c with --offline...  this time, I have 3
screen shots coming at you... one for each pop server that got checked...

From what I observed, it appears that --offline just changes work_offline to 1
when there is no network -- maybe just no DNS server; but I haven't tried to
look at the code, so this is pure speculation based on what you'll see in the
screen shots...

HTH
------- Comment #14 From 2003-11-20 02:41:07 -------
Created an attachment (id=107) [details]
screen shot -- server 1
------- Comment #15 From 2003-11-20 02:42:26 -------
Created an attachment (id=108) [details]
screen shot -- server 2
------- Comment #16 From 2003-11-20 02:43:24 -------
Created an attachment (id=109) [details]
screen shot -- server 3
------- Comment #17 From 2003-11-20 07:44:05 -------
The unbroken little bar in the lower right corner of the sylpheed window
shows that in each of these screenshots you are not in 'offline' mode.
------- Comment #18 From 2003-11-20 08:18:52 -------
|The unbroken little bar in the lower right corner 
|of the sylpheed window shows that in each of these 
|screenshots you are not in 'offline' mode.

Well, the explanation Pierre gave is still a bit dense,
but what I gather is that even with sylpheed --offline 
(with no previous sylpheed invoked - that right Pierre?),
sylpheed still checks the accounts.

Pierre, any idea whether you have some mail queued while
invoking sylpheed?
------- Comment #19 From 2003-11-20 13:59:38 -------
OK...  let's see if I can be any clearer ---  don't try to read anything else
into my comments (there are no between-the-lines implications -- just what
happened)  :^)

- no mail queued, just some unread mail
- shutdown laptop, disconnect network & USB devices
- travelled w/laptop powered off
- at destination, power up laptop (still configured for ethernet)
    - NO network connection of any sort
    - only cables: power & external mouse
- open terminal window
(at this point, .sylpheed/sylpheedrc contains work_offline=0 because that's the
normal state I run under; hence the reason the bar will be unbroken in the next
steps)
- issue "sylpheed --offline"
- s-c complains of DNS
- times out waiting for pop server 1
- I take screen shot, then click OK
[repeat previous 3 steps for next 2 pop servers]

Nothing else...  it's that simple to reproduce; actually... simpler...  no
travel required...  :^)

HTH :^)

------- Comment #20 From 2003-11-20 14:05:51 -------
I see (I think :) You use 'check for new mail at startup', and on start up
(sylpheed --offline) it first checks for new mail *before* going into offline
mode
------- Comment #21 From 2003-11-20 14:39:35 -------
|You use 'check for new mail at startup', and 
|on start up (sylpheed --offline) it first checks 
|for new mail *before* going into offline mode

Ah, that should be pretty easy to solve. :-)
------- Comment #22 From 2003-11-20 17:46:36 -------
> Ah, that should be pretty easy to solve. :-)

Cool!   Reversing the order, --offline should not check for mail even if a
network connection exists....  or, should there be --no<option> (i.e.,
--noreceive[-all] options too?  :^)
------- Comment #23 From 2003-11-21 10:43:54 -------
2003-11-21 [alfons]     0.9.6claws84

        * src/main.c
                no mail incorporation allowed with --offline param.
                fixes bug #374, "--offline ignored"