sad

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

commit d509bfdd852686ad5abece6b622b0213506feff8
parent 1f6170c6c0716160903dc180bfe5db36bdcdf436
Author: sin <sin@2f30.org>
Date:   Sat, 27 Dec 2014 00:10:55 +0000

Add cmdversion

Diffstat:
Mcmd.c | 13++++++++++++-
Msad.c | 1-
2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/cmd.c b/cmd.c @@ -290,6 +290,16 @@ cmdsearch(int fd, char *arg) dprintf(fd, "OK\n"); } +static void +cmdversion(int fd, char *arg) +{ + if (arg[0]) { + dprintf(fd, "ERR unexpected argument\n"); + return; + } + dprintf(fd, "version 0.0\nOK\n"); +} + static Cmd cmds[] = { { "status", cmdstatus }, { "volume", cmdvolume }, @@ -305,7 +315,8 @@ static Cmd cmds[] = { { "close", cmdclose }, { "kill", cmdkill }, { "ping", cmdping }, - { "search", cmdsearch } + { "search", cmdsearch }, + { "version", cmdversion } }; /* shamelessly taken from isakmpd ui.c */ diff --git a/sad.c b/sad.c @@ -128,7 +128,6 @@ main(void) FD_SET(clifd, &master); if (clifd > fdmax) fdmax = clifd; - dprintf(clifd, "version %s\n", PROTOCOLVERSION); } else { if (docmd(i) < 0) { close(i);