mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
Speed up "net conf list"
With 1000 shares in the registry, this changed the time of "net conf list" from 1.1 seconds to .6 seconds. Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
8e4816f007
commit
26f238466c
@ -203,10 +203,6 @@ WERROR smbconf_get_share(struct smbconf_ctx *ctx,
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -896,6 +896,9 @@ static WERROR smbconf_reg_get_share(struct smbconf_ctx *ctx,
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user