diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-04 00:49:33 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-04 00:49:33 +0000 |
commit | ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a (patch) | |
tree | 26e7b16fbeb8bef1b45a9a7a035d5a3309c0145a /src/interface.c | |
parent | dafe92a9edd35ef805963d30e953bcadd78074d3 (diff) | |
download | mpd-ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a.tar.gz mpd-ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a.tar.xz mpd-ef6c500edb7dc1a4eb9bff11b83b57dd60d37d4a.zip |
clean up ACK error coding a little bit
git-svn-id: https://svn.musicpd.org/mpd/trunk@1321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/interface.c')
-rw-r--r-- | src/interface.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/interface.c b/src/interface.c index 2fb95ae1c..4abbc8c4f 100644 --- a/src/interface.c +++ b/src/interface.c @@ -41,7 +41,7 @@ #include <errno.h> #include <signal.h> -#define GREETING "MPD" +#define GREETING "OK MPD" #define INTERFACE_MAX_BUFFER_LENGTH MAXPATHLEN+1024 #define INTERFACE_LIST_MODE_BEGIN "command_list_begin" @@ -120,8 +120,7 @@ void openInterface(Interface * interface, int fd) { #endif interface->outBuffer = malloc(interface->outBufSize); - myfprintf(interface->fp,"%s %s %s\n",COMMAND_RESPOND_OK,GREETING, - VERSION); + myfprintf(interface->fp, "%s %s\n", GREETING, VERSION); printInterfaceOutBuffer(interface); } @@ -237,9 +236,7 @@ int interfaceReadInput(Interface * interface) { interface->num, ret); if(ret==0) { - myfprintf(interface->fp, - "%s\n", - COMMAND_RESPOND_OK); + commandSuccess(interface->fp); } else if(ret==COMMAND_RETURN_CLOSE || interface->expired) { @@ -291,7 +288,8 @@ int interfaceReadInput(Interface * interface) { INTERFACE_LIST_MODE_END) ==0) { - myfprintf(interface->fp,"%s not in command list mode\n",COMMAND_RESPOND_ERROR); + commandError(interface->fp, + "not in command list mode"); ret = -1; } else { @@ -304,7 +302,7 @@ int interfaceReadInput(Interface * interface) { DEBUG("interface %i: command returned %i\n",interface->num,ret); } if(ret==0) { - myfprintf(interface->fp,"%s\n",COMMAND_RESPOND_OK); + commandSuccess(interface->fp); } else if(ret==COMMAND_RETURN_CLOSE || interface->expired) { |