svn commit: lorikeet r157 - in trunk/ethereal/plugins/pidl: .

tpot at samba.org tpot at samba.org
Mon Jan 3 22:50:58 GMT 2005


Author: tpot
Date: 2005-01-03 22:50:58 +0000 (Mon, 03 Jan 2005)
New Revision: 157

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=157

Log:
Add function prototypes for ndr_pull_*_fn_t.

Fix bug in prototype for ndr_pull_relative2().

Initialise array_length_list and relative_list.  

Fix parameters to function called in ndr_pull_subcontext_flags_fn.

Modified:
   trunk/ethereal/plugins/pidl/eparser.c
   trunk/ethereal/plugins/pidl/eparser.h


Changeset:
Modified: trunk/ethereal/plugins/pidl/eparser.c
===================================================================
--- trunk/ethereal/plugins/pidl/eparser.c	2005-01-03 22:47:53 UTC (rev 156)
+++ trunk/ethereal/plugins/pidl/eparser.c	2005-01-03 22:50:58 UTC (rev 157)
@@ -15,6 +15,8 @@
 	ndr->drep = drep;
 	ndr->flags = NDR_SCALARS|NDR_BUFFERS|LIBNDR_FLAG_REF_ALLOC;	
 	ndr->array_size_list = NULL;
+	ndr->array_length_list = NULL;
+	ndr->relative_list = NULL;
 
 	return ndr;
 }
@@ -598,7 +600,7 @@
   pull a relative object - stage2
   called during BUFFERS processing
 */
-NTSTATUS ndr_pull_relative2(struct ndr_pull *ndr, const void *p)
+NTSTATUS ndr_pull_relative2(struct pidl_pull *ndr, const void *p)
 {
 	uint32_t rel_offset;
 	ndr_token_retrieve(&ndr->relative_list, p, &rel_offset);
@@ -668,7 +670,7 @@
 	struct pidl_pull *ndr2;
 	NDR_ALLOC(ndr, ndr2);
 	ndr_pull_subcontext_header(ndr, tree, sub_size, ndr2);
-	fn(ndr2, NDR_SCALARS|NDR_BUFFERS, base);
+	fn(ndr2, NDR_SCALARS|NDR_BUFFERS, tree, base);
 	if (sub_size) {
 		ndr_pull_advance(ndr, tvb_length(ndr2->tvb));
 	} else {

Modified: trunk/ethereal/plugins/pidl/eparser.h
===================================================================
--- trunk/ethereal/plugins/pidl/eparser.h	2005-01-03 22:47:53 UTC (rev 156)
+++ trunk/ethereal/plugins/pidl/eparser.h	2005-01-03 22:50:58 UTC (rev 157)
@@ -92,6 +92,12 @@
 
 extern gint hf_conformant_size;
 
+/* these are used when generic fn pointers are needed for ndr push/pull fns */
+typedef NTSTATUS (*ndr_pull_fn_t)(struct pidl_pull *, void *);
+
+typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct pidl_pull *, int ndr_flags, pidl_tree *tree, void *);
+typedef NTSTATUS (*ndr_pull_union_fn_t)(struct pidl_pull *, int ndr_flags, pidl_tree *tree, uint32_t, void *);
+
 // Prototypes for libndr functions
 
 NTSTATUS ndr_pull_struct_start(struct pidl_pull *ndr);
@@ -126,6 +132,7 @@
 NTSTATUS ndr_pull_time_t(struct pidl_pull *ndr, pidl_tree *tree, int hf, 
 			 time_t *data);
 NTSTATUS ndr_pull_relative1(struct pidl_pull *ndr, const void *p, uint32_t rel_offset);
+NTSTATUS ndr_pull_relative2(struct pidl_pull *ndr, const void *p);
 void ndr_pull_save(struct pidl_pull *ndr, struct ndr_pull_save *save);
 void ndr_pull_restore(struct pidl_pull *ndr, struct ndr_pull_save *save);
 NTSTATUS ndr_pull_subcontext_flags_fn(struct pidl_pull *ndr, pidl_tree *tree,



More information about the samba-cvs mailing list