Ignore:
Timestamp:
Apr 25, 2007, 9:44:55 AM (14 years ago)
Author:
Paul Smedley
Message:

Code updated to Samba 3.0.25rc2 level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/rpc_parse/parse_prs.c

    r1 r30  
    14571457int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps)
    14581458{
    1459     TDB_DATA kbuf, dbuf;
    1460     kbuf.dptr = keystr;
    1461     kbuf.dsize = strlen(keystr)+1;
    1462     dbuf.dptr = ps->data_p;
    1463     dbuf.dsize = prs_offset(ps);
    1464     return tdb_trans_store(tdb, kbuf, dbuf, TDB_REPLACE);
     1459        TDB_DATA kbuf, dbuf;
     1460        kbuf.dptr = keystr;
     1461        kbuf.dsize = strlen(keystr)+1;
     1462        dbuf.dptr = ps->data_p;
     1463        dbuf.dsize = prs_offset(ps);
     1464        return tdb_trans_store(tdb, kbuf, dbuf, TDB_REPLACE);
    14651465}
    14661466
     
    14681468int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps, TALLOC_CTX *mem_ctx)
    14691469{
    1470     TDB_DATA kbuf, dbuf;
    1471     kbuf.dptr = keystr;
    1472     kbuf.dsize = strlen(keystr)+1;
    1473 
    1474     prs_init(ps, 0, mem_ctx, UNMARSHALL);
    1475 
    1476     dbuf = tdb_fetch(tdb, kbuf);
    1477     if (!dbuf.dptr)
    1478             return -1;
    1479 
    1480     prs_give_memory(ps, dbuf.dptr, dbuf.dsize, True);
    1481 
    1482     return 0;
    1483 } 
     1470        TDB_DATA kbuf, dbuf;
     1471        kbuf.dptr = keystr;
     1472        kbuf.dsize = strlen(keystr)+1;
     1473
     1474        prs_init(ps, 0, mem_ctx, UNMARSHALL);
     1475
     1476        dbuf = tdb_fetch(tdb, kbuf);
     1477        if (!dbuf.dptr)
     1478                return -1;
     1479
     1480        prs_give_memory(ps, dbuf.dptr, dbuf.dsize, True);
     1481
     1482        return 0;
     1483}
    14841484
    14851485/*******************************************************************
Note: See TracChangeset for help on using the changeset viewer.