sad

simple audio daemon
git clone git://git.2f30.org/sad
Log | Files | Refs | LICENSE

commit 41990e8ea879cf93a4f3f31c9b573e53bb6134cf
parent eadcb138583b93b935d3717b11673c37160ca3e4
Author: sin <sin@2f30.org>
Date:   Fri, 26 Dec 2014 15:59:17 +0000

Reply with pong on ping

Diffstat:
Mcmd.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmd.c b/cmd.c @@ -251,7 +251,11 @@ cmdkill(int fd, int argc, char **argv) static void cmdping(int fd, int argc, char **argv) { - dprintf(fd, "OK\n"); + if (argc != 1) { + dprintf(fd, "ERR \"unexpected argument\"\n"); + return; + } + dprintf(fd, "pong\nOK\n"); } static Cmd cmds[] = {