- obt_main_loop_timeout_remove(ob_main_loop, sync_timeout_func);
- obt_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC * 2,
- sync_timeout_func,
- NULL, NULL, NULL);
+ if (sync_timer) g_source_remove(sync_timer);
+ sync_timer = g_timeout_add(2000, sync_timeout_func, NULL);