From: Andre Noll Date: Sun, 30 Jul 2017 00:25:26 +0000 (+0200) Subject: Force status item update on mood/playlist changes. X-Git-Tag: v0.6.1~21 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=f5ec2fd02149c64869beadfb7575c17141e0c58e;ds=sidebyside Force status item update on mood/playlist changes. This patch increments the mmd event counter whenever a new playlist or mood is loaded. This instructs the stat command handlers to resend the list of status items to all connected stat clients. --- diff --git a/afs.c b/afs.c index b92cf0f2..ef05a473 100644 --- a/afs.c +++ b/afs.c @@ -497,10 +497,12 @@ static int activate_mood_or_playlist(const char *arg, int *num_admissible) strncpy(mmd->afs_mode_string, arg, sizeof(mmd->afs_mode_string)); mmd->afs_mode_string[sizeof(mmd->afs_mode_string) - 1] = '\0'; + mmd->events++; mutex_unlock(mmd_mutex); } else { mutex_lock(mmd_mutex); strcpy(mmd->afs_mode_string, "dummy"); + mmd->events++; mutex_unlock(mmd_mutex); current_mop = NULL; }