sd_bus* bus;
int inhibitfd;
- // The control connection
- struct pakfire_xfer* control;
-
- // Connection Timer and Holdoff Time
- sd_event_source* connect_timer;
- unsigned int reconnect_holdoff;
-
// cgroup
struct pakfire_cgroup* cgroup;
unsigned int lines;
int r;
+#if 0
// Bail if we don't have a control connection
if (!self->control)
return 0;
// Bail if the connection isn't ready to send
else if (!pakfire_xfer_is_ready_to_send(self->control))
return 0;
+#endif
do {
// Reset lines
return r;
}
-#if 0
- // Setup the reconnection timer
- r = sd_event_add_time_relative(daemon->loop, &daemon->connect_timer,
- CLOCK_MONOTONIC, 0, 0, pakfire_daemon_reconnect, daemon);
- if (r < 0) {
- ERROR(daemon->ctx, "Could not register the connection timer: %s\n", strerror(-r));
- return r;
- }
-
- // Disable the reconnection timer until we are authenticated
- r = sd_event_source_set_enabled(daemon->connect_timer, SD_EVENT_OFF);
- if (r < 0) {
- ERROR(daemon->ctx, "Could not disable the connection timer: %s\n", strerror(-r));
- return r;
- }
-
- // Setup the stats timer
- r = sd_event_add_time_relative(daemon->loop, &daemon->stats_timer,
- CLOCK_MONOTONIC, 0, 0, pakfire_daemon_submit_stats, daemon);
- if (r < 0) {
- ERROR(daemon->ctx, "Could not register the stat timer: %s\n", strerror(-r));
- return r;
- }
-
- // Disable sending stats until we are connected
- r = sd_event_source_set_enabled(daemon->stats_timer, SD_EVENT_OFF);
- if (r < 0) {
- ERROR(daemon->ctx, "Could not disable the stats timer: %s\n", strerror(-r));
- return r;
- }
-#endif
-
return 0;
}
if (daemon->builder)
pakfire_builder_unref(daemon->builder);
- if (daemon->connect_timer)
- sd_event_source_unref(daemon->connect_timer);
if (daemon->httpclient)
pakfire_httpclient_unref(daemon->httpclient);
if (daemon->client)
pakfire_client_unref(daemon->client);
if (daemon->cgroup)
pakfire_cgroup_unref(daemon->cgroup);
- if (daemon->control)
- pakfire_xfer_unref(daemon->control);
if (daemon->loop)
sd_event_unref(daemon->loop);
if (daemon->bus)
size_t length = 0;
int r;
+#if 0
// Return an error if we are not connected
if (!self->control)
return -ENOTCONN;
+#endif
// Serialize to string
m = json_object_to_json_string_length(message,
return -errno;
}
+#if 0
// Send the message
r = pakfire_xfer_send_message(self->control, m, length);
if (r < 0) {
return r;
}
}
+#endif
return 0;
}