From 566b5183cbc2a52960c4411a74037c5559844bc2 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 15 Apr 2000 00:46:30 +0000 Subject: always return TRUE for now. we need to check the server response to make * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE for now. we need to check the server response to make sure the group exists. (_get_message_by_uid): make sure to account for the \n we add to the string after every line. * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function to get the headers using the XOVER command. (get_HEAD_headers): function to get the headers using the HEAD command on each message. slooooooow. (camel_nntp_get_headers): make this function use either XOVER or HEAD versions depending on whether or not the server extension is present. svn path=/trunk/; revision=2445 --- camel/providers/nntp/camel-nntp-folder.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'camel/providers/nntp/camel-nntp-folder.c') diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c index 7c3e2063b1..00d0bcc902 100644 --- a/camel/providers/nntp/camel-nntp-folder.c +++ b/camel/providers/nntp/camel-nntp-folder.c @@ -252,6 +252,9 @@ _check_get_or_maybe_generate_summary_file (CamelNNTPFolder *nntp_folder, summ->nb_message = summ->message_info->len; folder->summary = CAMEL_FOLDER_SUMMARY (summ); + + camel_nntp_summary_save (summ, + nntp_folder->summary_file_path, ex); } } @@ -322,6 +325,7 @@ _set_name (CamelFolder *folder, const gchar *name, CamelException *ex) static gboolean _exists (CamelFolder *folder, CamelException *ex) { +#if 0 CamelNNTPFolder *nntp_folder; struct stat stat_buf; gint stat_error; @@ -351,6 +355,8 @@ _exists (CamelFolder *folder, CamelException *ex) CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::exists\n"); return exists; +#endif + return TRUE; } @@ -386,6 +392,7 @@ _create (CamelFolder *folder, CamelException *ex) static gboolean _delete (CamelFolder *folder, gboolean recurse, CamelException *ex) { +#if 0 gboolean folder_already_exists; g_assert(folder != NULL); @@ -406,7 +413,7 @@ _delete (CamelFolder *folder, gboolean recurse, CamelException *ex) It should delete the messages in the folder and recurse the operation to subfolders */ parent_class->delete (folder, recurse, ex); - +#endif return TRUE; } @@ -683,7 +690,7 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex) char *line = camel_stream_buffer_read_line ( CAMEL_STREAM_BUFFER ( nntp_istream )); int line_length = strlen ( line ); - if (*line == '.') { + if (!strcmp(line, ".")) { done = TRUE; g_free (line); } @@ -694,7 +701,7 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex) } strcat(buf, line); strcat(buf, "\n"); - buf_len += strlen(line); + buf_len += strlen(line) + 1; g_free (line); } } -- cgit