svn commit: samba r16690 - in branches/SAMBA_4_0/source/librpc/idl: .

metze at samba.org metze at samba.org
Thu Jun 29 18:56:09 GMT 2006


Author: metze
Date: 2006-06-29 18:56:09 +0000 (Thu, 29 Jun 2006)
New Revision: 16690

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

Log:
- fix bug 3896
- we didn't pushed the wins wack reply correctly to the wire,
  as NBT_QTYPE_NETBIOS is used and setting rdata.data.data was useless...

metze
Modified:
   branches/SAMBA_4_0/source/librpc/idl/nbt.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/nbt.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/nbt.idl	2006-06-29 18:44:44 UTC (rev 16689)
+++ branches/SAMBA_4_0/source/librpc/idl/nbt.idl	2006-06-29 18:56:09 UTC (rev 16690)
@@ -165,12 +165,22 @@
 		[default]                 nbt_rdata_data   data;
 	} nbt_rdata;
 
+/*
+ * this macro works arround the problem
+ * that we need to use nbt_rdata_data
+ * together with NBT_QTYPE_NETBIOS
+ * for WACK replies
+ */
+#define NBT_RES_REC_LEVEL(rr_type, rdata) (\
+	(((rr_type) == NBT_QTYPE_NETBIOS) && ((rdata).data.length == 2)) \
+	? 0 : rr_type)
+
 	typedef [flag(LIBNDR_PRINT_ARRAY_HEX)] struct {
 		nbt_name   name;
 		nbt_qtype  rr_type;
 		nbt_qclass rr_class;
 		uint32     ttl;
-		[switch_is(rr_type)] nbt_rdata rdata;
+		[switch_is(NBT_RES_REC_LEVEL(rr_type, rdata))] nbt_rdata rdata;
 	} nbt_res_rec;
 
 	typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {



More information about the samba-cvs mailing list