summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--low-can-binding/binding/low-can-cb.cpp2
-rw-r--r--low-can-binding/binding/low-can-subscription.cpp3
-rw-r--r--low-can-binding/binding/low-can-subscription.hpp3
3 files changed, 5 insertions, 3 deletions
diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp
index ab6210bf..b6a18ebb 100644
--- a/low-can-binding/binding/low-can-cb.cpp
+++ b/low-can-binding/binding/low-can-cb.cpp
@@ -478,7 +478,7 @@ static int send_frame(struct canfd_frame& cfd, const std::string& bus_name)
if( cd.count(bus_name) == 0)
{cd[bus_name] = std::make_shared<low_can_subscription_t>(low_can_subscription_t());}
- return cd[bus_name]->tx_send(*cd[bus_name], cfd, bus_name);
+ return low_can_subscription_t::tx_send(*cd[bus_name], cfd, bus_name);
}
static void write_raw_frame(afb_req_t request, const std::string& bus_name, json_object *json_value)
diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp
index eb3f6c37..54cd314c 100644
--- a/low-can-binding/binding/low-can-subscription.cpp
+++ b/low-can-binding/binding/low-can-subscription.cpp
@@ -54,7 +54,8 @@ low_can_subscription_t& low_can_subscription_t::operator=(const low_can_subscrip
low_can_subscription_t::~low_can_subscription_t()
{
- socket_->close();
+ if(socket_)
+ socket_->close();
}
low_can_subscription_t::operator bool() const
diff --git a/low-can-binding/binding/low-can-subscription.hpp b/low-can-binding/binding/low-can-subscription.hpp
index 691eb881..61c354d1 100644
--- a/low-can-binding/binding/low-can-subscription.hpp
+++ b/low-can-binding/binding/low-can-subscription.hpp
@@ -23,7 +23,8 @@
#include "../can/signals.hpp"
#include "../diagnostic/diagnostic-message.hpp"
-#include "../utils/socketcan-bcm.hpp"
+#include "../utils/socketcan.hpp"
+
#define OBDII_MAX_SIMULTANEOUS_RESPONSES 8