aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagnostic/diagnostic-manager.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-02 23:46:56 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-11 12:41:42 +0200
commit745ff334267ab92051bc8261a7daa0165c700fac (patch)
tree34b32afe9fdad423118f3799c6dfb2e5d768f168 /src/diagnostic/diagnostic-manager.cpp
parentdcc4af2d7e74762ec8d1caf04657b47fca560fed (diff)
Fix: wrong period operation without unit multiplicator
Possible divsion by 0. Don't know if it is good to keep different time unit instead having one unit for project... Change-Id: I73cfc1ab72d3420d337f10a9b79bdf305a3a2bc7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/diagnostic-manager.cpp')
-rw-r--r--src/diagnostic/diagnostic-manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp
index 5834c35d..e3a78d0f 100644
--- a/src/diagnostic/diagnostic-manager.cpp
+++ b/src/diagnostic/diagnostic-manager.cpp
@@ -448,7 +448,7 @@ bool diagnostic_manager_t::clear_to_send(active_diagnostic_request_t* request) c
int diagnostic_manager_t::reschedule_request(sd_event_source *s, uint64_t usec, active_diagnostic_request_t* adr)
{
- usec = usec + (uint64_t)(frequency_clock_t::frequency_to_period(adr->get_frequency_clock().get_frequency())*MICRO);
+ usec = usec + (uint64_t)(adr->get_frequency_clock().frequency_to_period());
DEBUG(binder_interface, "send_request: Event loop state: %d. usec: %ld", sd_event_get_state(afb_daemon_get_event_loop(binder_interface->daemon)), usec);
if(sd_event_source_set_time(s, usec) >= 0)
if(sd_event_source_set_enabled(s, SD_EVENT_ON) >= 0)