lib: Remove smb_iconv_handle_reinit_lp()
authorJeremy Allison <jra@samba.org>
Tue, 11 Apr 2017 22:31:17 +0000 (15:31 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 18 Apr 2017 09:47:17 +0000 (11:47 +0200)
It's merely a wrapper for smb_iconv_handle_reinit(),
only used in one place and smb_iconv_handle_reinit()
is already called from lib/param/loadparm.c.

Removing this will make it easier to make global_iconv_handle
private state to lib/util/charset/codepoints.c later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/param/loadparm.c
lib/param/param.h
lib/param/util.c

index 4d21d88cc6c7ed5283a220b042484f3341eb3b2d..5f9d52b2bd78305cdd5c533b87e286209004cae7 100644 (file)
@@ -1265,7 +1265,8 @@ bool handle_charset(struct loadparm_context *lp_ctx, struct loadparm_service *se
 {
        if (lp_ctx->s3_fns) {
                if (*ptr == NULL || strcmp(*ptr, pszParmValue) != 0) {
-                       global_iconv_handle = smb_iconv_handle_reinit(NULL,
+                       global_iconv_handle =
+                               smb_iconv_handle_reinit(NULL,
                                                        lpcfg_dos_charset(lp_ctx),
                                                        lpcfg_unix_charset(lp_ctx),
                                                        true, global_iconv_handle);
@@ -3357,7 +3358,11 @@ _PUBLIC_ void reload_charcnv(struct loadparm_context *lp_ctx)
        if (old_ic == NULL) {
                old_ic = global_iconv_handle;
        }
-       lp_ctx->iconv_handle = smb_iconv_handle_reinit_lp(lp_ctx, lp_ctx, old_ic);
+       lp_ctx->iconv_handle = smb_iconv_handle_reinit(lp_ctx,
+                                       lpcfg_dos_charset(lp_ctx),
+                                       lpcfg_unix_charset(lp_ctx),
+                                       true,
+                                       old_ic);
        global_iconv_handle = lp_ctx->iconv_handle;
 }
 
index e123e67a9904640eba7dc1a51ad391b164af96a6..a6dbafa42f937eac4e6d6db9594ac84dbb1f488f 100644 (file)
@@ -301,10 +301,6 @@ char *smbd_tmp_path(TALLOC_CTX *mem_ctx,
 
 const char *lpcfg_imessaging_path(TALLOC_CTX *mem_ctx,
                                       struct loadparm_context *lp_ctx);
-struct smb_iconv_handle *smb_iconv_handle_reinit_lp(TALLOC_CTX *mem_ctx,
-                                                             struct loadparm_context *lp_ctx,
-                                                             struct smb_iconv_handle *old_ic);
-
 const char *lpcfg_sam_name(struct loadparm_context *lp_ctx);
 const char *lpcfg_sam_dnsname(struct loadparm_context *lp_ctx);
 
index 233981abfa854ed8f93bb02eea9b1c8cc4d73b0b..52796562ec5a2ba6c691d97c7949bec0574750c1 100644 (file)
@@ -248,17 +248,6 @@ const char *lpcfg_imessaging_path(TALLOC_CTX *mem_ctx,
        return smbd_tmp_path(mem_ctx, lp_ctx, "msg");
 }
 
-struct smb_iconv_handle *smb_iconv_handle_reinit_lp(TALLOC_CTX *mem_ctx,
-                                                             struct loadparm_context *lp_ctx,
-                                                             struct smb_iconv_handle *old_ic)
-{
-       return smb_iconv_handle_reinit(mem_ctx, lpcfg_dos_charset(lp_ctx),
-                                      lpcfg_unix_charset(lp_ctx),
-                                      true,
-                                      old_ic);
-}
-
-
 const char *lpcfg_sam_name(struct loadparm_context *lp_ctx)
 {
        switch (lpcfg_server_role(lp_ctx)) {