@@ -246,10 +246,16 @@ logfile = getenv("CACKEY_DEBUG_LOGFILE"); } else { logfile++; } } + +#ifdef CACKEY_DEBUG_LOGFILE + if (logfile == NULL) { + logfile = CACKEY_DEBUG_LOGFILE; + } +#endif if (logfile != NULL) { CACKEY_DEBUG_PRINTF("Found log file: %s", logfile); fd = fopen(logfile, "a");