s3:rpc_server: convert srvsvc to only use dbwrap wrapper functions
authorMichael Adam <obnox@samba.org>
Wed, 24 Aug 2011 22:49:17 +0000 (00:49 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Oct 2011 12:17:57 +0000 (14:17 +0200)
Avoid direct use of the db_record and db_context structs.

source3/rpc_server/srvsvc/srv_srvsvc_nt.c

index d7bec0360e950a28a48d4f61199172f167a18b72..5db268c1e631f3ac2f8a43bff689acf4ab7d15ce 100644 (file)
@@ -79,11 +79,14 @@ static int pipe_enum_fn( struct db_record *rec, void *p)
        int i = fenum->ctr3->count;
        char *fullpath = NULL;
        const char *username;
+       TDB_DATA value;
 
-       if (rec->value.dsize != sizeof(struct pipe_open_rec))
+       value = dbwrap_record_get_value(rec);
+
+       if (value.dsize != sizeof(struct pipe_open_rec))
                return 0;
 
-       memcpy(&prec, rec->value.dptr, sizeof(struct pipe_open_rec));
+       memcpy(&prec, value.dptr, sizeof(struct pipe_open_rec));
 
        if ( !process_exists(prec.pid) ) {
                return 0;