librpc/ndr: Remove ndr_{push,pull}_get_switch_value()
authorAndrew Bartlett <abartlet@samba.org>
Wed, 27 Nov 2019 02:20:32 +0000 (15:20 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Dec 2019 02:30:41 +0000 (02:30 +0000)
By removing this we know we do not need to worry about this list
growing without bounds.  We merge this into the recently created but
not yet released ABI 1.0.0

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
librpc/ABI/ndr-1.0.0.sigs
librpc/ndr/libndr.h
librpc/ndr/ndr.c

index fccf47930c2cce0e3380320a9fc1a046af7dd51a..3177f3804d4426ed6b67f490fbad1dedb14fbaa6 100644 (file)
@@ -116,7 +116,6 @@ ndr_pull_enum_uint32: enum ndr_err_code (struct ndr_pull *, int, uint32_t *)
 ndr_pull_enum_uint8: enum ndr_err_code (struct ndr_pull *, int, uint8_t *)
 ndr_pull_generic_ptr: enum ndr_err_code (struct ndr_pull *, uint32_t *)
 ndr_pull_get_relative_base_offset: uint32_t (struct ndr_pull *)
-ndr_pull_get_switch_value: uint32_t (struct ndr_pull *, const void *)
 ndr_pull_gid_t: enum ndr_err_code (struct ndr_pull *, int, gid_t *)
 ndr_pull_hyper: enum ndr_err_code (struct ndr_pull *, int, uint64_t *)
 ndr_pull_init_blob: struct ndr_pull *(const DATA_BLOB *, TALLOC_CTX *)
@@ -190,7 +189,6 @@ ndr_push_enum_uint8: enum ndr_err_code (struct ndr_push *, int, uint8_t)
 ndr_push_expand: enum ndr_err_code (struct ndr_push *, uint32_t)
 ndr_push_full_ptr: enum ndr_err_code (struct ndr_push *, const void *)
 ndr_push_get_relative_base_offset: uint32_t (struct ndr_push *)
-ndr_push_get_switch_value: uint32_t (struct ndr_push *, const void *)
 ndr_push_gid_t: enum ndr_err_code (struct ndr_push *, int, gid_t)
 ndr_push_hyper: enum ndr_err_code (struct ndr_push *, int, uint64_t)
 ndr_push_init_ctx: struct ndr_push *(TALLOC_CTX *)
index 0edf8955efbceffc9b4e9f7d3417a623c137de9c..2a4e3fb098a4465d16e2912739dc326f64a43b09 100644 (file)
@@ -616,9 +616,7 @@ enum ndr_err_code ndr_check_pipe_chunk_trailer(struct ndr_pull *ndr, int ndr_fla
 enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val);
 enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val);
 enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val);
-uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p);
 uint32_t ndr_push_steal_switch_value(struct ndr_push *ndr, const void *p);
-uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p);
 uint32_t ndr_print_steal_switch_value(struct ndr_print *ndr, const void *p);
 uint32_t ndr_pull_steal_switch_value(struct ndr_pull *ndr, const void *p);
 enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, ndr_pull_flags_fn_t fn);
index 4c628c1dae40b89ac62b269b8eee34ed6572623f..5616eec211f01e89951b8ec244fcc380112c7464 100644 (file)
@@ -1230,14 +1230,6 @@ _PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, con
        return ndr_token_store(ndr, &ndr->switch_list, p, val);
 }
 
-/*
-  retrieve a switch value
- */
-_PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
 /* retrieve a switch value (for push) and remove it from the list */
 _PUBLIC_ uint32_t ndr_push_steal_switch_value(struct ndr_push *ndr, const void *p)
 {
@@ -1252,11 +1244,6 @@ _PUBLIC_ uint32_t ndr_push_steal_switch_value(struct ndr_push *ndr, const void *
        return v;
 }
 
-_PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
 /* retrieve a switch value and remove it from the list */
 _PUBLIC_ uint32_t ndr_print_steal_switch_value(struct ndr_print *ndr, const void *p)
 {