With 1000 shares in the registry, this changed the time of "net conf list" from
1.1 seconds to .6 seconds.
const char *servicename,
struct smbconf_service **service)
{
- if (!smbconf_share_exists(ctx, servicename)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->get_share(ctx, mem_ctx, servicename, service);
}
werr = smbconf_reg_open_service_key(tmp_ctx, ctx, servicename,
REG_KEY_READ, &key);
if (!W_ERROR_IS_OK(werr)) {
+ if (W_ERROR_EQUAL(werr, WERR_BADFILE)) {
+ werr = WERR_NO_SUCH_SERVICE;
+ }
goto done;
}