diff options
author | Pavel Levshin <pavel@levshin.spb.ru> | 2013-10-26 14:57:37 +0400 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-26 15:40:50 +0200 |
commit | 200b43431695d3d4cccadafb2a37373fc55af0bb (patch) | |
tree | 41323f68704d85d14f042e04cce62f2009d17a88 /plugins/ommongodb/ommongodb.c | |
parent | a000bd661e0459524bd146a803e17df813350d92 (diff) | |
download | rsyslog-200b43431695d3d4cccadafb2a37373fc55af0bb.tar.gz rsyslog-200b43431695d3d4cccadafb2a37373fc55af0bb.tar.bz2 rsyslog-200b43431695d3d4cccadafb2a37373fc55af0bb.zip |
Make use of int64 json numbers, if available
Diffstat (limited to 'plugins/ommongodb/ommongodb.c')
-rw-r--r-- | plugins/ommongodb/ommongodb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/ommongodb/ommongodb.c b/plugins/ommongodb/ommongodb.c index ecfd2518..a7c42010 100644 --- a/plugins/ommongodb/ommongodb.c +++ b/plugins/ommongodb/ommongodb.c @@ -311,8 +311,11 @@ BSONAppendJSONObject(bson *doc, const gchar *name, struct json_object *json) case json_type_int: { int64_t i; - /* FIXME: the future version will have get_int64 */ +#ifdef HAVE_JSON_OBJECT_NEW_INT64 + i = json_object_get_int64(json); +#else /* HAVE_JSON_OBJECT_NEW_INT64 */ i = json_object_get_int(json); +#endif /* HAVE_JSON_OBJECT_NEW_INT64 */ if (i >= INT32_MIN && i <= INT32_MAX) return bson_append_int32(doc, name, i); else |