Skip to content

Commit

Permalink
[config] Check correct paramter in config_value_changed() predicate
Browse files Browse the repository at this point in the history
The function compares old value with ini file section name, which leads
to practically every new value being evaluated different from previous one.

Check old value vs new value instead.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jul 7, 2016
1 parent 20abe60 commit 435e952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_moded-config.c
Expand Up @@ -362,7 +362,7 @@ int config_value_changed(GKeyFile *settingsfile, const char *entry, const char *
char *old = g_key_file_get_string(settingsfile, entry, key, NULL);
if (old)
{
gboolean unchanged = (g_strcmp0(old, entry) == 0);
gboolean unchanged = (g_strcmp0(old, new_value) == 0);
g_free(old);
if (unchanged)
{
Expand Down

0 comments on commit 435e952

Please sign in to comment.