GNOME Bugzilla – Bug 312668
Unable to go back to Online mode after clicking offline button...
Last modified: 2013-09-13 00:52:46 UTC
Please describe the problem: This is happening on 5th August build. Mail access thru iMAP I click on the offline button to get to offline mode. I send some emails in offline mode which puts it in the outbox. Now, I need to go to Online mode to send it. I can't press on the offline/online button since it is disabled. Neither I could click File->Work Online since it is also disabled. The only way to go to online is to restart evolution. Steps to reproduce: 1. 2. 3. Actual results: Expected results: The offline/online buttion should turn offline with an red cross in between. The 'File' menu should have "Work Online" option which should bring back evolution to online mode. Today it still says "Work Offline" after going to offline. Also, upon restarting evolution, it should stay in offline mode. Does this happen every time? Always Other information:
bumping pri. i keep missing shres on irc when he's discussing it. i think it's due to some changes to camel-disco-store i made for imap to work. but the logic in some of the mail-offline-handler is all wrong anyway, it is using the camel-store connected state to check the camel-disco-store online state, which are not compatible variables. anyway, the shell interfaces are stupid, it doesn't need to know about the details of which stores are going offline and should either just have a single 'finished' event, or the set line status method should be synchronous.
So, I changed the service_is_relevant to do the correct variable check like this if (CAMEL_IS_DISCO_STORE (service) && (!camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (service)))) and now the correct code path seems to get hit. went_offline set_offline_done get hit. Which means that the offline process is done. But the progress listener does not get updated. In went_offline there are segments of code GNOME_Evolution_OfflineProgressListener_updateProgress(listener, connection_list, &ev); . . CORBA_free (connection_list); which should typically tell the progress listener that all the connections have been dropped. So its either that the connections are not really being dropped or something is borked in how went_offline is tracking connections.
All of this stuff: GNOME_Evolution_OfflineProgressListener_updateProgress(listener, connection_list, &ev); . . CORBA_free (connection_list); Is actually redundant now. It used to be used to update the pointless window telling youwhat was still online; but now it isn't shown anywhere, so is just a waste of api to implement. Can you please attach the patch here, thanks
Created attachment 50449 [details] [review] Code fix not Bug fix Attaching a patch which seems to be the partial soln. Please note this *does not* fix the bug. Just seems to fix some part of the code.
In camel-disco-store.c:set_status() if (!camel_service_disconnect (CAMEL_SERVICE (disco_store), TRUE, ex)) { g_print ("wow it could not be this truly, not\n"); return; } camel_service_disconnect returns true which means it failed. If this fails then Disco_store->status = status; camel_service_connect (CAMEL_SERVICE (disco_store), ex); gets executed and the offlining icon never returns. If i comment out camel_service_connect then the icon gets toggled but ofcourse camel_service_disconnect would have failed so the store is still online. I am yet to figure out why camel_service_disconnect would fail...
"camel_service_disconnect returns true which means it failed." Umm, wrong ... even the documentation says otherwise. * Returns %TRUE if the disconnect was successful or %FALSE otherwise **/ gboolean camel_service_disconnect (CamelService *service, gboolean clean, CamelException *ex) Anyway my last suggestion was to ignore the disco state and just ALWAYS set the state on it. As i said repeatedly, you can re-set the same state safely - or if you can't the code needs fixing so you can. This no good: + (!camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (service)))) return !going_offline; It should return TRUE always. Also this: "camel_service_disconnect returns true which means it failed. If this fails then Disco_store->status = status; camel_service_connect (CAMEL_SERVICE (disco_store), ex);" Connecting a service has NOTHING to do with "being online". It applies equally well to a store in offline state.
*** Bug 313518 has been marked as a duplicate of this bug. ***
This no good: + (!camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (service)))) return !going_offline; It should return TRUE always. So that statement was wrong, but it wasn't hard to see that when looking at how the code worked. The offline interface is just rubbish, so i've removed it entirely, patches coming soon.
Created attachment 50836 [details] [review] remove unused rubbish in excahgne code
Created attachment 50837 [details] [review] new offline interface in mail shell and remove crap in calendar
Created attachment 50844 [details] [review] updated evolution patch
*** Bug 313288 has been marked as a duplicate of this bug. ***
*** Bug 255837 has been marked as a duplicate of this bug. ***
still issues with patches
Created attachment 50977 [details] [review] fixes some problems with cancelling going offline
Created attachment 50978 [details] [review] go offline/online in the right order
Verified with local IMAP and Groupwise server with Evolution 2.3.8