[evolution-data-server/gnome-2-30] Make camel_imapx_stream_number() return a guint64
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-30] Make camel_imapx_stream_number() return a guint64
- Date: Mon, 28 Jun 2010 19:35:37 +0000 (UTC)
commit d35d4628658b0c631a46943a489b70617463aace
Author: David Woodhouse <David Woodhouse intel com>
Date: Fri Jun 18 11:29:29 2010 +0100
Make camel_imapx_stream_number() return a guint64
Some fields like UIDVALIDITY and MODSEQ may well be larger than can fit in
a 32-bit value. RFC4551 makes this abundantly clear in its examples.
(cherry picked from commit a6123e8d8098235702d4eed355286cd9154a0736)
camel/providers/imapx/camel-imapx-stream.c | 4 ++--
camel/providers/imapx/camel-imapx-stream.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/providers/imapx/camel-imapx-stream.c
index ac8cb64..2cb68ca 100644
--- a/camel/providers/imapx/camel-imapx-stream.c
+++ b/camel/providers/imapx/camel-imapx-stream.c
@@ -404,7 +404,7 @@ camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, Ca
return ret;
}
-guint32
+guint64
camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex)
{
guchar *token;
@@ -415,7 +415,7 @@ camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex)
return 0;
}
- return strtoul((gchar *)token, 0, 10);
+ return strtoull((gchar *)token, 0, 10);
}
gint
diff --git a/camel/providers/imapx/camel-imapx-stream.h b/camel/providers/imapx/camel-imapx-stream.h
index 174c2cf..27138c2 100644
--- a/camel/providers/imapx/camel-imapx-stream.h
+++ b/camel/providers/imapx/camel-imapx-stream.h
@@ -87,7 +87,8 @@ gint camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **str
gint camel_imapx_stream_text (CamelIMAPXStream *is, guchar **text, CamelException *ex);
/* gets a 'number' */
-guint32 camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex);
+guint64 camel_imapx_stream_number (CamelIMAPXStream *is,
+ CamelException *ex);
/* skips the rest of a line, including literals, etc */
gint camel_imapx_stream_skip(CamelIMAPXStream *is, CamelException *ex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]