Merge pull request #2472 from dachary/wip-9429-bench

erasure-code: fix erasure_code_benchmark goop (decode)

Reviewed-by: Janne Grunau <j@jannau.net>
This commit is contained in:
Loic Dachary 2014-09-15 18:23:08 +02:00
commit 1941d7b60f

View File

@ -164,9 +164,12 @@ int ErasureCodeBench::decode()
{
ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
ErasureCodeInterfaceRef erasure_code;
int code = instance.factory(plugin, parameters, &erasure_code, cerr);
if (code)
stringstream messages;
int code = instance.factory(plugin, parameters, &erasure_code, messages);
if (code) {
cerr << messages.str() << endl;
return code;
}
int k = atoi(parameters["k"].c_str());
int m = atoi(parameters["m"].c_str());