Skip to content

Commit a0feb32

Browse files
authored
Merge pull request #3574 from babakyakhchali/bugfix/3567
dispatcher: fix persistent_state
2 parents a6d16dd + 4fd525f commit a0feb32

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/dispatcher/dispatcher.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -782,13 +782,13 @@ static int partition_init(ds_db_head_t *db_head, ds_partition_t *partition)
782782
}
783783

784784
partition->persistent_state = ds_persistent_state;
785-
if (str_strcmp(&db_head->persistent_state, const_str("0")) ||
786-
str_strcmp(&db_head->persistent_state, const_str("no")) ||
787-
str_strcmp(&db_head->persistent_state, const_str("off")))
785+
if (str_strcmp(&db_head->persistent_state, const_str("0")) == 0 ||
786+
str_strcmp(&db_head->persistent_state, const_str("no")) == 0 ||
787+
str_strcmp(&db_head->persistent_state, const_str("off")) == 0)
788788
partition->persistent_state = 0;
789-
else if (str_strcmp(&db_head->persistent_state, const_str("1")) ||
790-
str_strcmp(&db_head->persistent_state, const_str("yes")) ||
791-
str_strcmp(&db_head->persistent_state, const_str("on")))
789+
else if (str_strcmp(&db_head->persistent_state, const_str("1")) == 0 ||
790+
str_strcmp(&db_head->persistent_state, const_str("yes")) == 0 ||
791+
str_strcmp(&db_head->persistent_state, const_str("on")) == 0)
792792
partition->persistent_state = 1;
793793

794794
if (partition->persistent_state)

0 commit comments

Comments
 (0)