summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_net.c2
-rw-r--r--source3/rpc_parse/parse_prs.c29
2 files changed, 30 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index ce2a085f47..3bd6977dbb 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -3317,7 +3317,7 @@ BOOL net_io_r_dsr_getdcname(const char *desc, NET_R_DSR_GETDCNAME *r_t,
if (!prs_uint32("ptr_dc_address", ps, depth, &r_t->ptr_dc_address))
return False;
- if (!prs_uint32("dc_address_type", ps, depth, &r_t->dc_address_type))
+ if (!prs_int32("dc_address_type", ps, depth, &r_t->dc_address_type))
return False;
if (!smb_io_uuid("domain_guid", &r_t->domain_guid, ps, depth))
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 77f0e6d5c8..7c84ee800b 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -708,6 +708,35 @@ BOOL prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32)
}
/*******************************************************************
+ Stream an int32.
+ ********************************************************************/
+
+BOOL prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32)
+{
+ char *q = prs_mem_get(ps, sizeof(int32));
+ if (q == NULL)
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ if (ps->bigendian_data)
+ *data32 = RIVALS(q,0);
+ else
+ *data32 = IVALS(q,0);
+ } else {
+ if (ps->bigendian_data)
+ RSIVALS(q,0,*data32);
+ else
+ SIVALS(q,0,*data32);
+ }
+
+ DEBUG(5,("%s%04x %s: %08x\n", tab_depth(depth), ps->data_offset, name, *data32));
+
+ ps->data_offset += sizeof(int32);
+
+ return True;
+}
+
+/*******************************************************************
Stream a NTSTATUS
********************************************************************/