From b85ea5b925b31e2aeddf6c69d8ae8a89f8038c78 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 28 Dec 2015 17:48:06 +0000 Subject: [PATCH] command.c: Improve documentation of vss_status_tohuman(). At the time the function is called, we already took a copy of the mmd struct. --- command.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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) { -- 2.39.5