Re: [Evolution-hackers] NNTP patch




Hi Meilof,

Thanks for the work so far, its looking good.  Except I haven't been able to test it very well, and had to do some digging to get anything out of it.

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.

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,  ex=0x89c80b8) at camel-nntp-store.c:627
#8  0x4199d540 in nntp_get_folder_info (store=0x86a8b70, top=0x418a4e80 "", flags=1,  ex=0x89c80b8) at camel-nntp-store.c:656
#9  0x4199d58a in nntp_get_folder_info_online (store=0x86a8b70, top=0x418a4e80 "", flags=1, ex=0x89c80b8) at camel-nntp-store.c:666
#10 0x418e4140 in disco_get_folder_info (store=0x86a8b70, top=0x418a4e80 "", flags=1, ex=0x89c80b8) at camel-disco-store.c:251
#11 0x4192ca46 in camel_store_get_folder_info (store=0x86a8b70, top=0x418a4e80 "", flags=1, ex=0x89c80b8) at camel-store.c:786
#12 0x418449e0 in sub_folderinfo_get (mm=0x89c80a0) at em-subscribe-editor.c:341
#13 0x4185985c in mail_msg_received (e=0x80ed258, msg=0x89c80a0, data="" at mail-mt.c:506
#14 0x40080a98 in thread_received_msg (e=0x80ed258, m=0x89c80a0) at e-msgport.c:617
#15 0x40080c7c in thread_dispatch (din=0x80ed258) at e-msgport.c:698
#16 0x41088a21 in pthread_start_thread () from /lib/i686/libpthread.so.0
#17 0x41088b25 in pthread_start_thread_event () from /lib/i686/libpthread.so.0
(gdb) The program is running.  Exit anyway? (y or n) y

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.

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.

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

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.

Thanks,
Michael


On Sun, 2004-01-04 at 18:14 -0500, Meilof wrote:
Hello,


I just hope it is still on time, but I have completed NNTP support for 
Evolution. It does reading, subscribing, replying and posting (also 
cross-posting to mail) so I think it is pretty complete.

Given the stage of the patch and that the mail team was awayt for 3 weeks, i'm sure we can bend the rules a little bit if it doesn't quite make it on time.

I have submitted the patch to the bug page for the NNTP bounty at 
http://bugzilla.gnome.org/show_bug.cgi?id=127519, and it can also be 
downloaded from my website:

    * http://home.wanadoo.nl/meilof/evolution-nntp-patch-10
    * http://home.wanadoo.nl/meilof/evolution-nntp-patch-10.html

The second one is an annotated version of the patch with some of my 
comments.

Please let me know about any improvements this patch needs.


Meilof
 -- meilof wanadoo nl

_______________________________________________
evolution-hackers maillist  -  evolution-hackers lists ximian com
http://lists.ximian.com/mailman/listinfo/evolution-hackers


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