Jelajahi Sumber

config: Allow dynamic change of token_coefficient

token_coefficient change in cmap didn't triggered change. So only way
how to change token_coefficient was editing config file and reload.

Patch let's key totem.token_coefficient to be processed so
token_coefficient can be dynamically changed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 11 tahun lalu
induk
melakukan
7557fdec48
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      exec/totemconfig.c

+ 6 - 1
exec/totemconfig.c

@@ -1199,7 +1199,12 @@ static void totem_change_notify(
 		return;
 
 	param = totem_get_param_by_name((struct totem_config *)user_data, key_name);
-	if (!param)
+	/*
+	 * Process change only if changed key is found in totem_config (-> param is not NULL)
+	 * or for special key token_coefficient. token_coefficient key is not stored in
+	 * totem_config, but it is used for computation of token timeout.
+	 */
+	if (!param && strcmp(key_name, "totem.token_coefficient") != 0)
 		return;
 
 	/*