uint32_t Denominator;
uint32_t i;
- mem_ctx = talloc_init("fetchappointment");
+ mem_ctx = talloc_named(NULL, 0, "fetchappointment");
/* Initialize MAPI */
profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
MAPI_RETVAL_IF(retval, retval, NULL);
/* Create the MAPI table view */
- mem_ctx = talloc_init("MAPI Table");
SPropTagArray = set_SPropTagArray(mem_ctx, 0x2, PR_FID, PR_MID);
retval = SetColumns(&obj_table, SPropTagArray);
MAPIFreeBuffer(SPropTagArray);
MAPI_RETVAL_IF(retval, retval, mem_ctx);
- talloc_free(mem_ctx);
/* Get current cursor position */
retval = QueryPosition(&obj_table, &Numerator, &Denominator);
/* Uninitialize MAPI */
MAPIUninitialize();
+
+ talloc_free(mem_ctx);
+
return (0);
}
uint32_t Denominator;
uint32_t i;
- mem_ctx = talloc_init("fetchmail");
+ mem_ctx = talloc_named(NULL, 0, "fetchmail");
/* Initialize MAPI */
profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB, getenv("HOME"));
char *profdb;
const char *profname;
- mem_ctx = talloc_init("mapi_sample1");
+ mem_ctx = talloc_named(NULL, 0, "mapi_sample1");
profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB_PATH, getenv("HOME"));
}
session::session(const std::string& profiledb, bool debug) throw(std::runtime_error, mapi_exception)
-: m_session(NULL), m_memory_ctx(talloc_init("libmapi++")), m_message_store(new message_store(*this))
+: m_session(NULL), m_memory_ctx(talloc_named(NULL, 0, "libmapi++")), m_message_store(new message_store(*this))
{
mapi_exception::fill_status_map();
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetLocalReplicaIds");
+ mem_ctx = talloc_named(NULL, 0, "GetLocalReplicaIds");
size = 0;
/* Fill the GetLocalReplicaIds operation */
session = mapi_object_get_session(obj_container);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetContentsTable");
+ mem_ctx = talloc_named(NULL, 0, "GetContentsTable");
size = 0;
/* Fill the GetContentsTable operation */
session = mapi_object_get_session(obj_container);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetHierarchyTable");
+ mem_ctx = talloc_named(NULL, 0, "GetHierarchyTable");
size = 0;
/* Fill the GetHierarchyTable operation */
session = mapi_object_get_session(obj_container);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetTable");
+ mem_ctx = talloc_named(NULL, 0, "GetTable");
size = 0;
/* Fill the GetTable operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetRulesTable");
+ mem_ctx = talloc_named(NULL, 0, "GetRulesTable");
size = 0;
/* Fill the GetRulesTable operation */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("ModifyTable");
+ mem_ctx = talloc_named(NULL, 0, "ModifyTable");
size = 0;
/* Fill the GetTable operation */
session = mapi_object_get_session(obj_container);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetSearchCriteria");
+ mem_ctx = talloc_named(NULL, 0, "SetSearchCriteria");
size = 0;
/* Fill the SetSearchCriteria operation */
session = mapi_object_get_session(obj_container);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetSearchCriteria");
+ mem_ctx = talloc_named(NULL, 0, "GetSearchCriteria");
size = 0;
/* Fill the GetSearchCriteria operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CreateMessage");
+ mem_ctx = talloc_named(NULL, 0, "CreateMessage");
size = 0;
/* Fill the OpenFolder operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("DeleteMessages");
+ mem_ctx = talloc_named(NULL, 0, "DeleteMessages");
size = 0;
/* Fill the DeleteMessages operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetMessageStatus");
+ mem_ctx = talloc_named(NULL, 0, "GetMessageStatus");
size = 0;
/* Fill the GetMessageStatus operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetMessageStatus");
+ mem_ctx = talloc_named(NULL, 0, "SetMessageStatus");
size = 0;
/* Fill the SetMessageStatus operation */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("MoveCopyMessages");
+ mem_ctx = talloc_named(NULL, 0, "MoveCopyMessages");
size = 0;
/* Fill the CopyMessage operation */
ulFolderType != FOLDER_SEARCH),
MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CreateFolder");
+ mem_ctx = talloc_named(NULL, 0, "CreateFolder");
size = 0;
/* Fill the CreateFolder operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("EmptyFolder");
+ mem_ctx = talloc_named(NULL, 0, "EmptyFolder");
size = 0;
/* Fill the EmptyFolder operation */
(!(DeleteFolderFlags & 0x10)),
MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("DeleteFolder");
+ mem_ctx = talloc_named(NULL, 0, "DeleteFolder");
size = 0;
/* Fill the DeleteFolder operation */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!session[2], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("MoveFolder");
+ mem_ctx = talloc_named(NULL, 0, "MoveFolder");
size = 0;
/* Fill the MoveFolder operation */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!session[2], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CopyFolder");
+ mem_ctx = talloc_named(NULL, 0, "CopyFolder");
size = 0;
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetReadFlags");
+ mem_ctx = talloc_named(NULL, 0, "SetReadFlags");
size = 0;
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetProps");
+ mem_ctx = talloc_named(NULL, 0, "GetProps");
/* Named property mapping */
nameid = mapi_nameid_new(mem_ctx);
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetProps");
+ mem_ctx = talloc_named(NULL, 0, "SetProps");
size = 0;
/* Named property mapping */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SaveChangesAttachment");
+ mem_ctx = talloc_named(NULL, 0, "SaveChangesAttachment");
size = 0;
/* Fill the SaveChangesAttachment operation */
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetPropList");
+ mem_ctx = talloc_named(NULL, 0, "GetPropList");
/* Reset */
proptags->cValues = 0;
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetPropsAll");
+ mem_ctx = talloc_named(NULL, 0, "GetPropsAll");
size = 0;
/* Fill the GetPropsAll operation */
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("DeleteProps");
+ mem_ctx = talloc_named(NULL, 0, "DeleteProps");
size = 0;
/* Fill the DeleteProps operation */
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("DeletePropertiesNoReplicate");
+ mem_ctx = talloc_named(NULL, 0, "DeletePropertiesNoReplicate");
size = 0;
/* Fill the DeletePropertiesNoReplicate operation */
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
/* Initialization */
- mem_ctx = talloc_init("GetNamesFromIDs");
+ mem_ctx = talloc_named(NULL, 0, "GetNamesFromIDs");
size = 0;
/* Fill the GetNamesFromIDs operation */
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
/* Initialization */
- mem_ctx = talloc_init("GetIDsFromNames");
+ mem_ctx = talloc_named(NULL, 0, "GetIDsFromNames");
size = 0;
/* Fill the GetIDsFromNames operation */
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
/* Initialization */
- mem_ctx = talloc_init("QueryNamesFromIDs");
+ mem_ctx = talloc_named(NULL, 0, "QueryNamesFromIDs");
size = 0;
/* Fill the QueryNamedProperties operation */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CopyProps");
+ mem_ctx = talloc_named(NULL, 0, "CopyProps");
size = 0;
/* Fill the CopyProperties operation */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CopyProps");
+ mem_ctx = talloc_named(NULL, 0, "CopyProps");
size = 0;
/* Fill the CopyProperties operation */
OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
OPENCHANGE_RETVAL_IF(!session->profile, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("OpenPublicFolder");
+ mem_ctx = talloc_named(NULL, 0, "OpenPublicFolder");
size = 0;
/* Fill the Logon operation */
OPENCHANGE_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
OPENCHANGE_RETVAL_IF(!session->profile, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("OpenMsgStore");
+ mem_ctx = talloc_named(NULL, 0, "OpenMsgStore");
size = 0;
if (!username) {
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("Subscribe");
+ mem_ctx = talloc_named(NULL, 0, "Subscribe");
/* Fill the Subscribe operation */
request.handle_idx = 0x1;
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetColumns");
+ mem_ctx = talloc_named(NULL, 0, "SetColumns");
size = 0;
/* Fill the SetColumns operation */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("QueryPosition");
+ mem_ctx = talloc_named(NULL, 0, "QueryPosition");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("QueryRows");
+ mem_ctx = talloc_named(NULL, 0, "QueryRows");
size = 0;
/* Fill the QueryRows operation */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!obj_table, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("QueryColumns");
+ mem_ctx = talloc_named(NULL, 0, "QueryColumns");
cols->cValues = 0;
size = 0;
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SeekRow");
+ mem_ctx = talloc_named(NULL, 0, "SeekRow");
*row = 0;
/* Fill the SeekRow operation */
retval = mapi_object_bookmark_find(obj_table, lpbkPosition, &bin);
OPENCHANGE_RETVAL_IF(retval, MAPI_E_INVALID_BOOKMARK, NULL);
- mem_ctx = talloc_init("SeekRowBookmark");
+ mem_ctx = talloc_named(NULL, 0, "SeekRowBookmark");
/* Fill the SeekRowBookmark operation */
size = 0;
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SeekRowApprox");
+ mem_ctx = talloc_named(NULL, 0, "SeekRowApprox");
/* Fill the SeekRowApprox operation */
size = 0;
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CreateBookmark");
+ mem_ctx = talloc_named(NULL, 0, "CreateBookmark");
size = 0;
/* Fill the MAPI_REQ request */
bookmark = table->bookmark;
OPENCHANGE_RETVAL_IF(!bookmark, MAPI_E_INVALID_BOOKMARK, NULL);
- mem_ctx = talloc_init("FreeBookmark");
+ mem_ctx = talloc_named(NULL, 0, "FreeBookmark");
while (bookmark) {
if (bookmark->index == bkPosition) {
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SortTable");
+ mem_ctx = talloc_named(NULL, 0, "SortTable");
/* Fill the SortTable operation */
size = 0;
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("Reset");
+ mem_ctx = talloc_named(NULL, 0, "Reset");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("Restrict");
+ mem_ctx = talloc_named(NULL, 0, "Restrict");
/* Fill the Restrict operation */
size = 0;
OPENCHANGE_RETVAL_IF(retval, MAPI_E_INVALID_BOOKMARK, NULL);
}
- mem_ctx = talloc_init("FindRow");
+ mem_ctx = talloc_named(NULL, 0, "FindRow");
/* Fill the FindRow operation */
size = 0;
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetStatus");
+ mem_ctx = talloc_named(NULL, 0, "GetStatus");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("Abort");
+ mem_ctx = talloc_named(NULL, 0, "Abort");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("ExpandRow");
+ mem_ctx = talloc_named(NULL, 0, "ExpandRow");
size = 0;
/* Fill the ExpandRow operation */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CollapseRow");
+ mem_ctx = talloc_named(NULL, 0, "CollapseRow");
size = 0;
/* Fill the CollapseRow operation */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetCollapseState");
+ mem_ctx = talloc_named(NULL, 0, "GetCollapseState");
size = 0;
/* Fill the GetCollapseState operation */
session = mapi_object_get_session(obj_table);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetCollapseState");
+ mem_ctx = talloc_named(NULL, 0, "SetCollapseState");
size = 0;
/* Fill the SetCollapseState operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CreateAttach");
+ mem_ctx = talloc_named(NULL, 0, "CreateAttach");
size = 0;
/* Fill the CreateAttach operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("DeleteAttach");
+ mem_ctx = talloc_named(NULL, 0, "DeleteAttach");
size = 0;
/* Fill the DeleteAttach operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetAttachmentTable");
+ mem_ctx = talloc_named(NULL, 0, "GetAttachmentTable");
size = 0;
/* Fill the GetAttachmentTable operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("OpenAttach");
+ mem_ctx = talloc_named(NULL, 0, "OpenAttach");
size = 0;
/* Fill the OpenAttach operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("ModifyRecipients");
+ mem_ctx = talloc_named(NULL, 0, "ModifyRecipients");
size = 0;
/* Fill the ModifyRecipients operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("ReadRecipients");
+ mem_ctx = talloc_named(NULL, 0, "ReadRecipients");
size = 0;
/* Fill the ReadRecipients operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("RemoveAllRecipients");
+ mem_ctx = talloc_named(NULL, 0, "RemoveAllRecipients");
size = 0;
/* Fill the RemoveAllRecipients operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SubmitMessage");
+ mem_ctx = talloc_named(NULL, 0, "SubmitMessage");
size = 0;
/* Fill the SubmitMessage operation */
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(session[0] != session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("AbortSubmit");
+ mem_ctx = talloc_named(NULL, 0, "AbortSubmit");
size = 0;
/* Fill the AbortSubmit operation */
OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SaveChangesMessage");
+ mem_ctx = talloc_named(NULL, 0, "SaveChangesMessage");
size = 0;
/* Fill the SaveChangesMessage operation */
session = mapi_object_get_session(obj_message);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("TransportSend");
+ mem_ctx = talloc_named(NULL, 0, "TransportSend");
size = 0;
/* Fill the MAPI_REQ request */
OPENCHANGE_RETVAL_IF(!session[0], MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!session[1], MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetMessageReadFlags");
+ mem_ctx = talloc_named(NULL, 0, "SetMessageReadFlags");
size = 0;
/* Fill the SetMessageReadFlags operation */
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("OpenFolder");
+ mem_ctx = talloc_named(NULL, 0, "OpenFolder");
/* Fill the OpenFolder operation */
request.handle_idx = 0x1;
folderId = mapi_object_get_id(obj_folder);
OPENCHANGE_RETVAL_IF(!folderId, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("PublicFolderIsGhosted");
+ mem_ctx = talloc_named(NULL, 0, "PublicFolderIsGhosted");
size = 0;
/* Fill the PublicFolderIsGhosted operation */
session = mapi_object_get_session(obj_folder);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("OpenPublicFolderByName");
+ mem_ctx = talloc_named(NULL, 0, "OpenPublicFolderByName");
size = 0;
/* Fill the OpenPublicFolderByName operation */
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetReceiveFolder");
+ mem_ctx = talloc_named(NULL, 0, "SetReceiveFolder");
/* Fill the SetReceiveFolder operation */
size = 0;
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetReceiveFolder");
+ mem_ctx = talloc_named(NULL, 0, "GetReceiveFolder");
*id_folder = 0;
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetReceiveFolderTable");
+ mem_ctx = talloc_named(NULL, 0, "GetReceiveFolderTable");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetTransportFolder");
+ mem_ctx = talloc_named(NULL, 0, "GetTransportFolder");
size = 0;
/* Fill the MAPI_REQ request */
FolderId = mapi_object_get_id(obj_folder);
OPENCHANGE_RETVAL_IF(!FolderId, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetOwningServers");
+ mem_ctx = talloc_named(NULL, 0, "GetOwningServers");
size = 0;
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetStoreState");
+ mem_ctx = talloc_named(NULL, 0, "GetStoreState");
size = 0;
/* Fill the MAPI_REQ request */
OPENCHANGE_RETVAL_IF(!profile, MAPI_E_BAD_VALUE, NULL);
OPENCHANGE_RETVAL_IF(!value, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("mapi_profile_add_string_attr");
+ mem_ctx = talloc_named(NULL, 0, "mapi_profile_add_string_attr");
ldb_ctx = global_mapi_ctx->ldb_ctx;
/* Retrieve the profile from the database */
OPENCHANGE_RETVAL_IF(!profname, MAPI_E_BAD_VALUE, NULL);
ldb_ctx = global_mapi_ctx->ldb_ctx;
- mem_ctx = talloc_init("mapi_profile_modify_string_attr");
+ mem_ctx = talloc_named(NULL, 0, "mapi_profile_modify_string_attr");
/* Retrieve the profile from the database */
ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profname);
OPENCHANGE_RETVAL_IF(!profname, MAPI_E_BAD_VALUE, NULL);
ldb_ctx = global_mapi_ctx->ldb_ctx;
- mem_ctx = talloc_init("mapi_profile_delete_string_attr");
+ mem_ctx = talloc_named(NULL, 0, "mapi_profile_delete_string_attr");
/* Retrieve the profile from the database */
ret = ldb_search(ldb_ctx, mem_ctx, &res, ldb_get_default_basedn(ldb_ctx), scope, attrs, "(cn=%s)(cn=Profiles)", profname);
OPENCHANGE_RETVAL_IF(!profiledb, MAPI_E_CALL_FAILED, NULL);
OPENCHANGE_RETVAL_IF(!ldif_path, MAPI_E_CALL_FAILED, NULL);
- mem_ctx = talloc_init("CreateProfileStore");
+ mem_ctx = talloc_named(NULL, 0, "CreateProfileStore");
ev = tevent_context_init(mem_ctx);
OPENCHANGE_RETVAL_IF(!ev, MAPI_E_NOT_ENOUGH_RESOURCES, mem_ctx);
OPENCHANGE_RETVAL_IF(!global_mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("CreateProfile");
+ mem_ctx = talloc_named(NULL, 0, "CreateProfile");
retval = ldb_create_profile(mem_ctx, global_mapi_ctx->ldb_ctx, profile);
OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
OPENCHANGE_RETVAL_IF(!global_mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("DeleteProfile");
+ mem_ctx = talloc_named(NULL, 0, "DeleteProfile");
retval = ldb_delete_profile(mem_ctx, global_mapi_ctx->ldb_ctx, profile);
OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
talloc_free(mem_ctx);
if (!profile || !old_password | !password) return MAPI_E_INVALID_PARAMETER;
- mem_ctx = talloc_init("ChangeProfilePassword");
+ mem_ctx = talloc_named(NULL, 0, "ChangeProfilePassword");
retval = ldb_test_password(mem_ctx, profile, password);
OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
OPENCHANGE_RETVAL_IF(!global_mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
OPENCHANGE_RETVAL_IF(!profname, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetDefaultProfile");
+ mem_ctx = talloc_named(NULL, 0, "SetDefaultProfile");
/* open profile */
retval = ldb_load_profile(mem_ctx, global_mapi_ctx->ldb_ctx, &profile, profname, NULL);
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("OpenMessage");
+ mem_ctx = talloc_named(NULL, 0, "OpenMessage");
/* Fill the OpenMessage operation */
request.handle_idx = 0x1;
OPENCHANGE_RETVAL_IF(!global_mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("OpenStream");
+ mem_ctx = talloc_named(NULL, 0, "OpenStream");
size = 0;
OPENCHANGE_RETVAL_IF(!global_mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("ReadStream");
+ mem_ctx = talloc_named(NULL, 0, "ReadStream");
*ByteRead = 0;
size = 0;
OPENCHANGE_RETVAL_IF(!blob, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(blob->length > 0x7000, MAPI_E_TOO_BIG, NULL);
- mem_ctx = talloc_init("WriteStream");
+ mem_ctx = talloc_named(NULL, 0, "WriteStream");
size = 0;
OPENCHANGE_RETVAL_IF(!obj_stream, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CommitStream");
+ mem_ctx = talloc_named(NULL, 0, "CommitStream");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_stream);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetStreamSize");
+ mem_ctx = talloc_named(NULL, 0, "GetStreamSize");
size = 0;
/* Fill the MAPI_REQ request */
OPENCHANGE_RETVAL_IF((Origin > 2), MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!NewPosition, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SeekStream");
+ mem_ctx = talloc_named(NULL, 0, "SeekStream");
size = 0;
/* Fill the SeekStream operation */
session = mapi_object_get_session(obj_stream);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetStreamSize");
+ mem_ctx = talloc_named(NULL, 0, "SetStreamSize");
size = 0;
/* Fill the SetStreamSize operation */
OPENCHANGE_RETVAL_IF(!ReadByteCount, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!WrittenByteCount, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("CopyToStream");
+ mem_ctx = talloc_named(NULL, 0, "CopyToStream");
size = 0;
/* Fill the CopyToStream operation */
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("Release");
+ mem_ctx = talloc_named(NULL, 0, "Release");
/* Fill the MAPI_REQ request */
mapi_req = talloc_zero(mem_ctx, struct EcDoRpc_MAPI_REQ);
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("LongTermIdFromId");
+ mem_ctx = talloc_named(NULL, 0, "LongTermIdFromId");
/* Fill the LongTermIdFromId operation */
request.Id = id;
session = mapi_object_get_session(obj);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("IdFromLongTermId");
+ mem_ctx = talloc_named(NULL, 0, "IdFromLongTermId");
size = 0;
/* Fill the IdFromLongTermId operation */
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("AddressTypes");
+ mem_ctx = talloc_named(NULL, 0, "AddressTypes");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SetSpooler");
+ mem_ctx = talloc_named(NULL, 0, "SetSpooler");
size = 0;
/* Fill the MAPI_REQ request */
session = mapi_object_get_session(obj_store);
OPENCHANGE_RETVAL_IF(!session, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("SpoolerLockMessage");
+ mem_ctx = talloc_named(NULL, 0, "SpoolerLockMessage");
size = 0;
/* Fill the SpoolerLockMessage operation */
OPENCHANGE_RETVAL_IF(global_mapi_ctx, MAPI_E_SESSION_LIMIT, NULL);
OPENCHANGE_RETVAL_IF(!profiledb, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("MAPIInitialize");
+ mem_ctx = talloc_named(NULL, 0, "MAPIInitialize");
OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
/* global context */
session = (struct mapi_session *)global_mapi_ctx->session;
emsmdb_ctx = (struct emsmdb_context *)session->emsmdb->ctx;
notify_ctx = (struct mapi_notify_ctx *)session->notify_ctx;
- mem_ctx = talloc_init("emsmdb_register_notification");
+ mem_ctx = talloc_named(NULL, 0, "emsmdb_register_notification");
request.in.handle = &emsmdb_ctx->handle;
request.in.ulEventMask = ulEventMask;
proptag = get_proptag_name(lpProp.ulPropTag);
if (!proptag) {
- mem_ctx = talloc_init("mapidump_SPropValue");
+ mem_ctx = talloc_named(NULL, 0, "mapidump_SPropValue");
proptag = talloc_asprintf(mem_ctx, "0x%.8x", lpProp.ulPropTag);
}
const struct FILETIME *filetime;
const char *date;
- mem_ctx = talloc_init("mapidump_date");
+ mem_ctx = talloc_named(NULL, 0, "mapidump_date");
filetime = (const struct FILETIME *) find_mapi_SPropValue_data(properties, mapitag);
if (filetime) {
const struct FILETIME *filetime;
const char *date;
- mem_ctx = talloc_init("mapidump_date_SPropValue");
+ mem_ctx = talloc_named(NULL, 0, "mapidump_date_SPropValue");
filetime = (const struct FILETIME *) get_SPropValue_data(&lpProp);
if (filetime) {
NTTIME time;
const char *date;
- mem_ctx = talloc_init("mapidump_freebusy_date");
+ mem_ctx = talloc_named(NULL, 0, "mapidump_freebusy_date");
time = t;
time *= 60;
/* Sanity Checks */
OPENCHANGE_RETVAL_IF(!nspi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("nspi_QueryRows");
+ mem_ctx = talloc_named(NULL, 0, "nspi_QueryRows");
r.in.handle = &nspi_ctx->handle;
r.in.dwFlags = 0x0;
OPENCHANGE_RETVAL_IF(!ppRows, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!ppOutMIds, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("nspi_GetMatches");
+ mem_ctx = talloc_named(NULL, 0, "nspi_GetMatches");
r.in.handle = &nspi_ctx->handle;
r.in.Reserved = 0;
OPENCHANGE_RETVAL_IF(((SortType != SortTypeDisplayName) && (SortType != SortTypePhoneticDisplayName)),
MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("nspi_ResortRestriction");
+ mem_ctx = talloc_named(NULL, 0, "nspi_ResortRestriction");
r.in.handle = &nspi_ctx->handle;
r.in.Reserved = 0;
OPENCHANGE_RETVAL_IF(!ppNames, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!ppPropTags, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("nspi_GetIDsFromNames");
+ mem_ctx = talloc_named(NULL, 0, "nspi_GetIDsFromNames");
r.in.handle = &nspi_ctx->handle;
r.in.Reserved = 0;
for (count = 0; usernames[count]; count++);
OPENCHANGE_RETVAL_IF(!count, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("nspi_ResolveNames");
+ mem_ctx = talloc_named(NULL, 0, "nspi_ResolveNames");
r.in.handle = &nspi_ctx->handle;
for (count = 0; usernames[count]; count++);
OPENCHANGE_RETVAL_IF(!count, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("mapi_ResolveNamesW");
+ mem_ctx = talloc_named(NULL, 0, "mapi_ResolveNamesW");
r.in.handle = &nspi_ctx->handle;
uint16_t count;
uint32_t i;
- mem_ctx = talloc_init("mapi_SPropValue_array_named");
+ mem_ctx = talloc_named(NULL, 0, "mapi_SPropValue_array_named");
for (i = 0; i < props->cValues; i++) {
if ((props->lpProps[i].ulPropTag & 0xFFFF0000) > 0x80000000) {
store = (mapi_object_store_t *)obj_store->private_data;
OPENCHANGE_RETVAL_IF(!store, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("GetDefaultFolder");
+ mem_ctx = talloc_named(NULL, 0, "GetDefaultFolder");
mapi_object_init(&obj_inbox);
retval = GetReceiveFolder(obj_store, &id_inbox, NULL);
OPENCHANGE_RETVAL_IF(!unread, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!total, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("GetFolderItemsCount");
+ mem_ctx = talloc_named(NULL, 0, "GetFolderItemsCount");
SPropTagArray = set_SPropTagArray(mem_ctx, 0x2,
PR_CONTENT_UNREAD,
OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("AddUserPermission");
+ mem_ctx = talloc_named(NULL, 0, "AddUserPermission");
/* query Address book */
OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("ModifyUserPermission");
+ mem_ctx = talloc_named(NULL, 0, "ModifyUserPermission");
SPropTagArray = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
names[0] = username;
OPENCHANGE_RETVAL_IF(!obj_folder, MAPI_E_INVALID_PARAMETER, NULL);
OPENCHANGE_RETVAL_IF(!username, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("RemoveUserPermission");
+ mem_ctx = talloc_named(NULL, 0, "RemoveUserPermission");
SPropTagArray = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
names[0] = username;
dom_sid = mapiadmin_ctx->user_ctx->user_sid;
/* initialize memory context */
- mem_ctx = talloc_init("mapiadmin_user_extend");
+ mem_ctx = talloc_named(NULL, 0, "mapiadmin_user_extend");
/* open LDAP connection */
ev = tevent_context_init(talloc_autofree_context());
struct lsa_String name;
int policy_min_pw_len = 0;
- mem_ctx = talloc_init("mapiadmin_user_add");
+ mem_ctx = talloc_named(NULL, 0, "mapiadmin_user_add");
retval = mapiadmin_samr_connect(mapiadmin_ctx, mem_ctx);
MAPI_RETVAL_IF(retval, retval, mem_ctx);
MAPI_RETVAL_IF(!mapiadmin_ctx, MAPI_E_NOT_INITIALIZED, NULL);
MAPI_RETVAL_IF(!mapiadmin_ctx->username, MAPI_E_NOT_INITIALIZED, NULL);
- mem_ctx = talloc_init("mapiadmin_user_del");
+ mem_ctx = talloc_named(NULL, 0, "mapiadmin_user_del");
/* Initiate SAMR connection if not already done */
if (!mapiadmin_ctx->user_ctx) {
if (ocpf) return OCPF_ERROR;
- mem_ctx = talloc_init("ocpf");
+ mem_ctx = talloc_named(NULL, 0, "ocpf");
ocpf = talloc_zero(mem_ctx, struct ocpf);
ocpf->mem_ctx = mem_ctx;
ocpf->vars = talloc_zero(mem_ctx, struct ocpf_var);
if (emsabp_tdb_ctx) return emsabp_tdb_ctx;
- mem_ctx = talloc_init("mapiproxy_server_emsabp_tdb_init");
+ mem_ctx = talloc_named(NULL, 0, "mapiproxy_server_emsabp_tdb_init");
if (!mem_ctx) return NULL;
/* Step 0. Retrieve a TDB context pointer on the emsabp_tdb database */
/* Sanity Checks */
if (!lp_ctx) return NULL;
- mem_ctx = talloc_init("emsmdbp_init");
+ mem_ctx = talloc_named(NULL, 0, "emsmdbp_init");
emsmdbp_ctx = talloc_zero(mem_ctx, struct emsmdbp_context);
if (!emsmdbp_ctx) {
/* Sanity checks */
if (!lp_ctx) return NULL;
- mem_ctx = talloc_init("emsabp_init");
+ mem_ctx = talloc_named(NULL, 0, "emsabp_init");
emsabp_ctx = talloc_zero(mem_ctx, struct emsabp_context);
if (!emsabp_ctx) {
char *value_str = NULL;
uint32_t *MId = (uint32_t *)state;
- mem_ctx = talloc_init("emsabp_tdb_traverse_MId");
+ mem_ctx = talloc_named(NULL, 0, "emsabp_tdb_traverse_MId");
value_str = talloc_strndup(mem_ctx, (char *)dbuf.dptr, dbuf.dsize);
value = strtol((const char *)value_str, NULL, 16);
talloc_free(mem_ctx);
OPENCHANGE_RETVAL_IF(!tdb_ctx, MAPI_E_NOT_INITIALIZED, NULL);
OPENCHANGE_RETVAL_IF(!keyname, MAPI_E_INVALID_PARAMETER, NULL);
- mem_ctx = talloc_init("emsabp_tdb_insert");
+ mem_ctx = talloc_named(NULL, 0, "emsabp_tdb_insert");
OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
/* Step 1. Check if the record already exists */
uint32_t halfcount;
/* init torture test */
- mem_ctx = talloc_init("torture_rpc_mapi_bookmark");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_bookmark");
if ((session = torture_init_mapi(mem_ctx, torture->lp_ctx)) == NULL) return false;
/* Open Message Store */
const char **usernames;
uint32_t index = 0;
- mem_ctx = talloc_init("torture_simplemail");
+ mem_ctx = talloc_named(NULL, 0, "torture_simplemail");
session = mapi_object_get_session(obj_parent);
MAPI_RETVAL_IF(!session, MAPI_E_NOT_INITIALIZED, NULL);
int i;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_copymail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_copymail");
status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
}
/* init mapi */
- mem_ctx = talloc_init("torture_mapi_createuser");
+ mem_ctx = talloc_named(NULL, 0, "torture_mapi_createuser");
retval = torture_load_profile(mem_ctx, torture->lp_ctx, &session);
if (retval != MAPI_E_SUCCESS) return false;
uint32_t i;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_criteria");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_criteria");
ntstatus = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(ntstatus)) {
talloc_free(mem_ctx);
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_deletemail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_deletemail");
/* init mapi */
if ((session = torture_init_mapi(mem_ctx, torture->lp_ctx)) == NULL) return false;
struct SPropTagArray *SPropTagArray;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchappointment");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchappointment");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
uint32_t sz_attach;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchattach");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchattach");
/* init mapi */
if ((session = torture_init_mapi(mem_ctx, torture->lp_ctx)) == NULL) return false;
struct SPropTagArray *SPropTagArray;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchmail");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchmail");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
struct SPropTagArray *SPropTagArray;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchtasks");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchtasks");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
uint32_t cn_propvals;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_namedprops");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_namedprops");
status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
uint32_t ulConnection;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_newmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_newmail");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
const char *username = lp_parm_string(torture->lp_ctx, NULL, "mapi", "username");
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_permissions");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_permissions");
ntstatus = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(ntstatus)) {
talloc_free(mem_ctx);
uint32_t j;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_recipient");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_recipient");
ntstatus = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(ntstatus)) {
talloc_free(mem_ctx);
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_restrictions");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_restrictions");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
if (!start || !end) return false;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_sendappointment");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_sendappointment");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
}
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_sendmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_sendmail");
/* init mapi */
if ((session = torture_init_mapi(mem_ctx, torture->lp_ctx)) == NULL) return false;
if (!cardname) return false;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchmail");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_sendmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_sendmail");
/* init mapi */
if ((session = torture_init_mapi(mem_ctx, torture->lp_ctx)) == NULL) return false;
uint32_t msgflag;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_sendmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_sendmail");
/* get the attachment filename */
if (!filename) {
if (!task) return false;
/* init torture */
- mem_ctx = talloc_init("torture_rpc_mapi_fetchmail");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_fetchmail");
nt_status = torture_rpc_connection(torture, &p, &ndr_table_exchange_emsmdb);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
uint32_t i;
/* init torture test */
- mem_ctx = talloc_init("torture_rpc_mapi_sorttable");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_sorttable");
if ((session = torture_init_mapi(mem_ctx, torture->lp_ctx)) == NULL) return false;
/* Open Message Store*/
const char *username = NULL;
uint32_t instance_key = 0;
- mem_ctx = talloc_init("torture_rpc_nspi_profile");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_nspi_profile");
status = torture_rpc_connection(torture, &p, &ndr_table_exchange_nsp);
char **usernames;
int j;
- mem_ctx = talloc_init("torture_rpc_nspi_resolvenames");
+ mem_ctx = talloc_named(NULL, 0, "torture_rpc_nspi_resolvenames");
if (!username) {
DEBUG(0,("Specify the usernames to resolve with exchange:resolvename\n"));
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
- mem_ctx = talloc_init("openchangemapidump");
+ mem_ctx = talloc_named(NULL, 0, "openchangemapidump");
pc = poptGetContext("openchangemapidump", argc, argv, long_options, 0);
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
- mem_ctx = talloc_init("exchange2ical");
+ mem_ctx = talloc_named(NULL, 0, "exchange2ical");
exchange2ical_init(mem_ctx, &exchange2ical);
pc = poptGetContext("exchange2ical", argc, argv, long_options, 0);
{ NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
};
- mem_ctx = talloc_init("exchange2mbox");
+ mem_ctx = talloc_named(NULL, 0, "exchange2mbox");
pc = poptGetContext("exchange2mbox", argc, argv, long_options, 0);
TALLOC_CTX *mem_ctx;
struct mapi_profile profile;
- mem_ctx = talloc_init("mapiprofile_create");
+ mem_ctx = talloc_named(NULL, 0, "mapiprofile_create");
/* catch CTRL-C */
g_profname = profname;
{ NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
};
- mem_ctx = talloc_init("mapiprofile");
+ mem_ctx = talloc_named(NULL, 0, "mapiprofile");
pc = poptGetContext("mapiprofile", argc, argv, long_options, 0);
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
- mem_ctx = talloc_init("mapitest");
+ mem_ctx = talloc_named(NULL, 0, "mapitest");
mapitest_init(mem_ctx, &mt);
mapitest_register_modules(&mt);
mapitest_print(mt, "* %-35s: [SUCCESS]\n", "Step 1 - MAPI_E_NOT_INITIALIZED");
}
- mem_ctx = talloc_init("MAPITEST_ERRORCHECKS_SIMPLEMAPI");
+ mem_ctx = talloc_named(NULL, 0, "MAPITEST_ERRORCHECKS_SIMPLEMAPI");
make_global_ctx_valid(mem_ctx);
status = GetDefaultPublicFolder(obj_store, folder, id);
if (!filename || !size) return false;
- mem_ctx = talloc_init("store_attachment");
+ mem_ctx = talloc_named(NULL, 0, "store_attachment");
mapi_object_init(&obj_stream);
if ((fd = open(oclient->store_folder, O_DIRECTORY)) == -1) {
const char *attach_filename;
const uint32_t *attach_size;
- mem_ctx = talloc_init("openchangeclient_fetchmail");
+ mem_ctx = talloc_named(NULL, 0, "openchangeclient_fetchmail");
mapi_object_init(&obj_tis);
mapi_object_init(&obj_inbox);
uint32_t i;
char *id;
- mem_ctx = talloc_init("openchangeclient_findmail");
+ mem_ctx = talloc_named(NULL, 0, "openchangeclient_findmail");
/* Get Inbox folder */
retval = GetDefaultFolder(obj_store, &fid, olFolderInbox);
{NULL, 0, 0, NULL, 0, NULL, NULL}
};
- mem_ctx = talloc_init("openchangeclient");
+ mem_ctx = talloc_named(NULL, 0, "openchangeclient");
init_oclient(&oclient);
{ NULL, 0, POPT_ARG_NONE, NULL, 0, NULL, NULL }
};
- mem_ctx = talloc_init("openchangepfadmin");
+ mem_ctx = talloc_named(NULL, 0, "openchangepfadmin");
pc = poptGetContext("openchangepfadmin", argc, argv, long_options, 0);
usage();
}
- mem_ctx = talloc_init("SchemaIDGUID");
+ mem_ctx = talloc_named(NULL, 0, "SchemaIDGUID");
blob = data_blob_talloc(mem_ctx, argv[1], strlen(argv[1])+1);
blob.length = ldb_base64_decode((char *)blob.data);