Hi, I am using Openchange 1.0 (hacked as per bug #391, though that should not be relevant here), and I can happily operate on the message store after a call to OpenMsgStore(). In order to get access to the OAB, I am trying to get OpenPublicFolder() to work.
I have tried several things, based on the notion of multisession support, but I could not get that to work (I'm not sure if that was ever really supported or not). ANyway, I decided to try to simply use a second session with code like this: ------------------------ // Log on if (MAPI_E_SUCCESS != MapiLogonEx(m_context, &m_session, profile.toUtf8(), NULL)) { error() << "cannot logon using profile" << profile << mapiError(); return false; } if (MAPI_E_SUCCESS != OpenMsgStore(m_session, m_store)) { error() << "cannot open message store" << mapiError(); return false; } MapiDebug debug(this, (0 != ENABLE_MAPI_DEBUG)); #if (ENABLE_PUBLIC_FOLDERS) kError() << "second login"; if (MAPI_E_SUCCESS != MapiLogonEx(m_context, &m_folderSession, profile.toUtf8(), NULL)) { error() << "cannot logon using profile" << profile << mapiError(); return false; } kError() << "open folder"; if (MAPI_E_SUCCESS != OpenPublicFolder(m_folderSession, m_folderStore)) { error() << "cannot open public folder" << mapiError(); return false; } #endif ------------------------ The first two 3 calls all seem to work fine, but with debugs emabled, the 4th call looks like this: ------------------------ akonadi_exgal_resource_22(14052): open folder EcDoRpc: struct EcDoRpc in: struct EcDoRpc handle : * handle: struct policy_handle handle_type : 0x00000000 (0) uuid : 690261a3-7e33-4e17-b5ee-cc7df51d6bf0 size : 0x0000fff0 (65520) offset : 0x00000000 (0) mapi_request : * mapi_len : 0x00000014 (20) length : 0x0010 (16) mapi_request: struct EcDoRpc_MAPI_REQ opnum : 0xfe (254) logon_id : 0x00 (0) handle_idx : 0x00 (0) u : union EcDoRpc_MAPI_REQ_UNION(case 254) mapi_Logon: struct Logon_req LogonFlags : 0x00 (0) 0: LogonPrivate 0: UnderCover 0: Ghosted 0: SpIProcess OpenFlags : 0x00000002 (2) 1: PUBLIC 0: HOME_LOGON 0: TAKE_OWNERSHIP 0: ALTERNATE_SERVER 0: IGNORE_HOME_MDB 0: NO_MAIL 0: USE_PER_MDB_REPLID_MAPPING StoreState : 0x00000000 (0) 0: STORE_HAS_SEARCHES EssDN : NULL mapi_request : (handles) number=1 handle : 0xffffffff (4294967295) length : * length : 0x0014 (20) max_data : 0xfff0 (65520) ndr_pull_error(11): Pull bytes 2 (../librpc/ndr/ndr_basic.c:103) Unable to ndr_pull structure for EcDoRpc - NT_STATUS_BUFFER_TOO_SMALL EcDoRpc: struct EcDoRpc in: struct EcDoRpc handle : * handle: struct policy_handle handle_type : 0x00000000 (0) uuid : 690261a3-7e33-4e17-b5ee-cc7df51d6bf0 size : 0x00007fff (32767) offset : 0x00000000 (0) mapi_request : * mapi_len : 0x00000014 (20) length : 0x0010 (16) mapi_request: struct EcDoRpc_MAPI_REQ opnum : 0xfe (254) logon_id : 0x00 (0) handle_idx : 0x00 (0) u : union EcDoRpc_MAPI_REQ_UNION(case 254) mapi_Logon: struct Logon_req LogonFlags : 0x00 (0) 0: LogonPrivate 0: UnderCover 0: Ghosted 0: SpIProcess OpenFlags : 0x00000002 (2) 1: PUBLIC 0: HOME_LOGON 0: TAKE_OWNERSHIP 0: ALTERNATE_SERVER 0: IGNORE_HOME_MDB 0: NO_MAIL 0: USE_PER_MDB_REPLID_MAPPING StoreState : 0x00000000 (0) 0: STORE_HAS_SEARCHES EssDN : NULL mapi_request : (handles) number=1 handle : 0xffffffff (4294967295) length : * length : 0x0014 (20) max_data : 0x7fff (32767) EcDoRpc: struct EcDoRpc out: struct EcDoRpc handle : * handle: struct policy_handle handle_type : 0x00000000 (0) uuid : 690261a3-7e33-4e17-b5ee-cc7df51d6bf0 size : 0x00007fff (32767) offset : 0x00000000 (0) mapi_response : * mapi_response : length=8 mapi_response: ARRAY(6) mapi_repl: struct EcDoRpc_MAPI_REPL opnum : 0xfe (254) handle_idx : 0x00 (0) error_code : MAPI_E_LOGON_FAILED (0x80040111) mapi_response : (handles) number=1 handle id : 0xffffffff (4294967295) length : * length : 0x000c (12) result : MAPI_E_SUCCESS (0x0) ------------------------ I'm guessing the MAPI_E_LOGON_FAILED is related to the earlier NT_STATUS_BUFFER_TOO_SMALL, but though I have tried stepping through libdcerpc-binding.so.0, it is not clear to me where this originates. Could there be some mismatch between either the request structure we populate and the server (or even SAMBA itself)? Alternatively, are there any known issues with public folders in 1.0? Thanks, Shaheed
_______________________________________________ devel mailing list devel@lists.openchange.org http://mailman.openchange.org/listinfo/devel