]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
aft.c: Simplify load_afd().
[paraslash.git] / command.c
index 43f85ca67a5e7b35c56d430f7da75cfdb64c7f94..cb5cce16103f891e709dccce1dc39262d5ec0f84 100644 (file)
--- a/command.c
+++ b/command.c
@@ -419,6 +419,7 @@ static int com_version(struct command_context *cc)
        return send_sb(&cc->scc, msg, len, SBD_OUTPUT, false);
 }
 
+/** These status items are cleared if no audio file is currently open. */
 #define EMPTY_STATUS_ITEMS \
        ITEM(PATH) \
        ITEM(DIRECTORY) \
@@ -445,7 +446,11 @@ static int com_version(struct command_context *cc)
        ITEM(YEAR) \
        ITEM(ALBUM) \
        ITEM(COMMENT) \
-       ITEM(AMPLIFICATION)
+       ITEM(MTIME) \
+       ITEM(FILE_SIZE) \
+       ITEM(CHUNK_TIME) \
+       ITEM(NUM_CHUNKS) \
+       ITEM(AMPLIFICATION) \
 
 /**
  * Write a list of audio-file related status items with empty values.
@@ -775,7 +780,7 @@ static int com_tasks(struct command_context *cc)
  * check if perms are sufficient to exec a command having perms cmd_perms.
  * Returns 0 if perms are sufficient, -E_PERM otherwise.
  */
-static int check_perms(unsigned int perms, struct server_command *cmd_ptr)
+static int check_perms(unsigned int perms, const struct server_command *cmd_ptr)
 {
        PARA_DEBUG_LOG("checking permissions\n");
        return (cmd_ptr->perms & perms) < cmd_ptr->perms ? -E_PERM : 0;