struct pakfire_daemon* daemon = data;
int r;
-#if 0 // XXX TEMPORARILY DISABLED
- // Submit stats
- r = pakfire_buildservice_submit_stats(daemon->service);
- if (r < 0)
- CTX_ERROR(daemon->ctx, "Could not submit stats: %s\n", strerror(-r));
-#endif
-
// If we have any workers running, we will submit our stats
// every five seconds, otherwise 30 seconds is enough.
uint64_t next = (daemon->running_workers > 0) ? 5000000 : 30000000;
return r;
}
- return r;
+ // Don't do anything if we don't have a control connection
+ if (!daemon->control) {
+ CTX_DEBUG(daemon->ctx, "Won't send stats without a control connection\n");
+ return 0;
+ }
+
+ // XXX TODO
+
+ // Send the message
+ r = pakfire_xfer_send_message(daemon->control, "{}", 2);
+ if (r)
+ return r;
+
+ return 0;
}
static int pakfire_daemon_setup_loop(struct pakfire_daemon* daemon) {