]> Dogcows Code - chaz/openbox/blobdiff - openbox/ping.c
Various fixes for sparse warnings.
[chaz/openbox] / openbox / ping.c
index daabbfb54be29e69f4623f75bdb433f334b2805a..eed094796045562fc7ef328f6e2d816408420e45 100644 (file)
@@ -21,6 +21,7 @@
 #include "client.h"
 #include "prop.h"
 #include "event.h"
+#include "debug.h"
 #include "mainloop.h"
 #include "openbox.h"
 
@@ -64,7 +65,7 @@ void ping_start(struct _ObClient *client, ObPingEventHandler h)
     ping_send(t);
     ping_targets = g_slist_prepend(ping_targets, t);
     ob_main_loop_timeout_add(ob_main_loop, PING_TIMEOUT, ping_timeout,
-                             t, NULL, NULL);
+                             t, g_direct_equal, NULL);
 
     if (!active) {
         active = TRUE;
@@ -108,7 +109,6 @@ static void ping_send(ObPingTarget *t)
 {
     t->sent = event_get_server_time();
     /*ob_debug("PING: '%s' (timestamp %lu)\n", t->client->title, t->sent);*/
-    ob_debug("PINGing client %s at %lu\n", t->client->title, t->sent);
     PROP_MSG_TO(t->client->window, t->client->window, wm_protocols,
                 prop_atoms.net_wm_ping, t->sent, t->client->window, 0, 0,
                 NoEventMask);
@@ -149,7 +149,7 @@ static void ping_end(ObClient *client, gpointer data)
 
     /* stop listening if we're not waiting for any more pings */
     if (!ping_targets) {
-        active = TRUE;
+        active = FALSE;
         client_remove_destroy_notify(ping_end);
     }    
 }
This page took 0.0232520000000001 seconds and 4 git commands to generate.