Skip to content

Commit

Permalink
Merge pull request #3574 from babakyakhchali/bugfix/3567
Browse files Browse the repository at this point in the history
dispatcher: fix persistent_state
  • Loading branch information
bogdan-iancu authored Feb 7, 2025
2 parents a6d16dd + 4fd525f commit a0feb32
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/dispatcher/dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,13 @@ static int partition_init(ds_db_head_t *db_head, ds_partition_t *partition)
}

partition->persistent_state = ds_persistent_state;
if (str_strcmp(&db_head->persistent_state, const_str("0")) ||
str_strcmp(&db_head->persistent_state, const_str("no")) ||
str_strcmp(&db_head->persistent_state, const_str("off")))
if (str_strcmp(&db_head->persistent_state, const_str("0")) == 0 ||
str_strcmp(&db_head->persistent_state, const_str("no")) == 0 ||
str_strcmp(&db_head->persistent_state, const_str("off")) == 0)
partition->persistent_state = 0;
else if (str_strcmp(&db_head->persistent_state, const_str("1")) ||
str_strcmp(&db_head->persistent_state, const_str("yes")) ||
str_strcmp(&db_head->persistent_state, const_str("on")))
else if (str_strcmp(&db_head->persistent_state, const_str("1")) == 0 ||
str_strcmp(&db_head->persistent_state, const_str("yes")) == 0 ||
str_strcmp(&db_head->persistent_state, const_str("on")) == 0)
partition->persistent_state = 1;

if (partition->persistent_state)
Expand Down

0 comments on commit a0feb32

Please sign in to comment.