diff options
Diffstat (limited to 'low-can-binding/binding/low-can-subscription.cpp')
-rw-r--r-- | low-can-binding/binding/low-can-subscription.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp index 54cd314c..c2f31a03 100644 --- a/low-can-binding/binding/low-can-subscription.cpp +++ b/low-can-binding/binding/low-can-subscription.cpp @@ -248,14 +248,14 @@ int low_can_subscription_t::open_socket(low_can_subscription_t &subscription, co std::shared_ptr<utils::socketcan_j1939_t> socket = std::make_shared<utils::socketcan_j1939_t>(); ret = socket->open(subscription.signal_->get_message()->get_bus_device_name(), name, pgn, addr); subscription.socket_ = socket; - } - else if ( !bus_name.empty()) - { + } + else if ( !bus_name.empty()) + { std::shared_ptr<utils::socketcan_j1939_t> socket = std::make_shared<utils::socketcan_j1939_t>(); ret = socket->open(bus_name, name, pgn, addr); subscription.socket_ = socket; - } - subscription.index_ = (int)subscription.socket_->socket(); + } + subscription.index_ = (int)subscription.socket_->socket(); } else { |