From: Richard Kettlewell Date: Sun, 8 Mar 2009 13:08:37 +0000 (+0000) Subject: get-volume shouldn't corrupt the volume! X-Git-Tag: 5.0~178^2~7^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/e4d0463fd8ded8948e08379bdb78b67b72d36f9a get-volume shouldn't corrupt the volume! --- diff --git a/server/server.c b/server/server.c index 345c2ca..b00a70e 100644 --- a/server/server.c +++ b/server/server.c @@ -829,7 +829,7 @@ static int c_volume(struct conn *c, sink_writes(ev_writer_sink(c->w), "550 error accessing mixer\n"); return 1; } - api->set_volume(&l, &r); + (set ? api->set_volume : api->get_volume)(&l, &r); sink_printf(ev_writer_sink(c->w), "252 %d %d\n", l, r); if(l != volume_left || r != volume_right) { volume_left = l;