diff options
author | Michael Adam <obnox@samba.org> | 2008-04-07 22:43:33 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-10 01:28:57 +0200 |
commit | 101587eb6e52ac41821c18a931a5b2aee49f3af5 (patch) | |
tree | 962671e130a8ebce31e7663b835d545a3781f09c /source3/lib/smbconf | |
parent | a01e840814614a1061eeb9c3a137d0657efcb286 (diff) | |
download | samba-101587eb6e52ac41821c18a931a5b2aee49f3af5.tar.gz samba-101587eb6e52ac41821c18a931a5b2aee49f3af5.tar.bz2 samba-101587eb6e52ac41821c18a931a5b2aee49f3af5.zip |
libsmbconf: pass txt_private_data instead of only cache to do_parameter/section
in preparation of using the verbatim flag.
Michael
(This used to be commit c68cd2477c65d5521a713ae0f37cf2994d2c339e)
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf.h | 2 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_txt_simple.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source3/lib/smbconf/smbconf.h b/source3/lib/smbconf/smbconf.h index 15c2a3b7c9..d333f6c88c 100644 --- a/source3/lib/smbconf/smbconf.h +++ b/source3/lib/smbconf/smbconf.h @@ -40,7 +40,7 @@ WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, WERROR smbconf_init_txt_simple(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, - const char *path + const char *path, bool verbatim); /* diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c index e56b986025..f734eab552 100644 --- a/source3/lib/smbconf/smbconf_txt_simple.c +++ b/source3/lib/smbconf/smbconf_txt_simple.c @@ -61,7 +61,8 @@ static bool smbconf_txt_do_section(const char *section, void *private_data) { WERROR werr; uint32_t idx; - struct txt_cache *cache = (struct txt_cache *)private_data; + struct txt_private_data *tpd = (struct txt_private_data *)private_data; + struct txt_cache *cache = tpd->cache; if (smbconf_find_in_array(section, cache->share_names, cache->num_shares, &idx)) @@ -116,7 +117,8 @@ static bool smbconf_txt_do_parameter(const char *param_name, char **param_names, **param_values; uint32_t num_params; uint32_t idx; - struct txt_cache *cache = (struct txt_cache *)private_data; + struct txt_private_data *tpd = (struct txt_private_data *)private_data; + struct txt_cache *cache = tpd->cache; if (cache->num_shares == 0) { /* not in any share ... */ @@ -184,7 +186,7 @@ static WERROR smbconf_txt_load_file(struct smbconf_ctx *ctx) } if (!pm_process(ctx->path, smbconf_txt_do_section, - smbconf_txt_do_parameter, pd(ctx)->cache)) + smbconf_txt_do_parameter, pd(ctx))) { return WERR_CAN_NOT_COMPLETE; } |