diff --git a/honoka/libhonoka/honokatimer.cpp b/honoka/libhonoka/honokatimer.cpp index e5f9b72..aaf902b 100644 --- a/honoka/libhonoka/honokatimer.cpp +++ b/honoka/libhonoka/honokatimer.cpp @@ -84,10 +84,12 @@ { Transaction trans; uint32 counter = 1; + pid_t p = getpid(); while(1) { usleep(HONOKA_TIMER_INTERVAL); trans.clear(); trans.put_command(HONOKA_TRANS_TIMER); + trans.put_data((uint32)p); trans.put_data(counter); agent.send_imengine_event(-1,"8bb03c1c-db6c-41b1-91bd-b7fb7dd70343",trans); counter ++; @@ -115,8 +117,10 @@ int cmd; if (reader.get_command(cmd)) { if (cmd == HONOKA_TRANS_TIMER) { - uint32 c; + uint32 p,c; + reader.get_data(p); reader.get_data(c); + if (p != (uint32)timer_pid) return 0; return c; } }