aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-15 18:06:21 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-15 18:06:21 +0000
commit80dd76db7f927be1b6a967f43f36d705b701f153 (patch)
tree8d95e5e8eaaa92c3e581b1c991c0f82cdb33d435 /src/directory.c
parent28d6bb796a0cf53c8d53e0de78e00e1fedcbf02d (diff)
downloadmpd-80dd76db7f927be1b6a967f43f36d705b701f153.tar.gz
mpd-80dd76db7f927be1b6a967f43f36d705b701f153.tar.xz
mpd-80dd76db7f927be1b6a967f43f36d705b701f153.zip
fix C99 stuff for commandError
also some slight optimizations to interfacePrintWithFD() and myfprintf() git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/directory.c b/src/directory.c
index 0d1b0ee2b..a05553dd6 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -166,7 +166,8 @@ void readDirectoryDBIfUpdateIsFinished() {
int updateInit(FILE * fp, List * pathList) {
if(directory_updatePid > 0) {
- commandError(fp, ACK_ERROR_UPDATE_ALREADY, "already updating");
+ commandError(fp, ACK_ERROR_UPDATE_ALREADY, "already updating",
+ NULL);
return -1;
}
@@ -224,7 +225,7 @@ int updateInit(FILE * fp, List * pathList) {
unblockSignals();
ERROR("updateInit: Problems forking()'ing\n");
commandError(fp, ACK_ERROR_SYSTEM,
- "problems trying to update");
+ "problems trying to update", NULL);
directory_updatePid = 0;
return -1;
}
@@ -745,7 +746,8 @@ int printDirectoryInfo(FILE * fp, char * name) {
Directory * directory;
if((directory = getDirectory(name))==NULL) {
- commandError(fp, ACK_ERROR_NO_EXIST, "directory not found");
+ commandError(fp, ACK_ERROR_NO_EXIST, "directory not found",
+ NULL);
return -1;
}
@@ -1047,7 +1049,7 @@ int traverseAllIn(FILE * fp, char * name,
return forEachSong(fp, song, data);
}
commandError(fp, ACK_ERROR_NO_EXIST,
- "directory or file not found");
+ "directory or file not found", NULL);
return -1;
}
@@ -1129,7 +1131,7 @@ int searchForSongsIn(FILE * fp, char * name, char * item, char * string) {
ret = traverseAllIn(fp,name,searchForFilenameInDirectory,NULL,
(void *)dup);
}
- else commandError(fp, ACK_ERROR_ARG, "unknown table");
+ else commandError(fp, ACK_ERROR_ARG, "unknown table", NULL);
free(dup);
@@ -1166,7 +1168,7 @@ int findSongsIn(FILE * fp, char * name, char * item, char * string) {
(void *)string);
}
- commandError(fp, ACK_ERROR_ARG, "unknown table");
+ commandError(fp, ACK_ERROR_ARG, "unknown table", NULL);
return -1;
}