chiark / gitweb /
get-volume shouldn't corrupt the volume!
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 8 Mar 2009 13:08:37 +0000 (13:08 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 8 Mar 2009 13:08:37 +0000 (13:08 +0000)
server/server.c

index 345c2ca..b00a70e 100644 (file)
@@ -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;