From ed149fdd52f14b91d911953d30549c341af7c989 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 26 Nov 2016 20:14:30 +0100 Subject: [PATCH] More benchmark fixes --- src/opencl.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/opencl.c b/src/opencl.c index 814bca212..598d48f10 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -1169,7 +1169,7 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (user_options->speed_only == true) { - if (speed_msec > 4096) break; + if (speed_msec > 4096) return -2; // special RC } } @@ -1939,10 +1939,13 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co if (rc == -1) return -1; /** - * benchmark + * benchmark, part1 */ - if (user_options->speed_only == true) break; + if (user_options->speed_only == true) + { + if (rc == -2) break; + } /** * speed @@ -1975,6 +1978,12 @@ int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, co hc_thread_mutex_unlock (status_ctx->mux_counter); + /** + * benchmark, part2 + */ + + if (user_options->speed_only == true) break; + /** * result */