From: Andre Noll Date: Mon, 28 Dec 2015 17:48:06 +0000 (+0000) Subject: command.c: Improve documentation of vss_status_tohuman(). X-Git-Tag: v0.5.6~73 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=b85ea5b925b31e2aeddf6c69d8ae8a89f8038c78;ds=sidebyside command.c: Improve documentation of vss_status_tohuman(). At the time the function is called, we already took a copy of the mmd struct. --- diff --git a/command.c b/command.c index e8f69484..46ede2fe 100644 --- 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) {