diff --git a/modules/dispatcher/dispatcher.c b/modules/dispatcher/dispatcher.c index 789ff837c2..5cb8f95ec8 100644 --- a/modules/dispatcher/dispatcher.c +++ b/modules/dispatcher/dispatcher.c @@ -760,13 +760,13 @@ static int partition_init(ds_db_head_t *db_head, ds_partition_t *partition) LM_ERR("cannot duplicate ping_method\n"); } 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)