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

« back to all changes in this revision

Viewing changes to mapiproxy/libmapistore/tests/mapistore_test.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:
23
23
#include "mapiproxy/libmapistore/mapistore_errors.h"
24
24
#include <talloc.h>
25
25
#include <core/ntstatus.h>
26
 
#include <samba/popt.h>
 
26
#include <popt.h>
27
27
#include <param.h>
28
28
#include <util/debug.h>
29
29
 
46
46
        uint32_t                        context_id = 0;
47
47
        uint32_t                        context_id2 = 0;
48
48
        uint32_t                        context_id3 = 0;
 
49
        void                            *root_folder;
49
50
 
50
51
        enum { OPT_DEBUG=1000 };
51
52
 
80
81
                exit (1);
81
82
        }
82
83
 
83
 
        mstore_ctx = mapistore_init(mem_ctx, NULL);
 
84
        mstore_ctx = mapistore_init(mem_ctx, lp_ctx, NULL);
84
85
        if (!mstore_ctx) {
85
86
                DEBUG(0, ("%s\n", mapistore_errstr(retval)));
86
87
                exit (1);
87
88
        }
88
89
 
89
 
        retval = mapistore_add_context(mstore_ctx, "test", "test", "sqlite:///tmp/test.db", &context_id);
 
90
        retval = mapistore_add_context(mstore_ctx, "openchange", "sqlite:///tmp/test.db", -1, &context_id, &root_folder);
90
91
        if (retval != MAPISTORE_SUCCESS) {
91
92
                DEBUG(0, ("%s\n", mapistore_errstr(retval)));
92
93
                exit (1);
93
94
        }
94
95
 
95
 
        retval = mapistore_add_context(mstore_ctx, "test", "test", "sqlite:///tmp/test2.db", &context_id2);
 
96
        retval = mapistore_add_context(mstore_ctx, "openchange", "sqlite:///tmp/test2.db", -1, &context_id2, &root_folder);
96
97
        if (retval != MAPISTORE_SUCCESS) {
97
98
                DEBUG(0, ("%s\n", mapistore_errstr(retval)));
98
99
                exit (1);
101
102
        DEBUG(0, ("Context ID: [1] = %d and [2] = %d\n", context_id, context_id2));
102
103
 
103
104
 
104
 
        retval = mapistore_add_context(mstore_ctx, "test", "test", "fsocpf:///tmp/fsocpf", &context_id3);
 
105
        retval = mapistore_add_context(mstore_ctx, "openchange", "fsocpf:///tmp/fsocpf", -1, &context_id3, &root_folder);
105
106
        if (retval != MAPISTORE_SUCCESS) {
106
107
                DEBUG(0, ("%s\n", mapistore_errstr(retval)));
107
108
                exit (1);