[Settings] Bugfix: store_setting() now applies changes even on root block
This commit is contained in:
parent
e5cea13e51
commit
65c0974d1f
@ -299,7 +299,6 @@ struct settings * find_settings ( const char *name ) {
|
|||||||
*/
|
*/
|
||||||
int store_setting ( struct settings *settings, unsigned int tag,
|
int store_setting ( struct settings *settings, unsigned int tag,
|
||||||
const void *data, size_t len ) {
|
const void *data, size_t len ) {
|
||||||
struct settings *parent;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
@ -317,8 +316,8 @@ int store_setting ( struct settings *settings, unsigned int tag,
|
|||||||
/* If these settings are registered, apply potentially-updated
|
/* If these settings are registered, apply potentially-updated
|
||||||
* settings
|
* settings
|
||||||
*/
|
*/
|
||||||
for ( parent = settings->parent ; parent ; parent = parent->parent ) {
|
for ( ; settings ; settings = settings->parent ) {
|
||||||
if ( parent == &settings_root ) {
|
if ( settings == &settings_root ) {
|
||||||
if ( ( rc = apply_settings() ) != 0 )
|
if ( ( rc = apply_settings() ) != 0 )
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user