Try to init and deinit the algorithm in the configuration parser and
exit with error if it doesn't work.
if (!strcmp(args[1], "algo")) {
int cur_arg;
+ struct comp_ctx ctx;
+
cur_arg = 2;
if (!*args[cur_arg]) {
Alert("parsing [%s:%d] : '%s' expects <algorithm>\n",
err_code |= ERR_ALERT | ERR_FATAL;
goto out;
}
+ if (curproxy->comp->algos->init(&ctx, 9) == 0) {
+ curproxy->comp->algos->end(&ctx);
+ } else {
+ Alert("parsing [%s:%d] : '%s' : Can't init '%s' algorithm.\n",
+ file, linenum, args[0], args[cur_arg]);
+ err_code |= ERR_ALERT | ERR_FATAL;
+ goto out;
+ }
cur_arg ++;
continue;
}