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
low-can-cb: Little opti
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
binding
/
low-can-cb.cpp
diff --git
a/low-can-binding/binding/low-can-cb.cpp
b/low-can-binding/binding/low-can-cb.cpp
index
1ebb392
..
0bee7ef
100644
(file)
--- a/
low-can-binding/binding/low-can-cb.cpp
+++ b/
low-can-binding/binding/low-can-cb.cpp
@@
-394,11
+394,9
@@
static int process_one_subscribe_args(afb_req_t request, bool subscribe, json_ob
// 2 cases : ID(PGN) and event
json_object_object_get_ex(args,"event",&event);
// 2 cases : ID(PGN) and event
json_object_object_get_ex(args,"event",&event);
- json_bool test_id = json_object_object_get_ex(args,"id",&id);
- if(!test_id)
- test_id = json_object_object_get_ex(args,"pgn",&id);
+ json_object_object_get_ex(args,"id",&id) || json_object_object_get_ex(args,"pgn",&id);
- if(
args == NULL || (id && ((std::string)json_object_get_string(id)).compare("*") == 0))
+ if( args == NULL || (id && ((std::string)json_object_get_string(id)).compare("*") == 0))
{
rc = one_subscribe_unsubscribe_events(request, subscribe, "*", args);
}
{
rc = one_subscribe_unsubscribe_events(request, subscribe, "*", args);
}