aboutsummaryrefslogtreecommitdiff
path: root/tests/test-service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-service.cc')
-rw-r--r--tests/test-service.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test-service.cc b/tests/test-service.cc
index aad454a..196419b 100644
--- a/tests/test-service.cc
+++ b/tests/test-service.cc
@@ -24,6 +24,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "backend-mock-guest.h"
#include "backend-mock-actions.h"
+gboolean onMainLoopQuit(gpointer pUserData)
+{
+ g_main_loop_quit((GMainLoop*)pUserData);
+
+ return FALSE;
+}
+
/***
****
***/
@@ -169,7 +176,7 @@ class ServiceTest: public GTestDBusFixture
G_BUS_NAME_WATCHER_FLAGS_NONE,
on_name_appeared, // quits the loop
NULL, this, NULL);
- const guint timer_id = g_timeout_add_seconds (TIME_LIMIT_SEC, (GSourceFunc)g_main_loop_quit, loop);
+ const guint timer_id = g_timeout_add_seconds(TIME_LIMIT_SEC, onMainLoopQuit, loop);
g_main_loop_run (loop);
g_source_remove (timer_id);
g_bus_unwatch_name (watch_id);