summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/epmapper.h4
-rw-r--r--source3/librpc/gen_ndr/ndr_epmapper.c20
2 files changed, 11 insertions, 13 deletions
diff --git a/source3/librpc/gen_ndr/epmapper.h b/source3/librpc/gen_ndr/epmapper.h
index 7689ee54a6..4b75261a02 100644
--- a/source3/librpc/gen_ndr/epmapper.h
+++ b/source3/librpc/gen_ndr/epmapper.h
@@ -227,7 +227,9 @@ struct epm_twr_t {
struct epm_entry_t {
struct GUID object;
struct epm_twr_t *tower;/* [ptr] */
- const char * annotation;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4)] */
+ uint32_t __annotation_offset;/* [value(0)] */
+ uint32_t __annotation_length;/* [value(strlen(annotation)+1)] */
+ const char *annotation;/* [charset(DOS)] */
};
struct rpc_if_id_t {
diff --git a/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c
index b7cead8a21..0f1005dda7 100644
--- a/source3/librpc/gen_ndr/ndr_epmapper.c
+++ b/source3/librpc/gen_ndr/ndr_epmapper.c
@@ -1633,12 +1633,9 @@ static enum ndr_err_code ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flag
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
NDR_CHECK(ndr_push_full_ptr(ndr, r->tower));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->annotation));
- ndr->flags = _flags_save_string;
- }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->annotation) + 1));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->annotation, strlen(r->annotation) + 1, sizeof(uint8_t), CH_DOS));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->tower) {
@@ -1661,12 +1658,9 @@ static enum ndr_err_code ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flag
} else {
r->tower = NULL;
}
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->annotation));
- ndr->flags = _flags_save_string;
- }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_offset));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_length));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->annotation, r->__annotation_length, sizeof(uint8_t), CH_DOS));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->tower) {
@@ -1690,6 +1684,8 @@ _PUBLIC_ void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, con
ndr_print_epm_twr_t(ndr, "tower", r->tower);
}
ndr->depth--;
+ ndr_print_uint32(ndr, "__annotation_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__annotation_offset);
+ ndr_print_uint32(ndr, "__annotation_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->annotation) + 1:r->__annotation_length);
ndr_print_string(ndr, "annotation", r->annotation);
ndr->depth--;
}