Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
socket: Raise an error if open function failed.
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
utils
/
socketcan-j1939
/
socketcan-j1939.cpp
diff --git
a/low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp
b/low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp
index
5cc96ed
..
000999f
100644
(file)
--- a/
low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp
+++ b/
low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp
@@
-169,6
+169,8
@@
namespace utils
{
socket_ = socketcan_t::open(PF_CAN, SOCK_DGRAM, CAN_J1939);
+ if (socket_ < 0)
+ return socket_;
define_tx_address(device_name, name, pgn, addr);