From a573643403bed67db8516754600ba048a88371b7 Mon Sep 17 00:00:00 2001 From: Vladimir Stoiakin Date: Mon, 24 Feb 2025 11:37:30 +0300 Subject: [PATCH] unl0kr-agent: add more debug output --- unl0kr/unl0kr-agent.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/unl0kr/unl0kr-agent.c b/unl0kr/unl0kr-agent.c index 64c759b..6f0b01f 100644 --- a/unl0kr/unl0kr-agent.c +++ b/unl0kr/unl0kr-agent.c @@ -20,8 +20,6 @@ #include #include -#define INI_STOP_ON_FIRST_ERROR 0 /* Ignore unknown keys */ - #include struct Request @@ -164,7 +162,7 @@ int ini_parser(void* user, const char* section, const char* name, const char* va } else if (strcmp(name, "Silent") == 0) { d->silent = to_bool(value); } else { - fprintf(stderr, "The ini file contains unknown key: %s\n", name); + fprintf(stderr, "The ini file contains unknown key: %s = %s\n", name, value); return 0; } @@ -326,8 +324,10 @@ int event_loop(pid_t pid) if (unl0kr_exited) break; - if (timer_expired && ret != ECANCELED) + if (timer_expired && ret != ECANCELED) { ret = ETIME; + fprintf(stderr, "The request has expired\n"); + } continue; } @@ -339,6 +339,7 @@ int event_loop(pid_t pid) } ret = ECANCELED; + fprintf(stderr, "The request was cancelled\n"); if (timer_expired) continue;