Skip to content

Commit

Permalink
Revert "lib: always initialize sigutils"
Browse files Browse the repository at this point in the history
  • Loading branch information
BatchDrake authored Sep 3, 2023
1 parent 89ba30c commit b579344
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,17 @@ suscan_sigutils_init(enum suscan_mode mode)

SIGUTILS_ABI_CHECK();

if (mode == SUSCAN_MODE_DELAYED_LOG) {
config.exclusive = SU_FALSE; /* We handle concurrency manually */
config.log_func = suscan_log_func;
if (mode != SUSCAN_MODE_NOLOG) {
if (mode == SUSCAN_MODE_DELAYED_LOG) {
config.exclusive = SU_FALSE; /* We handle concurrency manually */
config.log_func = suscan_log_func;

config_p = &config;
} else if (mode == SUSCAN_MODE_NOLOG) {
config_p = &config;
}
config_p = &config;
}

if (!su_lib_init_ex(config_p))
goto done;
if (!su_lib_init_ex(config_p))
goto done;
}

SU_TRY(userpath = suscan_confdb_get_user_path());
SU_TRY(wisdom_file = strbuild("%s/" SUSCAN_WISDOM_FILE_NAME, userpath));
Expand All @@ -293,7 +293,7 @@ suscan_sigutils_init(enum suscan_mode mode)
done:
if (wisdom_file != NULL)
free(wisdom_file);

return ok;
}

Expand Down

0 comments on commit b579344

Please sign in to comment.