Re: Offline mode



Is the disco an instance that is created once (and reused)? Or, when
will this method happen?


static void
disco_construct (CamelService *service, CamelSession *session,
                 CamelProvider *provider, CamelURL *url,
                 CamelException *ex)
{
        CamelDiscoStore *disco = CAMEL_DISCO_STORE (service);

        CAMEL_SERVICE_CLASS (parent_class)->construct (service, session,
		 provider, url, ex);
        if (camel_exception_is_set (ex))
                return;
        disco->status = camel_session_is_online (session) ?
                CAMEL_DISCO_STORE_ONLINE : CAMEL_DISCO_STORE_OFFLINE;
}


I create my folder the first time when the session is offline. I
recreate the same folder when the session becomes online. However, if
the disco is reused .. this constructor will not happen and therefore
will the disco stay offline (disco->status iif).

Correct?

On Tue, 2006-06-13 at 16:20 +0200, Philip Van Hoof wrote:
> (gdb) break imap_get_message
> Breakpoint 5 at 0xb57332db: file camel-imap-folder.c, line 2038.
> (gdb) cont
> Continuing.
> [New Thread -1259193424 (LWP 13222)]
> [Thread -1259193424 (zombie) exited]
> 
> Breakpoint 5, imap_get_message (folder=0x8350e68, uid=0x8396588 "2790",
> ex=0x83333b8) at camel-imap-folder.c:2038
> 2038            CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER
> (folder);
> (gdb) next
> 2039            CamelImapStore *store = CAMEL_IMAP_STORE
> (folder->parent_store);
> (gdb)
> 2045            mi = (CamelImapMessageInfo *)camel_folder_summary_uid
> (folder->summary, uid);
> (gdb) print store
> $1 = (CamelImapStore *) 0x8334150
> (gdb) next
> 2046            if (mi == NULL) {
> (gdb) print *store
> $2 = {parent_object = {parent_object = {parent_object = {parent_object =
> {klass = 0x8333ce8, magic = 2007188717, hooks = 0x83354b0,
>           ref_count = 6, flags = 0, next = 0x0, prev = 0x0}, priv =
> 0x83346b8, session = 0x831cef0, provider = 0xb57429a0,
>         status = CAMEL_SERVICE_CONNECTED, connect_op = 0x0, url =
> 0x83347e0}, priv = 0x8336200, folders = 0x8335270, flags = 11,
>       mode = 3}, status = CAMEL_DISCO_STORE_OFFLINE, diary = 0x8334970},
> istream = 0x0, ostream = 0x0, summary = 0x8334ef0,
>   connected = 1, preauthed = 0, braindamaged = 0, renaming = 0,
> nocustomappend = 0, tag_prefix = 66 'B', command = 0,
>   current_folder = 0x0, server_level = IMAP_LEVEL_IMAP4REV1,
> capabilities = 350, parameters = 0, namespace = 0x8336738 "INBOX",
>   dir_sep = 46 '.', base_url = 0x8334838
> "imap://spampvanhoofbe mail pvanhoof be",
>   storage_path = 0x8336810
> "/home/pvanhoof/.tinymail/mail/imap/spampvanhoofbe mail pvanhoof be",
> authtypes = 0x0, refresh_stamp = 0}
> (gdb) print *session
> No symbol "session" in current context.
> (gdb) print *store->session
> There is no member named session.
> (gdb) print store->session
> There is no member named session.
> (gdb) print store.session
> There is no member named session.
> (gdb) print *0x831cef0
> $3 = 137481768
> (gdb) print *(CamelSession*)0x831cef0
> $4 = {parent_object = {klass = 0x831ce28, magic = 2007188717, hooks =
> 0x0, ref_count = 3, flags = 0, next = 0x0, prev = 0x0},
>   priv = 0x831d120, storage_path = 0x8332ae8
> "/home/pvanhoof/.tinymail/mail", junk_plugin = 0x0, online = 1,
> check_junk = 0,
>   network_state = 1}
> (gdb) print *store
> $5 = {parent_object = {parent_object = {parent_object = {parent_object =
> {klass = 0x8333ce8, magic = 2007188717, hooks = 0x83354b0,
>           ref_count = 6, flags = 0, next = 0x0, prev = 0x0}, priv =
> 0x83346b8, session = 0x831cef0, provider = 0xb57429a0,
>         status = CAMEL_SERVICE_CONNECTED, connect_op = 0x0, url =
> 0x83347e0}, priv = 0x8336200, folders = 0x8335270, flags = 11,
>       mode = 3}, status = CAMEL_DISCO_STORE_OFFLINE, diary = 0x8334970},
> istream = 0x0, ostream = 0x0, summary = 0x8334ef0,
>   connected = 1, preauthed = 0, braindamaged = 0, renaming = 0,
> nocustomappend = 0, tag_prefix = 66 'B', command = 0,
>   current_folder = 0x0, server_level = IMAP_LEVEL_IMAP4REV1,
> capabilities = 350, parameters = 0, namespace = 0x8336738 "INBOX",
>   dir_sep = 46 '.', base_url = 0x8334838
> "imap://spampvanhoofbe mail pvanhoof be",
>   storage_path = 0x8336810
> "/home/pvanhoof/.tinymail/mail/imap/spampvanhoofbe mail pvanhoof be",
> authtypes = 0x0, refresh_stamp = 0}
> (gdb) print *(CamelSession*)0x831cef0
> $6 = {parent_object = {klass = 0x831ce28, magic = 2007188717, hooks =
> 0x0, ref_count = 3, flags = 0, next = 0x0, prev = 0x0},
>   priv = 0x831d120, storage_path = 0x8332ae8
> "/home/pvanhoof/.tinymail/mail", junk_plugin = 0x0, online = 1,
> check_junk = 0,
>   network_state = 1}
> (gdb) bt
> #0  imap_get_message (folder=0x8350e68, uid=0x8396588 "2790",
> ex=0x83333b8) at camel-imap-folder.c:2046
> #1  0xb6e0fa93 in camel_folder_get_message (folder=0x8350e68,
> uid=0x8396588 "2790", ex=0x8367b9c) at camel-folder.c:1070
> #2  0xb71bbd6b in tny_msg_folder_get_message (self=0x8083640,
> header=0x83bd460) at tny-msg-folder.c:661
> #3  0xb71d3da2 in tny_msg_folder_iface_get_message (self=0x8083640,
> header=0x8191a30) at tny-msg-folder-iface.c:196
> #4  0x0804c29e in on_header_view_tree_selection_changed
> (selection=0x8367b9c, user_data=0x8367b9c) at tny-summary-window.c:337
> #5  0xb730d423 in IA__g_cclosure_marshal_VOID__VOID (closure=0x82655f0,
> return_value=0x0, n_param_values=1, param_values=0xbf92f60c,
>     invocation_hint=0xbf92f4fc, marshal_data=0x804c219) at gmarshal.c:77
> #6  0xb730179f in IA__g_closure_invoke (closure=0x82655f0,
> return_value=0x8367b9c, n_param_values=137788316,
> param_values=0x8367b9c,
>     invocation_hint=0x8367b9c) at gclosure.c:490
> #7  0xb73102ea in signal_emit_unlocked_R (node=0x8267058, detail=0,
> instance=0x80d4060, emission_return=0x0,
>     instance_and_params=0xbf92f60c) at gsignal.c:2438
> #8  0xb7311b19 in IA__g_signal_emit_valist (instance=0x80d4060,
> signal_id=203, detail=0, var_args=<value optimized out>)
>     at gsignal.c:2197
> #9  0xb7311e89 in IA__g_signal_emit (instance=0x8367b9c,
> signal_id=137788316, detail=137788316) at gsignal.c:2241
> #10 0xb7860c57 in _gtk_tree_selection_internal_select_node ()
> from /usr/lib/libgtk-x11-2.0.so.0
> #11 0xb787307e in gtk_tree_view_scroll_to_cell ()
> from /usr/lib/libgtk-x11-2.0.so.0
> #12 0xb787b9ca in gtk_tree_view_set_model ()
> from /usr/lib/libgtk-x11-2.0.so.0
> #13 0xb77aa850 in _gtk_marshal_BOOLEAN__BOXED ()
> from /usr/lib/libgtk-x11-2.0.so.0
> #14 0xb730116f in g_type_class_meta_marshal (closure=0x80a93e0,
> return_value=0x8367b9c, n_param_values=137788316,
>     param_values=0xbf92fc2c, invocation_hint=0x8367b9c,
> marshal_data=0x8367b9c) at gclosure.c:567
> #15 0xb730179f in IA__g_closure_invoke (closure=0x80a93e0,
> return_value=0x8367b9c, n_param_values=137788316,
> param_values=0x8367b9c,
>     invocation_hint=0x8367b9c) at gclosure.c:490
> #16 0xb73109ce in signal_emit_unlocked_R (node=0x80a9818, detail=0,
> instance=0x80c7b40, emission_return=0xbf92fdec,
>     instance_and_params=0xbf92fc2c) at gsignal.c:2476
> #17 0xb7311886 in IA__g_signal_emit_valist (instance=0x80c7b40,
> signal_id=30, detail=0,
>     var_args=0xbf92fe70 "\210�\222�(\0334\b {\f\b!�\210�@{\f\b�j\n\b")
> at gsignal.c:2207
> #18 0xb7311e89 in IA__g_signal_emit (instance=0x8367b9c,
> signal_id=137788316, detail=137788316) at gsignal.c:2241
> #19 0xb788cc4f in gtk_widget_activate ()
> from /usr/lib/libgtk-x11-2.0.so.0
> #20 0xb77a8fcd in gtk_propagate_event ()
> from /usr/lib/libgtk-x11-2.0.so.0
> #21 0xb77a93db in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
> #22 0xb764cddc in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
> #23 0xb71fa8c6 in IA__g_main_context_dispatch (context=0x80862c8) at
> gmain.c:1916
> #24 0xb71fd986 in g_main_context_iterate (context=0x80862c8, block=1,
> dispatch=1, self=0x804e008) at gmain.c:2547
> #25 0xb71fdca8 in IA__g_main_loop_run (loop=0x80e1448) at gmain.c:2751
> #26 0xb77a86d5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
> #27 0x0804ad42 in main (argc=1, argv=0xbf930144) at tny-main.c:92
> (gdb)
-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]