aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-folder.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-04-15 08:46:30 +0800
committerChris Toshok <toshok@src.gnome.org>2000-04-15 08:46:30 +0800
commit566b5183cbc2a52960c4411a74037c5559844bc2 (patch)
treef2a17604774fd74c237f0e6918b64dd12d729cce /camel/providers/nntp/camel-nntp-folder.c
parent82e77d6d8e73f418ae75d975324dbfa59218c4cd (diff)
downloadgsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.tar
gsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.tar.gz
gsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.tar.bz2
gsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.tar.lz
gsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.tar.xz
gsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.tar.zst
gsoc2013-evolution-566b5183cbc2a52960c4411a74037c5559844bc2.zip
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
Diffstat (limited to 'camel/providers/nntp/camel-nntp-folder.c')
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c13
1 files changed, 10 insertions, 3 deletions
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);
}
}