Fix JSON build errors
Updated module_json.c to use field_t.value as a union, not as a pointer.
This commit is contained in:
parent
6cf931b541
commit
45918feced
@ -149,13 +149,13 @@ int json_output_file_ip(fieldset_t *fs)
|
||||
field_t *f = &(fs->fields[i]);
|
||||
if (f->type == FS_STRING) {
|
||||
json_object_object_add(obj, f->name,
|
||||
json_object_new_string((char*) f->value));
|
||||
json_object_new_string((char *) f->value.ptr));
|
||||
} else if (f->type == FS_UINT64) {
|
||||
json_object_object_add(obj, f->name,
|
||||
json_object_new_int((int) f->value));
|
||||
json_object_new_int((int) f->value.num));
|
||||
} else if (f->type == FS_BINARY) {
|
||||
json_output_file_store_data(obj,
|
||||
(const u_char*) f->value, f->len);
|
||||
(const u_char*) f->value.ptr, f->len);
|
||||
} else if (f->type == FS_NULL) {
|
||||
// do nothing
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user