diff options
author | Ted Gould <ted@gould.cx> | 2010-06-11 12:34:09 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-06-11 12:34:09 -0500 |
commit | 6eedd6ecca2bc3ea84df10d3bebbcf0540cf142a (patch) | |
tree | 7a771e337ab964db45671e5c05081ff3d8349e67 /tests/test-libappindicator-fallback-watcher.c | |
parent | 259c51992e02eb323742df1a678b1e5eddba0997 (diff) | |
download | libayatana-appindicator-6eedd6ecca2bc3ea84df10d3bebbcf0540cf142a.tar.gz libayatana-appindicator-6eedd6ecca2bc3ea84df10d3bebbcf0540cf142a.tar.bz2 libayatana-appindicator-6eedd6ecca2bc3ea84df10d3bebbcf0540cf142a.zip |
Increase the timeouts, but make it so that the watcher shutsdown when seen.
Diffstat (limited to 'tests/test-libappindicator-fallback-watcher.c')
-rw-r--r-- | tests/test-libappindicator-fallback-watcher.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test-libappindicator-fallback-watcher.c b/tests/test-libappindicator-fallback-watcher.c index 00841fd..0a1b187 100644 --- a/tests/test-libappindicator-fallback-watcher.c +++ b/tests/test-libappindicator-fallback-watcher.c @@ -27,6 +27,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "../src/dbus-shared.h" +gboolean kill_func (gpointer userdata); + static GMainLoop * mainloop = NULL; static DBusHandlerResult @@ -36,6 +38,10 @@ dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_dat DBusMessage * reply = dbus_message_new_method_return(message); dbus_connection_send(connection, reply, NULL); dbus_message_unref(reply); + + /* Let the messages get out, but we're done at this point */ + g_timeout_add(50, kill_func, NULL); + return DBUS_HANDLER_RESULT_HANDLED; } @@ -96,8 +102,9 @@ main (int argv, char ** argc) dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL); - /* After we've got the name, let it unfallback, and then we'll drop again */ - g_timeout_add(1000, kill_func, NULL); + /* This is the final kill function. It really shouldn't happen + unless we get an error. */ + g_timeout_add(2000, kill_func, NULL); g_debug("Entering Mainloop"); |