X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Futils%2Fsocketcan.cpp;h=e8e01980789c005965084dfcffe520af6f96600f;hb=fe780799e8117ac30f9c05bcd43616638f35e66a;hp=d72f108d612c18d03a108730feca64d7de148193;hpb=2e10ab5760e5d2a6abab7acf47f781442308362f;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/utils/socketcan.cpp b/low-can-binding/utils/socketcan.cpp index d72f108d..e8e01980 100644 --- a/low-can-binding/utils/socketcan.cpp +++ b/low-can-binding/utils/socketcan.cpp @@ -73,6 +73,9 @@ namespace utils { close(); socket_ = ::socket(domain, type, protocol); + if (socket_ < 0) + AFB_ERROR("Open failed. %s", strerror(errno)); + return socket_; } @@ -117,7 +120,7 @@ namespace utils { if(write_message(vobj[i])<0) { - AFB_ERROR("Error send message %d",i); + AFB_ERROR("Error send message %d", i); return -1; } }