chiark / gitweb /
more thorough kvp.c testing
[disorder] / disobedience / disobedience.c
index 0b3408b897d75a638b6fc7954a2e620fe7c72b74..d6b346d05cdf9c1672c035c1946d080ef800b599 100644 (file)
@@ -350,20 +350,24 @@ static gboolean maybe_send_nop(gpointer attribute((unused)) data) {
 static void got_rtp_address(void attribute((unused)) *v,
                             int attribute((unused)) nvec,
                             char attribute((unused)) **vec) {
+  ++suppress_actions;
   rtp_address_in_flight = 0;
   rtp_supported = 1;
   rtp_is_running = rtp_running();
   control_monitor(0);
+  --suppress_actions;
 }
 
 /** @brief Called when a rtp-address command fails */
 static void no_rtp_address(struct callbackdata attribute((unused)) *cbd,
                            int attribute((unused)) code,
                            const char attribute((unused)) *msg) {
+  ++suppress_actions;
   rtp_address_in_flight = 0;
   rtp_supported = 0;
   rtp_is_running = 0;
   control_monitor(0);
+  --suppress_actions;
 }
 
 /** @brief Called to check whether RTP play is available */
@@ -478,7 +482,7 @@ int main(int argc, char **argv) {
   gtk_widget_show_all(toplevel);
   /* issue a NOP every so often */
   g_timeout_add_full(G_PRIORITY_LOW,
-                     1000/*interval, ms*/,
+                     2000/*interval, ms*/,
                      maybe_send_nop,
                      0/*data*/,
                      0/*notify*/);
@@ -487,6 +491,7 @@ int main(int argc, char **argv) {
   disorder_eclient_log(logclient, &log_callbacks, 0);
   /* See if RTP play supported */
   check_rtp_address();
+  suppress_actions = 0;
   D(("enter main loop"));
   MTAG("misc");
   g_main_loop_run(mainloop);