Use the private method instead of direct C syscall.
authorRomain Forlot <romain.forlot@iot.bzh>
Wed, 3 May 2017 11:29:07 +0000 (13:29 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Wed, 3 May 2017 11:29:07 +0000 (13:29 +0200)
Change-Id: I1c0e04e38fec92dee167720c3128a7493d4cf9b2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/low-can-binding/utils/socketcan.cpp

index 841c7ba..0f2e01f 100644 (file)
@@ -113,7 +113,7 @@ namespace utils
                close();
                
                struct ifreq ifr;
-               socket_ = ::socket(PF_CAN, SOCK_DGRAM, CAN_BCM);
+               socket_ = open(PF_CAN, SOCK_DGRAM, CAN_BCM);
 
                // Attempts to open a socket to CAN bus
                ::strcpy(ifr.ifr_name, device_name.c_str());