diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-04-11 02:34:26 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-04-11 02:34:26 +0000 |
commit | 4cfd77be95658167467163bf5c87fd5957ee71f1 (patch) | |
tree | 9d26ea345e60dfe03472df5fa84670dfeef7a8e9 /src | |
parent | 5798500b8531ce788f0321b0545b10563e3821fa (diff) | |
download | mpd-4cfd77be95658167467163bf5c87fd5957ee71f1.tar.gz mpd-4cfd77be95658167467163bf5c87fd5957ee71f1.tar.xz mpd-4cfd77be95658167467163bf5c87fd5957ee71f1.zip |
updating_db in status and some ideas for the TODO that i've already forgotten
git-svn-id: https://svn.musicpd.org/mpd/trunk@669 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/command.c | 3 | ||||
-rw-r--r-- | src/directory.c | 5 | ||||
-rw-r--r-- | src/directory.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c index 551012049..4259b58e7 100644 --- a/src/command.c +++ b/src/command.c @@ -84,6 +84,7 @@ #define COMMAND_STATUS_ERROR "error" #define COMMAND_STATUS_CROSSFADE "xfade" #define COMMAND_STATUS_AUDIO "audio" +#define COMMAND_STATUS_UPDATING_DB "updating_db" typedef int (* CommandHandlerFunction)(FILE *, unsigned int *, int, char **); @@ -193,6 +194,8 @@ int commandStatus(FILE * fp, unsigned int * permission, int argArrayLength, myfprintf(fp,"%s: %u:%i:%i\n",COMMAND_STATUS_AUDIO,getPlayerSampleRate(),getPlayerBits(),getPlayerChannels()); } + if(isUpdatingDB()) myfprintf(fp,"%s: 1\n",COMMAND_STATUS_UPDATING_DB); + if(getPlayerError()!=PLAYER_ERROR_NOERROR) { myfprintf(fp,"%s: %s\n",COMMAND_STATUS_ERROR,getPlayerErrorStr()); } diff --git a/src/directory.c b/src/directory.c index 16f2c0fa0..7ecc5bd62 100644 --- a/src/directory.c +++ b/src/directory.c @@ -88,6 +88,11 @@ void deleteEmptyDirectoriesInDirectory(Directory * directory); int addSubDirectoryToDirectory(Directory * directory, char * shortname, char * name); +int isUpdatingDB() { + if(directory_updatePid>0) return 1; + return 0; +} + void directory_sigChldHandler(int pid, int status) { if(directory_updatePid==pid) { if(WIFSIGNALED(status) && WTERMSIG(status)!=SIGTERM) { diff --git a/src/directory.h b/src/directory.h index 1ad2c1ab5..024790163 100644 --- a/src/directory.h +++ b/src/directory.h @@ -28,6 +28,8 @@ extern char directorydb[MAXPATHLEN+1]; +int isUpdatingDB(); + void directory_sigChldHandler(int pid, int status); int updateInit(FILE * fp); |