aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-summary.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@src.gnome.org>2000-04-15 04:29:33 +0800
committerChris Toshok <toshok@src.gnome.org>2000-04-15 04:29:33 +0800
commit239523998456f6e7b5a5c516c5f40870d9960fb1 (patch)
tree618bf59bb2ea2479949421882a48c30ff0d9f5bf /camel/providers/nntp/camel-nntp-summary.c
parentd870ec752c2ae51843e5b8f07cef39ff619f75d7 (diff)
downloadgsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.tar
gsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.tar.gz
gsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.tar.bz2
gsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.tar.lz
gsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.tar.xz
gsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.tar.zst
gsoc2013-evolution-239523998456f6e7b5a5c516c5f40870d9960fb1.zip
okay. working now.
svn path=/trunk/; revision=2432
Diffstat (limited to 'camel/providers/nntp/camel-nntp-summary.c')
-rw-r--r--camel/providers/nntp/camel-nntp-summary.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index 079c1dddab..174cceb4cb 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -243,6 +243,17 @@ camel_nntp_summary_save (CamelNNTPSummary *summary, const gchar *filename,
write (fd, &data, sizeof (data));
if (msg_info->headers.received_date)
write (fd, msg_info->headers.received_date, field_length);
+
+ /* Write uid date. */
+ if (msg_info->headers.uid)
+ field_length = strlen (msg_info->headers.uid);
+ else
+ field_length = 0;
+ data = htonl (field_length);
+ write (fd, &data, sizeof (data));
+ if (msg_info->headers.uid)
+ write (fd, msg_info->headers.uid, field_length);
+
}
close (fd);
@@ -357,6 +368,17 @@ camel_nntp_summary_load (const gchar *newsgroup, const gchar *filename, CamelExc
field_length);
} else
msg_info->headers.received_date = NULL;
+
+ /* Read the uid field. */
+ read (fd, &field_length, sizeof (field_length));
+ field_length = ntohl (field_length);
+ if (field_length > 0) {
+ msg_info->headers.uid =
+ g_new0 (gchar, field_length + 1);
+ read (fd, msg_info->headers.uid,
+ field_length);
+ } else
+ msg_info->headers.uid = NULL;
}
close (fd);