diff options
Diffstat (limited to 'src/can_event_push.cpp')
-rw-r--r-- | src/can_event_push.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/can_event_push.cpp b/src/can_event_push.cpp index 703a242c..2842c630 100644 --- a/src/can_event_push.cpp +++ b/src/can_event_push.cpp @@ -22,6 +22,7 @@ void can_event_push(can_bus_t& can_bus) { openxc_VehicleMessage v_message; openxc_SimpleMessage s_message; + json_object* jo; while(can_bus.has_vehicle_message()) { @@ -30,6 +31,10 @@ void can_event_push(can_bus_t& can_bus) std::map<std::string, struct afb_event> subscribed_signals = get_subscribed_signals(); const auto& it_event = subscribed_signals.find(s_message.name); if(it_event != subscribed_signals.end() && afb_event_is_valid(it_event->second)) - afb_event_push(it_event->second, jsonify_simple(s_message)); + { + jo = json_object_new_object(); + jsonify_simple(s_message, jo); + afb_event_push(it_event->second, jo); + } } -} +}
\ No newline at end of file |