Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Settings] Bugfix: store_setting() now applies changes even on root b…
…lock
  • Loading branch information
Michael Brown committed Mar 22, 2008
1 parent e5cea13 commit 65c0974
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/settings.c
Expand Up @@ -299,7 +299,6 @@ struct settings * find_settings ( const char *name ) {
*/
int store_setting ( struct settings *settings, unsigned int tag,
const void *data, size_t len ) {
struct settings *parent;
int rc;

/* Sanity check */
Expand All @@ -317,8 +316,8 @@ int store_setting ( struct settings *settings, unsigned int tag,
/* If these settings are registered, apply potentially-updated
* settings
*/
for ( parent = settings->parent ; parent ; parent = parent->parent ) {
if ( parent == &settings_root ) {
for ( ; settings ; settings = settings->parent ) {
if ( settings == &settings_root ) {
if ( ( rc = apply_settings() ) != 0 )
return rc;
break;
Expand Down

0 comments on commit 65c0974

Please sign in to comment.