From 38394e9f248ac4be7d5eba62f4db521a8f837d01 Mon Sep 17 00:00:00 2001 From: batrick Date: Wed, 24 Dec 2008 08:40:03 +0000 Subject: [PATCH] Corrected an output line that Ron left in from a patch I gave him. The script's filename cannot be acessed when a thread's target times out because we do not have access to the thread's environment when it is yielded. All we can do is print out which target timed out. This output can unfortunately be printed out many times for each thread (it is currently difficult to track). --- nse_main.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nse_main.cc b/nse_main.cc index 8e4b39864..24cc278d8 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -437,7 +437,10 @@ int process_mainloop(lua_State *L) { current = *(running_scripts.begin()); if (current.rr.host->timedOut(&now)) { - printf("thread (%p) timed out\n", (void *) current.thread); + if (o.verbose >= 2) { + log_write(LOG_STDOUT, "%s: target %s timed out.\n", SCRIPT_ENGINE, + current.rr.host->targetipstr()); + } SCRIPT_ENGINE_TRY(process_finalize(L, current.registry_idx)); continue; }