From 1f118078eba7926b325fe21a8794a0ecb2b5c1f6 Mon Sep 17 00:00:00 2001 From: Kano Date: Sun, 4 Mar 2012 14:51:11 +1100 Subject: [PATCH] api.c: correct error messages --- api.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api.c b/api.c index edab0724..d7f8a97f 100644 --- a/api.c +++ b/api.c @@ -524,6 +524,21 @@ static char *message(int messageid, int paramid, char *param2, bool isjson) case PARAM_GPUMAX: sprintf(ptr, codes[i].description, paramid, nDevs - 1); break; +#if defined(USE_BITFORCE) || defined(USE_ICARUS) + case PARAM_PGAMAX: + pga = numpgas(); + sprintf(ptr, codes[i].description, paramid, pga - 1); + break; +#endif +#ifdef WANT_CPUMINE + case PARAM_CPUMAX: + if (opt_n_threads > 0) + cpu = num_processors; + else + cpu = 0; + sprintf(ptr, codes[i].description, paramid, cpu - 1); + break; +#endif case PARAM_PMAX: sprintf(ptr, codes[i].description, total_pools); break;