-/* Debugging */
-
-void dump_connection_list(void)
-{
- rbl_t *rbl;
- connection_t *cl;
-cp
- syslog(LOG_DEBUG, _("Connection list:"));
-
- syslog(LOG_DEBUG, _(" %s at %s port %hd flags %d sockets %d, %d status %04x"),
- myself->name, myself->hostname, myself->port, myself->flags,
- myself->socket, myself->meta_socket, myself->status);
-
- RBL_FOREACH(connection_tree, rbl)
- {
- cl = (connection_t *)rbl->data;
- syslog(LOG_DEBUG, _(" %s at %s port %hd flags %d sockets %d, %d status %04x"),
- cl->name, cl->hostname, cl->port, cl->flags,
- cl->socket, cl->meta_socket, cl->status);
- }
-
- syslog(LOG_DEBUG, _("End of connection list."));
-cp
-}
+bool dump_connections(connection_t *cdump) {
+ for list_each(connection_t, c, connection_list) {
+ send_request(cdump, "%d %d %s %s %x %d %x",
+ CONTROL, REQ_DUMP_CONNECTIONS,
+ c->name, c->hostname, c->options, c->socket,
+ bitfield_to_int(&c->status, sizeof(c->status)));
+ }