aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-cb.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-05 15:37:47 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-08 00:17:29 +0100
commitbdde88e49b303bb310609eee13e13c8b99a2ab09 (patch)
tree17946d20986f824cfc433f4ed4d712e2e113150d /low-can-binding/binding/low-can-cb.cpp
parent699f7c0fd118615f53eb7b7b3a86e1c6d2a42c09 (diff)
subscription: Optimizing opening sockets
Also review some aligment and make more space between bool ops Bug-AGL: SPEC-2988 Change-Id: I613f294a630caf48eea7bb0c7b9c36b07cbacfbf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/low-can-cb.cpp')
-rw-r--r--low-can-binding/binding/low-can-cb.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp
index fd57867c..8bb595e9 100644
--- a/low-can-binding/binding/low-can-cb.cpp
+++ b/low-can-binding/binding/low-can-cb.cpp
@@ -111,7 +111,7 @@ int read_message(sd_event_source *event_source, int fd, uint32_t revents, void *
}
// check if error or hangup
- if ((revents & (EPOLLERR|EPOLLRDHUP|EPOLLHUP)) != 0)
+ if ((revents & (EPOLLERR | EPOLLRDHUP | EPOLLHUP)) != 0)
{
sd_event_source_unref(event_source);
can_subscription->get_socket()->close();
@@ -193,11 +193,11 @@ static int add_to_event_loop(std::shared_ptr<low_can_subscription_t>& can_subscr
}
static int subscribe_unsubscribe_diagnostic_messages(afb_req_t request,
- bool subscribe,
- list_ptr_diag_msg_t diagnostic_messages,
- struct event_filter_t& event_filter,
- map_subscription& s,
- bool perm_rec_diag_req)
+ bool subscribe,
+ list_ptr_diag_msg_t diagnostic_messages,
+ struct event_filter_t& event_filter,
+ map_subscription& s,
+ bool perm_rec_diag_req)
{
int rets = 0;
application_t& app = application_t::instance();
@@ -258,10 +258,10 @@ static int subscribe_unsubscribe_diagnostic_messages(afb_req_t request,
}
static int subscribe_unsubscribe_signals(afb_req_t request,
- bool subscribe,
- list_ptr_signal_t signals,
- struct event_filter_t& event_filter,
- map_subscription& s)
+ bool subscribe,
+ list_ptr_signal_t signals,
+ struct event_filter_t& event_filter,
+ map_subscription& s)
{
int rets = 0;
for(const auto& sig: signals)
@@ -589,7 +589,7 @@ static void write_raw_frame(afb_req_t request, const std::string& bus_name, mess
if( !sf.signals.empty() )
{
AFB_DEBUG("ID WRITE RAW : %d",sf.signals.front()->get_message()->get_id());
- if(flags&BCM_PROTOCOL)
+ if(flags & BCM_PROTOCOL)
{
if(sf.signals.front()->get_message()->is_fd())
{