Remove more uses of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 24 Oct 2008 12:31:16 +0000 (14:31 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 24 Oct 2008 12:31:16 +0000 (14:31 +0200)
source3/include/includes.h
source4/lib/messaging/pymessaging.c
source4/lib/registry/ldb.c

index 24e33c172009a565d859624fe4f5353cc923c8c7..ffa5f34d3461581cd27ca218bdc1ffc71fc655e4 100644 (file)
@@ -596,7 +596,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "trans2.h"
 #include "../libcli/util/error.h"
 #include "ntioctl.h"
-#include "charset.h"
+#include "../lib/util/charset.h"
 #include "dynconfig.h"
 #include "util_getent.h"
 #include "debugparse.h"
index 590edfef6430f643f614f5a0f3b73f945eda9b02..c2c23b679e0cab3c9a64a614e0eb16402afa30cc 100644 (file)
@@ -80,7 +80,7 @@ PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwa
        ev = s4_event_context_init(ret->mem_ctx);
 
        if (messaging_path == NULL) {
-               messaging_path = lp_messaging_path(ret, global_loadparm);
+               messaging_path = lp_messaging_path(ret->mem_ctx, global_loadparm);
        } else {
                messaging_path = talloc_strdup(ret->mem_ctx, messaging_path);
        }
@@ -334,7 +334,7 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
        ev = s4_event_context_init(ret->mem_ctx);
 
        if (messaging_path == NULL) {
-               messaging_path = lp_messaging_path(ret, global_loadparm);
+               messaging_path = lp_messaging_path(ret->mem_ctx, global_loadparm);
        } else {
                messaging_path = talloc_strdup(ret->mem_ctx, messaging_path);
        }
index bf1ec31f56585de41788c4f6a8a471561b6b4b80..87268ce5e7e35030248cf05f4f96950ab1c9e214 100644 (file)
@@ -38,7 +38,6 @@ struct ldb_key_data
 };
 
 static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, 
-                                struct smb_iconv_convenience *iconv_convenience,
                                 struct ldb_message *msg,
                                 const char **name, uint32_t *type,
                                 DATA_BLOB *data)
@@ -61,7 +60,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
        case REG_SZ:
        case REG_EXPAND_SZ:
                if (val != NULL)
-                       data->length = convert_string_talloc_convenience(mem_ctx, iconv_convenience, CH_UTF8, CH_UTF16,
+                       data->length = convert_string_talloc(mem_ctx, CH_UTF8, CH_UTF16,
                                                     val->data, val->length,
                                                     (void **)&data->data);
                else {
@@ -320,7 +319,7 @@ static WERROR ldb_get_default_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
        if (res->count == 0 || res->msgs[0]->num_elements == 0)
                return WERR_BADFILE;
 
-       reg_ldb_unpack_value(mem_ctx, lp_iconv_convenience(global_loadparm),
+       reg_ldb_unpack_value(mem_ctx, 
                 res->msgs[0], name, data_type, data);
 
        talloc_free(res);
@@ -351,8 +350,7 @@ static WERROR ldb_get_value_by_id(TALLOC_CTX *mem_ctx, struct hive_key *k,
        if (idx >= kd->value_count)
                return WERR_NO_MORE_ITEMS;
 
-       reg_ldb_unpack_value(mem_ctx, lp_iconv_convenience(global_loadparm),
-                        kd->values[idx], name, data_type, data);
+       reg_ldb_unpack_value(mem_ctx, kd->values[idx], name, data_type, data);
 
        return WERR_OK;
 }
@@ -385,8 +383,7 @@ static WERROR ldb_get_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
                if (res->count == 0)
                        return WERR_BADFILE;
 
-               reg_ldb_unpack_value(mem_ctx, lp_iconv_convenience(global_loadparm),
-                        res->msgs[0], NULL, data_type, data);
+               reg_ldb_unpack_value(mem_ctx, res->msgs[0], NULL, data_type, data);
 
                talloc_free(res);
        }
@@ -812,7 +809,6 @@ static WERROR ldb_get_key_info(TALLOC_CTX *mem_ctx,
                                uint32_t data_type;
                                DATA_BLOB data;
                                reg_ldb_unpack_value(mem_ctx, 
-                                                    lp_iconv_convenience(global_loadparm),
                                                     kd->values[i], NULL, 
                                                     &data_type, &data);
                                *max_valbufsize = MAX(*max_valbufsize, data.length);