aboutsummaryrefslogtreecommitdiff
path: root/tests/service-manager-connect-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-02 08:35:41 -0600
committerTed Gould <ted@gould.cx>2009-12-02 08:35:41 -0600
commitde38fc85d228bb2de6de86f31805ad0de748318e (patch)
treeb66887f0803fae080c31cc2533f1ad36f89f7f5e /tests/service-manager-connect-service.c
parentad2ef4d35017d674caecc65ccde4e500b0740982 (diff)
parentb7864d8626cd5bdde3fe94f2086d9a1cfdb66a49 (diff)
downloadlibayatana-indicator-de38fc85d228bb2de6de86f31805ad0de748318e.tar.gz
libayatana-indicator-de38fc85d228bb2de6de86f31805ad0de748318e.tar.bz2
libayatana-indicator-de38fc85d228bb2de6de86f31805ad0de748318e.zip
Adding an unwatch command to allow for graceful disconnection from a service if we're not interested in it.
Diffstat (limited to 'tests/service-manager-connect-service.c')
-rw-r--r--tests/service-manager-connect-service.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/service-manager-connect-service.c b/tests/service-manager-connect-service.c
index 297f3ba..d60e414 100644
--- a/tests/service-manager-connect-service.c
+++ b/tests/service-manager-connect-service.c
@@ -8,7 +8,7 @@ static gboolean passed = FALSE;
gboolean
timeout (gpointer data)
{
- passed = TRUE;
+ passed = FALSE;
g_debug("Timeout with no shutdown.");
g_main_loop_quit(mainloop);
return FALSE;
@@ -17,8 +17,8 @@ timeout (gpointer data)
void
shutdown (void)
{
- g_error("Shutdown");
- passed = FALSE;
+ g_debug("Shutdown");
+ passed = TRUE;
g_main_loop_quit(mainloop);
return;
}
@@ -28,6 +28,8 @@ main (int argc, char ** argv)
{
g_type_init();
+ g_debug("Starting service");
+
IndicatorService * is = indicator_service_new("org.ayatana.test");
g_signal_connect(G_OBJECT(is), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, shutdown, NULL);