Re: Patch: fix the progress information when refreshing an imap folder



2008/11/20 Sergio Villar Senin <svillar igalia com>:
> Martin Bonnin escribiu:
>> Actually, for the tny_folder_refresh_async() method, each time the
>> status code is TNY_FOLDER_STATUS_CODE_REFRESH. And the progress I get
>> is something like :
>>
>> 235/18056
>> 684/18056
>> 1289/18056
>> 1220/1450
>> 1875/18056
>> 2150/18056
>> ...
>>
>> So I do not see how to filter this "1450". I can of course make a "low
>> pass" filter that checks the last 3 out of last 4 progress but I would
>> rather expect tinymail to send me consistent progress information.
>
> Martin tinymail currently does that, just check how we do it in Modest,
> you just need to ignore all those status data which are not tagged as
> that. In Modest we do it this way:
>
>        /* Show only the status information we want */
>        if (status->code != TNY_FOLDER_STATUS_CODE_REFRESH)
>                return;

Of course I do this in the application code :)

>
> And that's all. With this filter you'll only get progress information
> about the folder refresh and not about the other operations.

See the 2 gdb backtraces below. The first one is the"bad" progress.
The second one is "good". Both have TNY_FOLDER_STATUS_CODE_REFRESH as
the status code but the first one is called from
camel_stream_buffer_read_opp() with inconsistent values.

Breakpoint 3, tny_camel_folder_refresh_async_status (op=0x42f207b0,
    what=0x43261d28 "Fetching summary information for new messages in
folder", sofar=1223, oftotal=1246,
    thr_user_data=0x91fdd20) at tny-camel-folder.c:1911
1911    in tny-camel-folder.c
(gdb) where
#0  tny_camel_folder_refresh_async_status (op=0x42f207b0,
    what=0x43261d28 "Fetching summary information for new messages in
folder", sofar=1223, oftotal=1246,
    thr_user_data=0x91fdd20) at tny-camel-folder.c:1911
#1  0x40f1cfa1 in camel_operation_progress (cc=0x42f207b0, sofar=1223,
oftotal=1246) at camel-operation.c:605
#2  0x40f205a2 in camel_stream_buffer_read_opp (stream=0x9252a40,
    buffer=0x43067f99 "Content-Type: text/plain;
charset=\"utf-8\"\r\nSubject: SVN [avx] commit: r50723 - in
/trunk/avx6/arcbuild/avos: Include/ Source/\r\nDate: Mon, 18 Aug 2008
15:08:13 -0000\r\nTo: Niklas Schroeter <schroeter ar"...,
    n=0, len=1246) at camel-stream-buffer.c:335
#3  0x4268edb1 in imap_read_untagged_opp (store=0x922fcf0,
    line=0x4306d6c8 "8\002B8\002BETCH (UID 122141 FLAGS (\\Seen)
RFC822.SIZE 11717 INTERNALDATE \"18-Aug-2008 17:08:14 +0200\"
BODY[HEADER.FIELDS (\"DATE\" \"FROM\" \"TO\" \"CC\" \"SUBJECT\"
\"MESSAGE-ID\" \"X-PRIORITY\" \"X-MSMAIL-PRIORITY\" \""...,
ex=0x428b632c, len=1246) at camel-imap-command.c:727
#4  0x4268e4cf in camel_imap_command_response (store=0x922fcf0,
response=0x428b6084, ex=0x428b632c)
    at camel-imap-command.c:508
#5  0x4269815a in imap_update_summary (folder=0x9252088, exists=18084,
changes=0x98039b0, ex=0x428b632c)
    at camel-imap-folder.c:3550
#6  0x42699cc9 in camel_imap_folder_changed (folder=0x9252088,
exists=18084, expunged=0x0, ex=0x428b632c)
    at camel-imap-folder.c:4464
#7  0x42692472 in imap_rescan (folder=0x9252088, exists=18084,
ex=0x428b632c) at camel-imap-folder.c:1267
#8  0x426916db in camel_imap_folder_selected (folder=0x9252088,
response=0x430f9368, ex=0x428b632c, idle=1)
    at camel-imap-folder.c:780
#9  0x42691dd5 in imap_refresh_info (folder=0x9252088, ex=0x428b632c)
at camel-imap-folder.c:963
#10 0x40eba16a in disco_refresh_info (folder=0x9252088, ex=0x428b632c)
at camel-disco-folder.c:268
---Type <return> to continue, or q <return> to quit---
#11 0x40ecccdf in camel_folder_refresh_info (folder=0x9252088,
ex=0x428b632c) at camel-folder.c:409
#12 0x409e41db in tny_camel_folder_refresh_async_thread
(thr_user_data=0x91fdd20) at tny-camel-folder.c:1954
#13 0x40a024d8 in tny_camel_queue_thread_main_func
(user_data=0x922dce0) at tny-camel-queue.c:224
#14 0x408e179f in g_thread_create_proxy () from /lib/libglib-2.0.so.0
#15 0x4002e112 in start_thread () from /lib/libpthread.so.0
#16 0x40ce32ee in clone () from /lib/libc.so.6
(gdb) c
Continuing.

Breakpoint 3, tny_camel_folder_refresh_async_status (op=0x42f207b0,
    what=0x431e8600 "Fetching summary information for new messages in
folder", sofar=1028, oftotal=18084,
    thr_user_data=0x91fdd20) at tny-camel-folder.c:1911
1911    in tny-camel-folder.c
(gdb) where
#0  tny_camel_folder_refresh_async_status (op=0x42f207b0,
    what=0x431e8600 "Fetching summary information for new messages in
folder", sofar=1028, oftotal=18084,
    thr_user_data=0x91fdd20) at tny-camel-folder.c:1911
#1  0x40f1cfa1 in camel_operation_progress (cc=0x42f207b0, sofar=1028,
oftotal=18084) at camel-operation.c:605
#2  0x42697e0f in imap_update_summary (folder=0x9252088, exists=18084,
changes=0x98039b0, ex=0x428b632c)
    at camel-imap-folder.c:3586
#3  0x42699cc9 in camel_imap_folder_changed (folder=0x9252088,
exists=18084, expunged=0x0, ex=0x428b632c)
    at camel-imap-folder.c:4464
#4  0x42692472 in imap_rescan (folder=0x9252088, exists=18084,
ex=0x428b632c) at camel-imap-folder.c:1267
#5  0x426916db in camel_imap_folder_selected (folder=0x9252088,
response=0x430f9368, ex=0x428b632c, idle=1)
    at camel-imap-folder.c:780
#6  0x42691dd5 in imap_refresh_info (folder=0x9252088, ex=0x428b632c)
at camel-imap-folder.c:963
#7  0x40eba16a in disco_refresh_info (folder=0x9252088, ex=0x428b632c)
at camel-disco-folder.c:268
#8  0x40ecccdf in camel_folder_refresh_info (folder=0x9252088,
ex=0x428b632c) at camel-folder.c:409
#9  0x409e41db in tny_camel_folder_refresh_async_thread
(thr_user_data=0x91fdd20) at tny-camel-folder.c:1954
#10 0x40a024d8 in tny_camel_queue_thread_main_func
(user_data=0x922dce0) at tny-camel-queue.c:224
#11 0x408e179f in g_thread_create_proxy () from /lib/libglib-2.0.so.0
#12 0x4002e112 in start_thread () from /lib/libpthread.so.0
#13 0x40ce32ee in clone () from /lib/libc.so.6

Regards,

-- 
Martin

>
> So, IMHO we should revert that change.
>
> Br
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
>


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