use the OPENSC_DEBUG environment variable to overwite the configuration

variable debug in opensc.conf


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3043 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2006-10-30 07:37:44 +00:00
parent 821a009609
commit bd753c4967
1 changed files with 5 additions and 0 deletions

View File

@ -182,8 +182,13 @@ static int load_parameters(sc_context_t *ctx, scconf_block *block,
int err = 0;
const scconf_list *list;
const char *val, *s_internal = "internal";
const char *debug = NULL;
ctx->debug = scconf_get_int(block, "debug", ctx->debug);
debug = getenv("OPENSC_DEBUG");
if (debug)
ctx->debug = atoi(debug);
val = scconf_get_str(block, "debug_file", NULL);
if (val) {
if (ctx->debug_file && ctx->debug_file != stdout)