Closes#116.
This is trivial and shouldn't be so hard: it required modifying
functions in both sgminer.c (for NCurses stuff) and api.c. There is
much code repetition, since the NCurses interface is hard-coded in.
Removing it would simplify things greatly.
It looks like there's an exploit that abuses said command, but it is still not clear exactly how.
There's also an additional message when the reconnect happens: "WARNING: POTENTIAL CLIENT.EXPLOIT!", but it requires you to be actively monitoring your log to catch it, and in which case you already get a "Reconnect requested from Pool 0 to 127.0.0.1" message.
Note that disabling 'client.reconnect' might affect some pools that rely on the feature, like pools that you lease your rig to.
Oh and this is dry-coded. :)
WIP!
Use a string instead of a state-machine-ey kernel selection mechanism
where kernel names have to be predefined. This should allow just dropping
new kernels into dir `kernel` without bloating the code in three other
places.
Is in dire need of a cleanup, function parameter check, edge case check -
all the usual testing.
In particular, checking these definitions/keywords:
* enum cl_kernels
* kname
* [c]gpu[s]->kernel (and similar)
* memory cleanup after strdup()?..
* chosen_kernel
* queue_scrypt_kernel
* strbuf
* initCl
Also squashed:
config: add log messages to set_algo() and set_nfactor().
algorithm: use set_algorithm_nfactor() when setting default nfactor in set_algorithm().
Otherwise algorithm->n defaults to 0.
P.S. Did I already mention how this could have been C++?..
Doc in `doc/configuration.md` (has to be started sometime, no?).
Configuration function has to be lamely-named set_algo(), because
set_algorithm() is already declared in algorithm.h (prevent namespace
conflict).
algorithm has to be added as global variable due to the way the
callback is done (by CCAN/opt, which in itself is nice).
This can be cleaned up significantly by (at least) introducing a
global configuration struct, but there is no reason to do it now
just for this - better a wholesale manana.