-void broadcast_meta(connection_t *from, const char *buffer, int length) {
- for list_each(connection_t, c, connection_list)
- if(c != from && c->status.active)
+void send_meta_raw(connection_t *c, const void *buffer, size_t length) {
+ if(!c) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "send_meta() called with NULL pointer!");
+ abort();
+ }
+
+ logger(DEBUG_META, LOG_DEBUG, "Sending %zu bytes of raw metadata to %s (%s)",
+ length, c->name, c->hostname);
+
+ buffer_add(&c->outbuf, buffer, length);
+
+ io_set(&c->io, IO_READ | IO_WRITE);
+}
+
+void broadcast_meta(connection_t *from, const char *buffer, size_t length) {
+ for list_each(connection_t, c, &connection_list)
+ if(c != from && c->edge) {