return MAPISTORE_ERROR;
}
- mem_ctx = talloc_named(NULL, 0, "fsocpf_op_get_fid_by_name");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 2. Iterate over the contents of the parent folder, searching for a matching name */
rewinddir(folder->dir);
char *propfile;
uint32_t i;
- mem_ctx = talloc_named(NULL, 0, "fsocpf_set_folder_props");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Create the array of mapi properties */
mapi_lpProps.lpProps = talloc_array(mem_ctx, struct mapi_SPropValue, aRow->cValues);
return MAPISTORE_ERR_NO_DIRECTORY;
}
- mem_ctx = talloc_named(NULL, 0, "fsocpf_op_mkdir");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 2. Stringify fid and create directory */
newfolder = talloc_asprintf(mem_ctx, "%s/%s", folder->uri, folder_name);
el = fsocpf_find_folder(fsocpf_ctx, folder_uri);
MAPISTORE_RETVAL_IF(!el, MAPISTORE_ERR_NO_DIRECTORY, NULL);
- mem_ctx = talloc_named(NULL, 0, "fsocpf_op_mkdir");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 3. Remove .properties file */
propertiespath = talloc_asprintf(mem_ctx, "%s/.properties", folder_uri);
MAPISTORE_RETVAL_IF(!folder, MAPISTORE_ERR_NO_DIRECTORY, NULL);
}
- mem_ctx = talloc_named(NULL, 0, "fsocpf_op_opendir");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Read the directory and search for the fid to open */
MSTORE_DEBUG_INFO(MSTORE_LEVEL_DEBUG, "Looking for '%s'\n", folder_uri);
return retval;
}
- mem_ctx = talloc_named(NULL, 0, "mstoredb_op_mkdir");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 2. Generate the URI for the folder */
retval = mapistore_strip_ns_from_uri(parent_uri, &stripped_uri);
}
/* Step 2. Create the user store entry within the mapistore database */
- mem_ctx = talloc_named(NULL, 0, "mapistoredb_register_new_mailbox");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
user_store_ldif = talloc_asprintf(mem_ctx, MDB_USER_STORE_LDIF_TMPL,
username, firstorgdn, username);
if (write_ldif_string_to_store(mdb_ctx, user_store_ldif) == false) {
ret = stat(mapistore_get_named_properties_database_path(), &sb);
MAPISTORE_RETVAL_IF(ret == -1, MAPISTORE_ERR_DATABASE_INIT, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistoredb_namedprops_provision");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
/* Step 1. Retrieve the path to the LDIF file */
retval = mapistore_namedprops_get_default_id(mdb_ctx->mstore_ctx, MAPISTORE_NAMEDPROPS_EXTERNAL, &ext_index);
MAPISTORE_RETVAL_IF(retval, retval, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistoredb_namedprops_provision_backend");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
/* Step 2. Process and retrieved updated LDIF data */
MAPISTORE_RETVAL_IF(retval, retval, NULL);
/* Step 3. Create the LDIF */
- mem_ctx = talloc_named(NULL, 0, "mapistore_namedprops_provision_user");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
ldif = talloc_asprintf(mem_ctx, MDB_NPROPS_USER_LDIF, username, mapped_index, username);
}
/* Step 2. Otherwise create a new context */
- mem_ctx = talloc_named(NULL, 0, "mapistore_indexing_context_add");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
mictx = talloc_zero(mstore_ctx->mapistore_indexing_list, struct mapistore_indexing_context_list);
dbpath = talloc_asprintf(mem_ctx, MAPISTORE_INDEXING_DBPATH_TMPL,
ictx = mapistore_indexing_search(mstore_ctx, username);
MAPISTORE_RETVAL_IF(ictx, MAPISTORE_SUCCESS, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_indexing_init");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
ictx = talloc_zero(mstore_ctx->indexing_list, struct indexing_context_list);
/* Step 1. Open/Create the indexing database */
/* Step 1. Perform Sanity Checks on URI */
MAPISTORE_RETVAL_IF(!uri || strlen(uri) < 4, MAPISTORE_ERR_INVALID_NAMESPACE, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_add_context");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
uri_namespace = talloc_strdup(mem_ctx, uri);
namespace_start = uri_namespace;
uri_namespace= strchr(uri_namespace, ':');
MAPISTORE_RETVAL_IF(!dflt_id, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
ldb_ctx = mstore_ctx->mapistore_nprops_ctx;
- mem_ctx = talloc_named(NULL, 0, "mapistore_namedprops_get_default_id");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
/* Step 1. Retrieve the internal/external record */
MAPISTORE_RETVAL_IF(!mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
ldb_ctx = mstore_ctx->mapistore_nprops_ctx;
- mem_ctx = talloc_named(NULL, 0, "mapistore_namedprops_check_id");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
/* Step 1. Retrieve the internal/external record */
MAPISTORE_RETVAL_IF(!propID, MAPISTORE_ERROR, NULL);
*propID = 0;
- mem_ctx = talloc_named(NULL, 0, "mapistore_namedprops_get_mapped_propID");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
guid = GUID_string(mem_ctx, (const struct GUID *)&nameid.lpguid);
switch (nameid.ulKind) {
MAPISTORE_RETVAL_IF(!mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_namedprops_user_exist");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
ldb_ctx = mstore_ctx->mapistore_nprops_ctx;
ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx),
pctx->mapping_ctx = talloc_zero(pctx, struct id_mapping_context);
MAPISTORE_RETVAL_IF(!pctx->mapping_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_init_mapping_context");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 1. Retrieve the mapistore database path */
db_path = mapistore_get_database_path();
f = fopen(ldif_path, "r");
MAPISTORE_RETVAL_IF(!f, MAPISTORE_ERR_DATABASE_INIT, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_ldb_write_ldif_file_to_store");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
while ((ldif = ldb_ldif_read_file(ldb_ctx, f))) {
struct ldb_message *normalized_msg;
MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
MAPISTORE_RETVAL_IF(!fmid, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_get_new_fmid");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 1. Retrieve the server object */
ldb_ctx = pctx->mapping_ctx->ldb_ctx;
MAPISTORE_RETVAL_IF(!pctx->mapping_ctx->ldb_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
MAPISTORE_RETVAL_IF(!range_start || !range_end, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_named(NULL, 0, "mapistore_get_next_range");
+ mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
/* Step 1. Retrieve the user store object */
ldb_ctx = pctx->mapping_ctx->ldb_ctx;