summaryrefslogtreecommitdiffstats
path: root/src/cfg_xml.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-28 14:53:58 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-28 14:53:58 +0400
commit54e84de2f56dd7d8b04627e2c13bad123832ed81 (patch)
tree3837d86eb89a5a63a2b421dc270c7e044086d1bc /src/cfg_xml.c
parente389ab727d6eb1024567c2629150a72fc26fb7ef (diff)
downloadrspamd-54e84de2f56dd7d8b04627e2c13bad123832ed81.tar.gz
rspamd-54e84de2f56dd7d8b04627e2c13bad123832ed81.zip
Parse big limits on 32 bits machine (for file sizes).
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r--src/cfg_xml.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index 8ecd7a986..ea0685ca4 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -1507,11 +1507,23 @@ xml_handle_size (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GHash
gsize *dest;
dest = (gsize *)G_STRUCT_MEMBER_P (dest_struct, offset);
- *dest = parse_limit (data, -1);
+ *dest = (gsize)parse_limit (data, -1);
return TRUE;
}
+/* Guint64 variant */
+gboolean
+xml_handle_size_64 (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GHashTable *attrs, gchar *data, gpointer user_data, gpointer dest_struct, gint offset)
+{
+ guint64 *dest;
+
+ dest = (guint64 *)G_STRUCT_MEMBER_P (dest_struct, offset);
+ *dest = parse_limit (data, -1);
+
+ return TRUE;
+}
+
gboolean
xml_handle_seconds (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GHashTable *attrs, gchar *data, gpointer user_data, gpointer dest_struct, gint offset)
{