diff options
author | Simo Sorce <idra@samba.org> | 2010-07-13 15:43:44 -0400 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-07-16 01:51:16 +0200 |
commit | 31b59bbf99835279a0a78858aca2f327150eb5e2 (patch) | |
tree | 7524b7fcca9218767737c10eba864b9579f4a43a /source3/rpc_parse | |
parent | 8246214e7ef5374acc0a1f97f4f1203374fba7f8 (diff) | |
download | samba-31b59bbf99835279a0a78858aca2f327150eb5e2.tar.gz samba-31b59bbf99835279a0a78858aca2f327150eb5e2.tar.bz2 samba-31b59bbf99835279a0a78858aca2f327150eb5e2.zip |
s3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index ec5bc9cf6a..f8ae8d1d64 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -31,7 +31,9 @@ **/ void prs_dump(const char *name, int v, prs_struct *ps) { - prs_dump_region(name, v, ps, ps->data_offset, ps->buffer_size); + prs_dump_region(name, v, + (uint8_t *)ps->data_p, + ps->data_offset, ps->buffer_size); } /** @@ -39,13 +41,15 @@ void prs_dump(const char *name, int v, prs_struct *ps) **/ void prs_dump_before(const char *name, int v, prs_struct *ps) { - prs_dump_region(name, v, ps, 0, ps->data_offset); + prs_dump_region(name, v, + (uint8_t *)ps->data_p, + 0, ps->data_offset); } /** * Dump everything from the start of the prs up to the current location. **/ -void prs_dump_region(const char *name, int v, prs_struct *ps, +void prs_dump_region(const char *name, int v, uint8_t *data_p, int from_off, int to_off) { int fd, i; @@ -66,7 +70,7 @@ void prs_dump_region(const char *name, int v, prs_struct *ps, if (fd != -1 || errno != EEXIST) break; } if (fd != -1) { - sz = write(fd, ps->data_p + from_off, to_off - from_off); + sz = write(fd, data_p + from_off, to_off - from_off); i = close(fd); if ( (sz != to_off-from_off) || (i != 0) ) { DEBUG(0,("Error writing/closing %s: %ld!=%ld %d\n", fname, (unsigned long)sz, (unsigned long)to_off-from_off, i )); |