X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fbinding%2Flow-can-subscription.cpp;h=05367b79c56ee6050f76990ebcf73418cd0f2d0b;hb=28340674704f385c916e528f66e368b10fad31d8;hp=2cb5bafbc4f9fbcb32d6fb12a41f7ee69cb185a5;hpb=db13354c18e888d04b776e584addb668d8614da4;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp index 2cb5bafb..05367b79 100644 --- a/low-can-binding/binding/low-can-subscription.cpp +++ b/low-can-binding/binding/low-can-subscription.cpp @@ -364,7 +364,7 @@ int low_can_subscription_t::open_socket(low_can_subscription_t &subscription, co int ret = -1; if(! subscription.socket_) { - if(flags & BCM_PROTOCOL) + if(flags & CAN_PROTOCOL) { subscription.socket_ = std::make_shared(); if( subscription.signal_ ) @@ -420,7 +420,7 @@ int low_can_subscription_t::open_socket(low_can_subscription_t &subscription, co else if(flags & J1939_PROTOCOL) { pgn_t pgn = J1939_NO_PGN; - if(subscription.signal_ != nullptr) + if(subscription.signal_) { pgn = subscription.signal_->get_message()->get_id(); std::shared_ptr socket = std::make_shared(); @@ -666,7 +666,7 @@ int low_can_subscription_t::create_rx_filter(std::shared_ptr cfd_vect = cm->convert_to_canfd_frame_vector(); - if(subscription.open_socket(subscription, bus_name, BCM_PROTOCOL) < 0) + if(subscription.open_socket(subscription, bus_name, CAN_PROTOCOL) < 0) return -1; struct bcm_msg &bcm_cm = cm->get_bcm_msg();