diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:21:48 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:21:48 +0100 |
commit | 671d774d22050b939439ebc56d25db2569d00554 (patch) | |
tree | a36c90f506093b7d5e707a7a9663f8ba44f65ed3 /src | |
parent | 76df856e0df1b67770038e657f526f915c11a140 (diff) |
Less control before process the CAN message.
Change-Id: I341d29d217b2a92652e9985d8c93829e0211bddc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r-- | src/diagnostic/diagnostic-manager.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index e7293ca6..2821dc0c 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -365,20 +365,19 @@ int diagnostic_manager_t::send_request(sd_event_source *s, uint64_t usec, void * DiagnosticRequest* request = (DiagnosticRequest*)userdata; active_diagnostic_request_t* adr = dm.find_recurring_request(request); - if(adr != nullptr && adr->get_can_bus_dev() == dm.get_can_bus_dev() && adr->should_send() && - dm.clear_to_send(adr)) +// if(adr != nullptr && adr->get_can_bus_dev() == dm.get_can_bus_dev() && adr->should_send() && +// dm.clear_to_send(adr)) + if(adr != nullptr && adr->get_can_bus_dev() == dm.bus_) { - DEBUG(binder_interface, "Got active_diagnostic_request from recurring_requests_ queue."); adr->get_frequency_clock().tick(); - start_diagnostic_request(&dm.get_shims(), adr->get_handle()); + start_diagnostic_request(&dm.shims_, adr->get_handle()); if(adr->get_handle()->completed && !adr->get_handle()->success) { - DEBUG(binder_interface, "Fatal error sending diagnostic request"); + DEBUG(binder_interface, "send_request: Fatal error sending diagnostic request"); return 0; } adr->get_timeout_clock().tick(); adr->set_in_flight(true); - return 1; usec = usec + (uint64_t)(frequency_clock_t::frequency_to_period(adr->get_frequency_clock().get_frequency())*MICRO); DEBUG(binder_interface, "send_request: usec: %d", usec); |