X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Flow-can-binding.cpp;h=e6af92cc0f7c2dd3ba75b47e80fd44ff66afd1f5;hb=f741d262ecd237121cc8cceb0f0893daa70bdf32;hp=088b76fbb347b8ffa0a0da5a42c22adaa20de2bd;hpb=14043c56960ced9141ef107c66a6a041a75f6cb3;p=apps%2Flow-level-can-service.git diff --git a/CAN-binder/low-can-binding/low-can-binding.cpp b/CAN-binder/low-can-binding/low-can-binding.cpp index 088b76f..e6af92c 100644 --- a/CAN-binder/low-can-binding/low-can-binding.cpp +++ b/CAN-binder/low-can-binding/low-can-binding.cpp @@ -172,16 +172,18 @@ static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, for(const auto& sig: signals.can_signals) { - ret = subscribe_unsubscribe_signal(request, subscribe, sig->get_name()); - if(ret <= 0) - return ret; - rets++; - DEBUG(binder_interface, "%s: signal: %s subscribed", __FUNCTION__, sig->get_name().c_str()); + if(conf.get_can_bus_manager().create_rx_filter(*sig) <= 0 && + subscribe_unsubscribe_signal(request, subscribe, sig->get_name()) <= 0) + { + return -1; + rets++; + DEBUG(binder_interface, "%s: signal: %s subscribed", __FUNCTION__, sig->get_name().c_str()); + } } return rets; } -static const std::vector parse_signals_from_request(struct afb_req request, bool subscribe) +static const std::vector parse_args_from_request(struct afb_req request, bool subscribe) { int i, n; std::vector ret;