+static int c_new(struct conn *c,
+ char **vec,
+ int nvec) {
+ char **tracks = trackdb_new(0, nvec > 0 ? atoi(vec[0]) : INT_MAX);
+
+ sink_printf(ev_writer_sink(c->w), "253 New track list follows\n");
+ while(*tracks) {
+ sink_printf(ev_writer_sink(c->w), "%s%s\n",
+ **tracks == '.' ? "." : "", *tracks);
+ ++tracks;
+ }
+ sink_writes(ev_writer_sink(c->w), ".\n");
+ return 1; /* completed */
+
+}
+
+static int c_rtp_address(struct conn *c,
+ char attribute((unused)) **vec,
+ int attribute((unused)) nvec) {
+ if(config->speaker_backend == BACKEND_NETWORK) {
+ sink_printf(ev_writer_sink(c->w), "252 %s %s\n",
+ quoteutf8(config->broadcast.s[0]),
+ quoteutf8(config->broadcast.s[1]));
+ } else
+ sink_writes(ev_writer_sink(c->w), "550 No RTP\n");
+ return 1;
+}
+