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
config: Fix wrong controller configuration file name
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
binding
/
low-can-hat.cpp
diff --git
a/low-can-binding/binding/low-can-hat.cpp
b/low-can-binding/binding/low-can-hat.cpp
index
26795f4
..
5a26874
100644
(file)
--- a/
low-can-binding/binding/low-can-hat.cpp
+++ b/
low-can-binding/binding/low-can-hat.cpp
@@
-66,12
+66,12
@@
int read_message(sd_event_source *event_source, int fd, uint32_t revents, void *
if(can_subscription->get_index() != -1)
{
std::shared_ptr<utils::socketcan_t> s = can_subscription->get_socket();
if(can_subscription->get_index() != -1)
{
std::shared_ptr<utils::socketcan_t> s = can_subscription->get_socket();
- if(s->socket()
&& s->socket() != -1
)
+ if(s->socket()
> 0
)
{
std::shared_ptr<message_t> message = s->read_message();
// Sure we got a valid CAN message ?
{
std::shared_ptr<message_t> message = s->read_message();
// Sure we got a valid CAN message ?
- if (
! message->get_id() == 0 && ! message->get_length() == 0 && message->get_flags() & INVALID_FLAG
)
+ if (
message->get_id() && message->get_length() && !(message->get_flags() & INVALID_FLAG)
)
push_n_notify(message);
}
}
push_n_notify(message);
}
}