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

« back to all changes in this revision

Viewing changes to libmapi/IMAPITable.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:
72
72
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
73
73
                return retval;
74
74
 
75
 
        mem_ctx = talloc_named(NULL, 0, "SetColumns");
 
75
        mem_ctx = talloc_named(session, 0, "SetColumns");
76
76
        size = 0;
77
77
 
78
78
        /* Fill the SetColumns operation */
170
170
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
171
171
                return retval;
172
172
 
173
 
        mem_ctx = talloc_named(NULL, 0, "QueryPosition");
 
173
        mem_ctx = talloc_named(session, 0, "QueryPosition");
174
174
        size = 0;
175
175
 
176
176
        /* Fill the MAPI_REQ request */
267
267
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
268
268
                return retval;
269
269
 
270
 
        mem_ctx = talloc_named(NULL, 0, "QueryRows");
 
270
        mem_ctx = talloc_named(session, 0, "QueryRows");
271
271
        size = 0;
272
272
 
273
273
        /* Fill the QueryRows operation */
309
309
        reply = &mapi_response->mapi_repl->u.mapi_QueryRows;
310
310
        rowSet->cRows = reply->RowCount;
311
311
        rowSet->aRow = talloc_array((TALLOC_CTX *)table, struct SRow, rowSet->cRows);
312
 
        emsmdb_get_SRowSet((TALLOC_CTX *)rowSet->aRow, mapi_ctx->lp_ctx, rowSet, &table->proptags, &reply->RowData);
 
312
        emsmdb_get_SRowSet((TALLOC_CTX *)rowSet->aRow, rowSet, &table->proptags, &reply->RowData);
313
313
 
314
314
        talloc_free(mapi_response);
315
315
        talloc_free(mem_ctx);
360
360
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
361
361
                return retval;
362
362
 
363
 
        mem_ctx = talloc_named(NULL, 0, "QueryColumns");
 
363
        mem_ctx = talloc_named(session, 0, "QueryColumns");
364
364
 
365
365
        cols->cValues = 0;
366
366
        size = 0;
453
453
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
454
454
                return retval;
455
455
 
456
 
        mem_ctx = talloc_named(NULL, 0, "SeekRow");
 
456
        mem_ctx = talloc_named(session, 0, "SeekRow");
457
457
        *row = 0;
458
458
 
459
459
        /* Fill the SeekRow operation */
551
551
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
552
552
                return retval;
553
553
 
554
 
        mem_ctx = talloc_named(NULL, 0, "SeekRowBookmark");
 
554
        mem_ctx = talloc_named(session, 0, "SeekRowBookmark");
555
555
 
556
556
        /* Fill the SeekRowBookmark operation */
557
557
        size = 0;
654
654
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
655
655
                return retval;
656
656
 
657
 
        mem_ctx = talloc_named(NULL, 0, "SeekRowApprox");
 
657
        mem_ctx = talloc_named(session, 0, "SeekRowApprox");
658
658
        
659
659
        /* Fill the SeekRowApprox operation */
660
660
        size = 0;
737
737
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
738
738
                return retval;
739
739
 
740
 
        mem_ctx = talloc_named(NULL, 0, "CreateBookmark");      
 
740
        mem_ctx = talloc_named(session, 0, "CreateBookmark");   
741
741
        size = 0;
742
742
 
743
743
        /* Fill the MAPI_REQ request */
840
840
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
841
841
                return retval;
842
842
 
843
 
        mem_ctx = talloc_named(NULL, 0, "FreeBookmark");
 
843
        mem_ctx = talloc_named(session, 0, "FreeBookmark");
844
844
 
845
845
        while (bookmark) {
846
846
                if (bookmark->index == bkPosition) {
933
933
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
934
934
                return retval;
935
935
 
936
 
        mem_ctx = talloc_named(NULL, 0, "SortTable");
 
936
        mem_ctx = talloc_named(session, 0, "SortTable");
937
937
 
938
938
        /* Fill the SortTable operation */
939
939
        size = 0;
1008
1008
                        size += get_mapi_SRestriction_size((struct mapi_SRestriction *)&(res->res.resOr.res[i]));
1009
1009
                }
1010
1010
                break;
 
1011
        /* case RES_NOT: */
 
1012
        /*      size += get_mapi_SRestriction_size(res->res.resNot.res); */
 
1013
        /*      break; */
1011
1014
        case RES_CONTENT:
1012
1015
                size += sizeof (res->res.resContent.fuzzy);
1013
1016
                size += sizeof (res->res.resContent.ulPropTag);
1079
1082
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1080
1083
                return retval;
1081
1084
 
1082
 
        mem_ctx = talloc_named(NULL, 0, "Reset");
 
1085
        mem_ctx = talloc_named(session, 0, "Reset");
1083
1086
        size = 0;
1084
1087
 
1085
1088
        /* Fill the MAPI_REQ request */
1172
1175
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1173
1176
                return retval;
1174
1177
 
1175
 
        mem_ctx = talloc_named(NULL, 0, "Restrict");
 
1178
        mem_ctx = talloc_named(session, 0, "Restrict");
1176
1179
 
1177
1180
        /* Fill the Restrict operation */
1178
1181
        size = 0;
1292
1295
                OPENCHANGE_RETVAL_IF(retval, MAPI_E_INVALID_BOOKMARK, NULL);
1293
1296
        }
1294
1297
 
1295
 
        mem_ctx = talloc_named(NULL, 0, "FindRow");
 
1298
        mem_ctx = talloc_named(session, 0, "FindRow");
1296
1299
 
1297
1300
        /* Fill the FindRow operation */
1298
1301
        size = 0;
1346
1349
        reply = &mapi_response->mapi_repl->u.mapi_FindRow;
1347
1350
        SRowSet->cRows = 1;
1348
1351
        SRowSet->aRow = talloc_array((TALLOC_CTX *)table, struct SRow, SRowSet->cRows);
1349
 
        emsmdb_get_SRowSet((TALLOC_CTX *)table, mapi_ctx->lp_ctx, SRowSet, &table->proptags, &reply->row);
 
1352
        emsmdb_get_SRowSet((TALLOC_CTX *)table, SRowSet, &table->proptags, &reply->row);
1350
1353
 
1351
1354
        talloc_free(mapi_response);
1352
1355
        talloc_free(mem_ctx);
1405
1408
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1406
1409
                return retval;
1407
1410
 
1408
 
        mem_ctx = talloc_named(NULL, 0, "GetStatus");
 
1411
        mem_ctx = talloc_named(session, 0, "GetStatus");
1409
1412
        size = 0;
1410
1413
 
1411
1414
        /* Fill the MAPI_REQ request */
1482
1485
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1483
1486
                return retval;
1484
1487
 
1485
 
        mem_ctx = talloc_named(NULL, 0, "Abort");
 
1488
        mem_ctx = talloc_named(session, 0, "Abort");
1486
1489
        size = 0;
1487
1490
 
1488
1491
        /* Fill the MAPI_REQ request */
1591
1594
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1592
1595
                return retval;
1593
1596
 
1594
 
        mem_ctx = talloc_named(NULL, 0, "ExpandRow");
 
1597
        mem_ctx = talloc_named(session, 0, "ExpandRow");
1595
1598
        size = 0;
1596
1599
 
1597
1600
        /* Fill the ExpandRow operation */
1632
1635
        reply = &mapi_response->mapi_repl->u.mapi_ExpandRow;
1633
1636
        rowData->cRows = reply->RowCount;
1634
1637
        rowData->aRow = talloc_array((TALLOC_CTX *)table, struct SRow, reply->RowCount);
1635
 
        emsmdb_get_SRowSet((TALLOC_CTX *)table, mapi_ctx->lp_ctx, rowData, &table->proptags, &reply->RowData);
 
1638
        emsmdb_get_SRowSet((TALLOC_CTX *)table, rowData, &table->proptags, &reply->RowData);
1636
1639
        *expandedRowCount = reply->ExpandedRowCount;
1637
1640
 
1638
1641
        talloc_free(mapi_response);
1694
1697
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1695
1698
                return retval;
1696
1699
 
1697
 
        mem_ctx = talloc_named(NULL, 0, "CollapseRow");
 
1700
        mem_ctx = talloc_named(session, 0, "CollapseRow");
1698
1701
        size = 0;
1699
1702
 
1700
1703
        /* Fill the CollapseRow operation */
1788
1791
 
1789
1792
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1790
1793
                return retval;
1791
 
        mem_ctx = talloc_named(NULL, 0, "GetCollapseState");
 
1794
        mem_ctx = talloc_named(session, 0, "GetCollapseState");
1792
1795
        size = 0;
1793
1796
 
1794
1797
        /* Fill the GetCollapseState operation */
1864
1867
        struct mapi_response            *mapi_response;
1865
1868
        struct EcDoRpc_MAPI_REQ         *mapi_req;
1866
1869
        struct SetCollapseState_req     request;
1867
 
        struct SetCollapseState_repl    *reply;
1868
1870
        struct mapi_session             *session;
1869
1871
        NTSTATUS                        status;
1870
1872
        enum MAPISTATUS                 retval;
1883
1885
        if ((retval = mapi_object_get_logon_id(obj_table, &logon_id)) != MAPI_E_SUCCESS)
1884
1886
                return retval;
1885
1887
 
1886
 
        mem_ctx = talloc_named(NULL, 0, "SetCollapseState");
 
1888
        mem_ctx = talloc_named(session, 0, "SetCollapseState");
1887
1889
        size = 0;
1888
1890
 
1889
1891
        /* Fill the SetCollapseState operation */
1917
1919
 
1918
1920
        OPENCHANGE_CHECK_NOTIFICATION(session, mapi_response);
1919
1921
 
1920
 
        reply = &mapi_response->mapi_repl->u.mapi_SetCollapseState;
1921
 
 
1922
1922
        mapi_table = (mapi_object_table_t *)obj_table->private_data;
1923
1923
        OPENCHANGE_RETVAL_IF(!mapi_table, MAPI_E_INVALID_PARAMETER, mem_ctx);
1924
1924