Commit 915af1e0 authored by Warren Dukes's avatar Warren Dukes

add ack.h and change format of error again

git-svn-id: https://svn.musicpd.org/mpd/trunk@1327 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent fd06660e
#ifndef ACK_H
#define ACK_H
#define ACK_ERROR_NOT_LIST 1
#define ACK_ERROR_ARG 2
#define ACK_ERROR_PASSWORD 3
#define ACK_ERROR_PERMISSION 4
#define ACK_ERROR_UNKNOWN 5
#define ACK_ERROR_NO_EXIST 6
#define ACK_ERROR_PLAYLIST_MAX 7
#define ACK_ERROR_SYSTEM 8
#define ACK_ERROR_PLAYLIST_LOAD 9
#define ACK_ERROR_UPDATE_ALREADY 10
#define ACK_ERROR_PLAYER_SYNC 11
#endif
...@@ -48,13 +48,13 @@ void finishCommands(); ...@@ -48,13 +48,13 @@ void finishCommands();
#define commandError(fp, error, format, ... ) \ #define commandError(fp, error, format, ... ) \
{\ {\
if(current_command) { \ if(current_command) { \
myfprintf(fp, "ACK [%i@%i:%s] " format "\n", \ myfprintf(fp, "ACK [%i@%i] {%s} " format "\n", \
(int)error, command_listNum, \ (int)error, command_listNum, \
current_command, ##__VA_ARGS__); \ current_command, ##__VA_ARGS__); \
current_command = NULL; \ current_command = NULL; \
} \ } \
else { \ else { \
myfprintf(fp, "ACK [%i@%i:] " format "\n", \ myfprintf(fp, "ACK [%i@%i] " format "\n", \
(int)error, command_listNum, \ (int)error, command_listNum, \
##__VA_ARGS__); \ ##__VA_ARGS__); \
} \ } \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment