mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r7182: remove current support for RELATIVE_CURRENT, this will be replaced with a better aproach later
metze
(This used to be commit 9a4e9f68fb
)
This commit is contained in:
parent
4536f0ef91
commit
8618c6a906
@ -110,7 +110,4 @@
|
||||
*/
|
||||
#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
|
||||
|
||||
/* this enables spoolss style relative ptrs */
|
||||
#define RELATIVE_CURRENT LIBNDR_FLAG_RELATIVE_CURRENT
|
||||
|
||||
#define bool8 uint8
|
||||
|
@ -791,7 +791,7 @@
|
||||
[out] uint32 count
|
||||
);
|
||||
|
||||
typedef [flag(RELATIVE_CURRENT)] struct {
|
||||
typedef struct {
|
||||
[relative] nstring *port_name;
|
||||
} spoolss_PortInfo1;
|
||||
|
||||
|
@ -126,10 +126,6 @@ struct ndr_print {
|
||||
/* used to check if alignment padding is zero */
|
||||
#define LIBNDR_FLAG_PAD_CHECK (1<<28)
|
||||
|
||||
/* used to indicate spoolss style relative pointers (relative to current
|
||||
offset, not base) */
|
||||
#define LIBNDR_FLAG_RELATIVE_CURRENT (1<<29)
|
||||
|
||||
/* set if an object uuid will be present */
|
||||
#define LIBNDR_FLAG_OBJECT_PRESENT (1<<30)
|
||||
|
||||
|
@ -598,12 +598,7 @@ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p)
|
||||
*/
|
||||
NTSTATUS ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset)
|
||||
{
|
||||
if (ndr->flags & LIBNDR_FLAG_RELATIVE_CURRENT) {
|
||||
return ndr_token_store(ndr, &ndr->relative_list, p,
|
||||
rel_offset + ndr->offset - 4);
|
||||
} else {
|
||||
return ndr_token_store(ndr, &ndr->relative_list, p, rel_offset);
|
||||
}
|
||||
return ndr_token_store(ndr, &ndr->relative_list, p, rel_offset);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -645,11 +640,7 @@ NTSTATUS ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p)
|
||||
NDR_CHECK(ndr_push_align(ndr, 4));
|
||||
ndr_push_save(ndr, &save);
|
||||
NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &ndr->offset));
|
||||
if (ndr->flags & LIBNDR_FLAG_RELATIVE_CURRENT) {
|
||||
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save.offset - ndr->offset));
|
||||
} else {
|
||||
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save.offset));
|
||||
}
|
||||
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save.offset));
|
||||
ndr_push_restore(ndr, &save);
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user