rxpd_connection_cmd_DUMP (int fd, short event, void* ptr)
{
struct rxpd_connection* self = (struct rxpd_connection*) ptr;
- rxpd_buffer_printf (&self->out, "#ERROR: unimplemented command %s\n", &__func__[20]);
+
+ if (llist_is_empty (&self->file->rules))
+ rxpd_buffer_printf (&self->out, "#OK:\n");
+ else
+ {
+ LLIST_FOREACH (&self->file->rules, n)
+ {
+ struct rxpd_rule* rule = (struct rxpd_rule*)n;
+ rxpd_buffer_printf (&self->out, "%s\n", rule->string);
+ }
+ }
+
+ close (fd);
}