command.c: Improve documentation of vss_status_tohuman().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 28 Dec 2015 17:48:06 +0000 (17:48 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 2 Jan 2016 16:48:19 +0000 (16:48 +0000)
At the time the function is called, we already took a copy of the
mmd struct.

command.c

index e8f6948437aac8c0f03b538381afc5ea20b55fe4..46ede2fe825a9c10c86f59dd6c4e2f244d653468 100644 (file)
--- a/command.c
+++ b/command.c
@@ -83,12 +83,13 @@ static void mmd_dup(struct misc_meta_data *new_mmd)
 }
 
 /*
- * Compute human readable string containing vss status for given integer value.
+ * Compute human readable vss status text.
  *
- * We don't want to use vss_playing() and friends here because we take a
- * snapshot of the mmd struct and use the copy for computing the state of the
- * vss. If the real data were used, we would take the mmd lock for a rather
- * long time or risk to get an inconsistent view.
+ * We can't call vss_playing() and friends here because those functions read
+ * the flags from the primary mmd structure, so calling them from command
+ * handler context would require to take the mmd lock. At the time the function
+ * is called we already took a copy of the mmd structure and want to use the
+ * flags value of the copy for computing the vss status text.
  */
 static char *vss_status_tohuman(unsigned int flags)
 {