r5663: Revert some changes I didn't mean to commit...
authorJelmer Vernooij <jelmer@samba.org>
Sat, 5 Mar 2005 19:26:45 +0000 (19:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:10:57 +0000 (13:10 -0500)
(This used to be commit 54e0be6f1eccbd870eb0e60ae8cdb90d2dc7f657)

source4/librpc/ndr/libndr.h
source4/librpc/ndr/ndr.c
source4/librpc/ndr/ndr_spoolss_buf.c

index e2ac4279f1d71a0d9720ab3c1d3c28ee3f74aef3..4880df43bdfc9a94b944f03e28474b35e5ac70b2 100644 (file)
@@ -49,7 +49,6 @@ struct ndr_pull {
        struct ndr_token_list *relative_list;
        struct ndr_token_list *array_size_list;
        struct ndr_token_list *array_length_list;
        struct ndr_token_list *relative_list;
        struct ndr_token_list *array_size_list;
        struct ndr_token_list *array_length_list;
-       struct ndr_token_list *switch_list;
 
        /* this is used to ensure we generate unique reference IDs
           between request and reply */
 
        /* this is used to ensure we generate unique reference IDs
           between request and reply */
@@ -69,7 +68,6 @@ struct ndr_push {
        uint32_t alloc_size;
        uint32_t offset;
 
        uint32_t alloc_size;
        uint32_t offset;
 
-       struct ndr_token_list *switch_list;
        struct ndr_token_list *relative_list;
 
        /* this is used to ensure we generate unique reference IDs */
        struct ndr_token_list *relative_list;
 
        /* this is used to ensure we generate unique reference IDs */
index 2e350aa0da7e72a880ecc17c2d63f40fa77d5c3f..549230bb29cd2285608ea5d0a141f17aada80e62 100644 (file)
@@ -641,32 +641,6 @@ NTSTATUS ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length)
        return NT_STATUS_OK;
 }
 
        return NT_STATUS_OK;
 }
 
-/*
-  store a switch value
- */
-NTSTATUS ndr_push_set_switch_value(struct ndr_push *ndr, void *p, uint32_t val)
-{
-       return ndr_token_store(ndr, &ndr->switch_list, p, val);
-}
-
-NTSTATUS ndr_pull_set_switch_value(struct ndr_pull *ndr, void *p, uint32_t val)
-{
-       return ndr_token_store(ndr, &ndr->switch_list, p, val);
-}
-
-/*
-  retrieve a switch value
- */
-uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
-uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
 /*
   pull a relative object - stage1
   called during SCALARS processing
 /*
   pull a relative object - stage1
   called during SCALARS processing
index 4b1483709aa10db48d06821abb97563c2a1a5c54..e13e912b68f26578fba2e693471f2ea4eea3f930 100644 (file)
@@ -39,8 +39,7 @@
                for (i=0;i<r->out.count;i++) {\
                        ndr2->data += ndr2->offset;\
                        ndr2->offset = 0;\
                for (i=0;i<r->out.count;i++) {\
                        ndr2->data += ndr2->offset;\
                        ndr2->offset = 0;\
-                       NDR_CHECK(ndr_push_set_switch_value(ndr2, &(*r->out.info)[i], r->in.level)); \
-                       NDR_CHECK(ndr_push_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, &(*r->out.info)[i]));\
+                       NDR_CHECK(ndr_push_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, r->in.level, &(*r->out.info)[i]));\
                }\
                if (*r->in.buf_size >= ndr2->offset) {\
                        buffer = data_blob_const(ndr2->data, ndr2->offset);\
                }\
                if (*r->in.buf_size >= ndr2->offset) {\
                        buffer = data_blob_const(ndr2->data, ndr2->offset);\
@@ -95,8 +94,7 @@
                for (i=0;i<r->out.count;i++) {\
                        ndr2->data += ndr2->offset;\
                        ndr2->offset = 0;\
                for (i=0;i<r->out.count;i++) {\
                        ndr2->data += ndr2->offset;\
                        ndr2->offset = 0;\
-                       NDR_CHECK(ndr_pull_set_switch_value(ndr2, &(*r->out.info)[i], r->in.level)); \
-                       NDR_CHECK(ndr_pull_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, &(*r->out.info)[i]));\
+                       NDR_CHECK(ndr_pull_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, r->in.level, &(*r->out.info)[i]));\
                }\
        }\
 } while(0)
                }\
        }\
 } while(0)