these are the current incarnation of the mods I have made to camel.
diff is relative to cvs head.
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.959
diff -r1.959 ChangeLog
0a1,21
> 2001-06-13 Sam Creasey <[EMAIL PROTECTED]>
>
> * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
> Always check with the NNTP server after summary load -- this
> function now always expires old summary entries and syncs with
> the news server.
>
> * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
> Only fetch headers for articles not already logged in
> the summary file.
>
> * providers/nntp/camel-nntp-grouplist.c
> (camel_nntp_get_grouplist_from_*): change from g_list_append()
> to g_list_prepend() + g_list_reverse. Traversing 40,000
> element linked lists sucks.
>
> * providers/nntp/camel-nntp-store.c (camel_nntp_command):
> Should the NNTP connection die with
> CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
> attempt. Timing out the NNTP link is less painful this way.
>
Index: camel/providers/nntp/camel-nntp-auth.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/nntp/camel-nntp-auth.c,v
retrieving revision 1.5
diff -r1.5 camel-nntp-auth.c
48,50c48,49
< camel_session_query_authenticator (session,
< CAMEL_AUTHENTICATOR_ASK,
prompt,
< TRUE, service, "password",
ex);
---
> camel_session_get_password (session, prompt,
> TRUE, service, "password", ex);
Index: camel/providers/nntp/camel-nntp-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/nntp/camel-nntp-folder.c,v
retrieving revision 1.30
diff -r1.30 camel-nntp-folder.c
251,261c251,257
< if (-1 == camel_folder_summary_load (folder->summary)) {
< /* Bad or nonexistant summary file */
< camel_nntp_get_headers (CAMEL_FOLDER( folder )->parent_store,
< nntp_folder, ex);
< if (camel_exception_get_id (ex)) {
< camel_object_unref (CAMEL_OBJECT (folder));
< return NULL;
< }
<
< /* XXX check return value */
< camel_folder_summary_save (folder->summary);
---
> camel_folder_summary_load (folder->summary);
>
> camel_nntp_get_headers (CAMEL_FOLDER( folder )->parent_store,
> nntp_folder, ex);
> if (camel_exception_get_id (ex)) {
> camel_object_unref (CAMEL_OBJECT (folder));
> return NULL;
263a260,262
> /* XXX check return value */
> camel_folder_summary_save (folder->summary);
>
Index: camel/providers/nntp/camel-nntp-grouplist.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/nntp/camel-nntp-grouplist.c,v
retrieving revision 1.5
diff -r1.5 camel-nntp-grouplist.c
55c55,56
< if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &line,
ex) < 0)
---
> if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &line,
>ex) < 0) {
> list->group_list = g_list_reverse(list->group_list);
56a58
> }
71c73
< list->group_list = g_list_append (list->group_list, entry);
---
> list->group_list = g_list_prepend (list->group_list, entry);
74a77
> list->group_list = g_list_reverse(list->group_list);
126c129
< list->group_list = g_list_append (list->group_list, entry);
---
> list->group_list = g_list_prepend (list->group_list, entry);
130a134
> list->group_list = g_list_reverse(list->group_list);
Index: camel/providers/nntp/camel-nntp-newsrc.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/nntp/camel-nntp-newsrc.c,v
retrieving revision 1.9
diff -r1.9 camel-nntp-newsrc.c
228d227
< NEWSRC_LOCK(newsrc, lock);
230d228
< NEWSRC_UNLOCK(newsrc, lock);
477c475,476
< if (!newsrc->dirty)
---
> if (!newsrc->dirty) {
> NEWSRC_UNLOCK(newsrc, lock);
478a478
> }
Index: camel/providers/nntp/camel-nntp-store.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/nntp/camel-nntp-store.c,v
retrieving revision 1.42
diff -r1.42 camel-nntp-store.c
301c301
< nntp_store_query_auth_types (CamelService *service, gboolean connect, CamelException
*ex)
---
> nntp_store_query_auth_types (CamelService *service, CamelException *ex)
471,472c471
< gboolean fast, gboolean recursive,
< gboolean subscribed_only,
---
> guint32 flags,
494c493
< if (!subscribed_only) {
---
> if (!(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)) {
717a717,726
>
> if(camel_exception_get_id(ex) ==
> CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED) {
> /* the connect might have timed out, give it another shot.. */
> camel_exception_clear(ex);
> if(nntp_store_connect(CAMEL_SERVICE(store), ex))
> resp_code =
> camel_nntp_command_send_recv (store, ex, ret, cmdbuf);
> /* that's it, no more tries */
> }
Index: camel/providers/nntp/camel-nntp-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/nntp/camel-nntp-utils.c,v
retrieving revision 1.16
diff -r1.16 camel-nntp-utils.c
67c67
< CamelMessageInfo *new_info =
camel_folder_summary_info_new(nntp_folder->summary);
---
> CamelMessageInfo *new_info =
>camel_folder_summary_info_new(folder->summary);
77c77
<
---
>
112c112
< camel_folder_summary_add (nntp_folder->summary,
new_info);
---
> camel_folder_summary_add (folder->summary, new_info);
219a220,246
> static inline int
> uid_num (CamelFolderSummary *summary, int index)
> {
> char *tmp;
> char *brk;
> CamelMessageInfo *minfo;
> int ret;
>
> minfo = camel_folder_summary_index(summary, index);
> if(minfo == NULL)
> return 0;
>
> tmp = g_strdup(camel_message_info_uid(minfo));
> camel_message_info_free(minfo);
>
> if((brk = strchr(tmp, ',')) == NULL)
> ret = 0;
> else {
> *brk = 0;
> ret = atoi(tmp);
> }
>
> g_free(tmp);
>
> return ret;
> }
>
228c255
< int first_message, nb_message, last_message;
---
> int first_message, nb_message, last_message, last_summary;
229a257
> int i;
233d260
<
236a264,280
> i = camel_folder_summary_count(folder->summary);
> if(i != 0) {
> last_summary = uid_num(folder->summary, i-1);
>
> if(last_summary < first_message)
> camel_folder_summary_clear(folder->summary);
> else {
> while(uid_num(folder->summary, 0) < first_message)
> camel_folder_summary_remove_index(folder->summary, 0);
>
> if(last_summary >= last_message)
> return;
>
> first_message = last_summary;
> }
> }
>
255a300
>