X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Flow-can-binding.cpp;h=4420b0d4f8ddc7cf917bb821ca2cf6d31dd368cf;hb=934aa942359fc222981feacca053b312f239664d;hp=d6e19441dd1be1f9b9a756ba16f24e23866d3202;hpb=118c1d1edead3dabf0867125027281ccb776b9a3;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 d6e1944..4420b0d 100644 --- a/CAN-binder/low-can-binding/low-can-binding.cpp +++ b/CAN-binder/low-can-binding/low-can-binding.cpp @@ -124,12 +124,11 @@ static int subscribe_unsubscribe_signal(struct afb_req request, bool subscribe, } /// -/// @fn static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, const std::vector& signals) /// @brief subscribe to all signals in the vector signals /// /// @param[in] afb_req request : contain original request use to subscribe or unsubscribe /// @param[in] subscribe boolean value used to chose between a subscription operation or an unsubscription -/// @param[in] can_signal_t vector with can_signal_t to subscribe +/// @param[in] signals - struct containing vectors with can_signal_t and diagnostic_messages to subscribe /// /// @return Number of correctly subscribed signal /// @@ -145,7 +144,7 @@ static int subscribe_unsubscribe_signals(struct afb_req request, bool subscribe, { DiagnosticRequest* diag_req = conf.get_request_from_diagnostic_message(sig->get_name()); - // If the requested diagnostic message isn't supported by the car then unssubcribe. + // If the requested diagnostic message isn't supported by the car then unsubcribe it // no matter what we want, worse case will be a fail unsubscription but at least we don't // poll a PID for nothing. if(sig->get_supported() && subscribe) @@ -217,8 +216,9 @@ extern "C" std::vector signals; struct utils::signals_found sf; int ok = 0, total = 0; + bool subscribe = true; - signals = parse_signals_from_request(request, true); + signals = parse_signals_from_request(request, subscribe); for(const auto& sig: signals) {