Use the private method instead of direct C syscall.
[apps/agl-service-can-low-level.git] / 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());