svn commit: samba r10720 - branches/SAMBA_3_0/source/rpc_parse
trunk/source/rpc_parse
jelmer at samba.org
jelmer at samba.org
Tue Oct 4 21:56:53 GMT 2005
Author: jelmer
Date: 2005-10-04 21:56:53 +0000 (Tue, 04 Oct 2005)
New Revision: 10720
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10720
Log:
Add helper function that does prs alignment on a specified number of bytes.
Modified:
branches/SAMBA_3_0/source/rpc_parse/parse_prs.c
trunk/source/rpc_parse/parse_prs.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_prs.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_prs.c 2005-10-04 21:42:39 UTC (rev 10719)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_prs.c 2005-10-04 21:56:53 UTC (rev 10720)
@@ -511,6 +511,24 @@
return ret;
}
+/******************************************************************
+ Align on a specific byte boundary
+ *****************************************************************/
+
+BOOL prs_align_custom(prs_struct *ps, uint8 boundary)
+{
+ BOOL ret;
+ uint8 old_align = ps->align;
+
+ ps->align = boundary;
+ ret = prs_align(ps);
+ ps->align = old_align;
+
+ return ret;
+}
+
+
+
/*******************************************************************
Align only if required (for the unistr2 string mainly)
********************************************************************/
Modified: trunk/source/rpc_parse/parse_prs.c
===================================================================
--- trunk/source/rpc_parse/parse_prs.c 2005-10-04 21:42:39 UTC (rev 10719)
+++ trunk/source/rpc_parse/parse_prs.c 2005-10-04 21:56:53 UTC (rev 10720)
@@ -511,6 +511,24 @@
return ret;
}
+/******************************************************************
+ Align on a specific byte boundary
+ *****************************************************************/
+
+BOOL prs_align_custom(prs_struct *ps, uint8 boundary)
+{
+ BOOL ret;
+ uint8 old_align = ps->align;
+
+ ps->align = boundary;
+ ret = prs_align(ps);
+ ps->align = old_align;
+
+ return ret;
+}
+
+
+
/*******************************************************************
Align only if required (for the unistr2 string mainly)
********************************************************************/
More information about the samba-cvs
mailing list