X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fapp.cpp;h=c6e342d4f5de694b424fb5ab46e92d740fb2e7c5;hb=0caee3146b21cfa829eacdd8eccb2b3008aaa745;hp=5021c05a031c683617fdb0ddccffc33b959c2120;hpb=39f0040a8518bf10ba96f2888a37f65faa3ede3d;p=apps%2Fagl-service-windowmanager.git diff --git a/src/app.cpp b/src/app.cpp index 5021c05..c6e342d 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -124,8 +124,10 @@ void App::timerHandler() { unsigned seq = app_list.currentSequenceNumber(); HMI_SEQ_DEBUG(seq, "Timer expired remove Request"); + app_list.req_dump(); app_list.removeRequest(seq); app_list.next(); + app_list.req_dump(); if (app_list.haveRequest()) { this->process_request(); @@ -407,11 +409,11 @@ void App::layout_commit() void App::set_timer(){ HMI_SEQ_DEBUG(app_list.currentSequenceNumber(), "Timer set activate"); - if (timer_ev_src != nullptr) + if (timer_ev_src == nullptr) { // firsttime set into sd_event int ret = sd_event_add_time(afb_daemon_get_event_loop(), &timer_ev_src, - CLOCK_REALTIME, time(NULL) + TIME_OUT, 0, processTimerHandler, this); + CLOCK_REALTIME, time(NULL) * (1000000UL) + TIME_OUT, 0, processTimerHandler, this); if (ret < 0) { HMI_ERROR("wm", "Could't set timer"); @@ -420,7 +422,7 @@ void App::set_timer(){ else { // update timer limitation after second time - sd_event_source_set_time(timer_ev_src, time(NULL) + TIME_OUT); + sd_event_source_set_time(timer_ev_src, time(NULL) * (1000000UL) + TIME_OUT); sd_event_source_set_enabled(timer_ev_src, SD_EVENT_ONESHOT); } } @@ -990,6 +992,8 @@ void App::api_enddraw(char const *appid, char const *drawing_name) //this->stop_timer(); this->do_enddraw(current_seq); + this->stop_timer(); + app_list.removeRequest(current_seq); HMI_SEQ_INFO(current_seq, "Finish request"); app_list.next();