Re: [Evolution-hackers] NNTP patch



Not Zed wrote:

First, a small logic error in the code:

static CamelFolderInfo *
nntp_get_folder_info_online(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
{
	return nntp_get_folder_info(store, top, flags, TRUE, ex);
}


was passing FALSE instead of TRUE.

Hmm...  you're right.

Now it just crashes with this when i try to subscribe to folders after getting the result of newgroups:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16386 (LWP 4760)]
0x412443a8 in strcmp () from /lib/i686/libc.so.6
(gdb) where
#0  0x412443a8 in strcmp () from /lib/i686/libc.so.6
#1  0x4199d0f4 in store_info_sort (a=0x42358a30, b=0x2) at camel-nntp-store.c:556
#2  0x411f50c5 in msort_with_tmp () from /lib/i686/libc.so.6
#3  0x411f4f94 in msort_with_tmp () from /lib/i686/libc.so.6
#4  0x411f4f94 in msort_with_tmp () from /lib/i686/libc.so.6
#5  0x411f5260 in qsort () from /lib/i686/libc.so.6
#6  0x41175c33 in g_ptr_array_sort () from /usr/lib/libglib-2.0.so.0
#7  0x4199d405 in nntp_store_get_folder_info_all (nntp_store=0x86a8b70, top=0x418a4e80 "", flags=1, online=1, ex=0x89c80b8) at camel-nntp-store.c:627
(...)
Seems to be because I dont have an existing valid folder list its using. Try doing rm -rf ~/.evolution/mail/nntp for your testing of initial startup.

Allright, I fixed this. So much for untested last-minute changes...

Also if i get a timeout or something (for some reason it wants to time out after 10 seconds) things get really messy - lockups and whatnot.

Hmm... I can't see what this causes directly. Will look at it though.

Could you see if you can reproduce these problems and try and fix them and submit another patch please?

New patches:

   * home.wanadoo.nl/meilof/evolution-nntp-patch-11 - complete
   * home.wanadoo.nl/meilof/evolution-nntp-patch-10to11 - incremental

Oh one quick thing i've noticed you haven't implemented, the various events on the store, to announce new folders and so on, i.e.

folder_created
- is needed if new folders come online
folder_deleted
- if a folder that did exist no longer does (maybe not needed for news)
folder_renamed
- wont be needed for nntp
folder_subscribed
- when a folder is subscribed to
folder_unsubscribed
- ditto for unsubscribing

These are needed for the folder list to update properly as the program runs, particularly the last two.

I do

camel_object_trigger_event (CAMEL_OBJECT (nntp_store), "folder_subscribed", fi); camel_object_trigger_event (CAMEL_OBJECT (nntp_store), "folder_unsubscribed", fi);

in the "subscribe_folder" and "unsubscribe_folder" code, and I did stubs create_folder, delete_folder and rename_folder that just set a CamelException so folders never get created, deleted or renamed.

Are there more places I should use events then?



Meilof
-- meilof wanadoo nl




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