~ubuntu-branches/debian/sid/openchange/sid

« back to all changes in this revision

Viewing changes to libmapi/mapi_id_array.c

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2012-04-12 20:07:57 UTC
  • mfrom: (11 sid)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20120412200757-k933d9trljmxj1l4
Tags: 1:1.0-4
* openchangeserver: Add dependency on openchangeproxy.
* Rebuild against newer version of Samba 4.
* Use dpkg-buildflags.
* Migrate to Git, update Vcs-Git header.
* Switch to debhelper 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
/**
31
31
   \details Initialize a mapi_id_array structure
32
32
 
33
 
   \param mapi_ctx pointer to the MAPI context
 
33
   \param mem_ctx pointer to the talloc context
34
34
   \param id pointer to a mapi_id_array structure
35
35
 
36
36
   \return MAPI_E_SUCCESS on success, otherwise MAPI error.
44
44
 
45
45
   \sa mapi_id_array_release
46
46
 */
47
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_init(struct mapi_context *mapi_ctx,
 
47
_PUBLIC_ enum MAPISTATUS mapi_id_array_init(TALLOC_CTX *mem_ctx,
48
48
                                            mapi_id_array_t *id)
49
49
{
50
 
        TALLOC_CTX      *mem_ctx;
51
 
 
52
50
        /* Sanity checks */
53
 
        OPENCHANGE_RETVAL_IF(!mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
 
51
        OPENCHANGE_RETVAL_IF(!mem_ctx, MAPI_E_NOT_INITIALIZED, NULL);
54
52
        OPENCHANGE_RETVAL_IF(!id, MAPI_E_INVALID_PARAMETER, NULL);
55
53
 
56
 
        mem_ctx = mapi_ctx->mem_ctx;
57
 
 
58
54
        id->count = 0;
59
 
        id->lpContainerList = talloc_zero((TALLOC_CTX *)mem_ctx, mapi_container_list_t);
60
 
        
 
55
        id->lpContainerList = talloc_zero(mem_ctx, mapi_container_list_t);
 
56
 
61
57
        return MAPI_E_SUCCESS;
62
58
}
63
59