libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
authorGünther Deschner <gd@samba.org>
Mon, 14 Dec 2009 13:08:34 +0000 (14:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 18 Feb 2010 12:43:59 +0000 (13:43 +0100)
Guenther

librpc/ndr/libndr.h
librpc/ndr/ndr.c

index 09e5334aa42b13a6b7852daa07d50af03c04913c..95ccb27912f3d8add702dbc450bc2cdb25cd3a1e 100644 (file)
@@ -385,6 +385,8 @@ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, con
 enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p);
 enum ndr_err_code ndr_push_short_relative_ptr1(struct ndr_push *ndr, const void *p);
 enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p);
+enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, const void *p);
+enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, const void *p);
 enum ndr_err_code ndr_push_short_relative_ptr2(struct ndr_push *ndr, const void *p);
 uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr);
 void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset);
index a151994b6af64c6d25b907ac8194a76880eb4cfc..fb1e5671fe067d28a2c69e6a9c0170f1b76947e5 100644 (file)
@@ -1144,6 +1144,30 @@ _PUBLIC_ enum ndr_err_code ndr_push_short_relative_ptr2(struct ndr_push *ndr, co
        return NDR_ERR_SUCCESS;
 }
 
+/*
+  push a relative object - stage2 start
+  this is called during buffers processing
+*/
+_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, const void *p)
+{
+       if (p == NULL) {
+               return NDR_ERR_SUCCESS;
+       }
+       return ndr_push_relative_ptr2(ndr, p);
+}
+
+/*
+  push a relative object - stage2 end
+  this is called during buffers processing
+*/
+_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, const void *p)
+{
+       if (p == NULL) {
+               return NDR_ERR_SUCCESS;
+       }
+       return NDR_ERR_SUCCESS;
+}
+
 /*
   get the current base for relative pointers for the pull
 */