summaryrefslogtreecommitdiffstats
path: root/plugins/ommongodb/ommongodb.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-09-25 15:21:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-25 15:21:30 +0200
commit9edcc0b6b286b2e0223d32fd7fd6bd66a405f2eb (patch)
treef26cc7c18ec628e0bf2e3273d584c23706da09fa /plugins/ommongodb/ommongodb.c
parent2c23afa623ce0dd8ddb17b1d11bd2962589b0eb9 (diff)
parentd397bb25265b8b0926af050c4187cfbc5ab074ca (diff)
downloadrsyslog-9edcc0b6b286b2e0223d32fd7fd6bd66a405f2eb.tar.gz
rsyslog-9edcc0b6b286b2e0223d32fd7fd6bd66a405f2eb.tar.bz2
rsyslog-9edcc0b6b286b2e0223d32fd7fd6bd66a405f2eb.zip
Merge branch 'master' into master-newruleset
Conflicts: runtime/modules.c
Diffstat (limited to 'plugins/ommongodb/ommongodb.c')
-rw-r--r--plugins/ommongodb/ommongodb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ommongodb/ommongodb.c b/plugins/ommongodb/ommongodb.c
index c1648c50..2c65f275 100644
--- a/plugins/ommongodb/ommongodb.c
+++ b/plugins/ommongodb/ommongodb.c
@@ -296,7 +296,9 @@ static bson *BSONFromJSONObject(struct json_object *json);
static gboolean
BSONAppendJSONObject(bson *doc, const gchar *name, struct json_object *json)
{
- switch(json_object_get_type(json)) {
+ switch(json != NULL ? json_object_get_type(json) : json_type_null) {
+ case json_type_null:
+ return bson_append_null(doc, name);
case json_type_boolean:
return bson_append_boolean(doc, name,
json_object_get_boolean(json));