svn commit: samba r11486 - in trunk/source/rpc_parse: .
jra at samba.org
jra at samba.org
Thu Nov 3 18:01:48 GMT 2005
Author: jra
Date: 2005-11-03 18:01:47 +0000 (Thu, 03 Nov 2005)
New Revision: 11486
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11486
Log:
Added missing function back - needed for unixpipe.
My fault, sorry.
Jeremy.
Modified:
trunk/source/rpc_parse/parse_prs.c
Changeset:
Modified: trunk/source/rpc_parse/parse_prs.c
===================================================================
--- trunk/source/rpc_parse/parse_prs.c 2005-11-03 16:24:57 UTC (rev 11485)
+++ trunk/source/rpc_parse/parse_prs.c 2005-11-03 18:01:47 UTC (rev 11486)
@@ -1274,6 +1274,35 @@
return True;
}
+BOOL prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str)
+{
+ size_t len;
+ char *tmp_str;
+
+ if (UNMARSHALLING(ps)) {
+ len = strlen(&ps->data_p[ps->data_offset]);
+ } else {
+ len = strlen(*str);
+ }
+
+ tmp_str = PRS_ALLOC_MEM(ps, char, len+1);
+
+ if (tmp_str == NULL) {
+ return False;
+ }
+
+ if (MARSHALLING(ps)) {
+ strncpy(tmp_str, *str, len);
+ }
+
+ if (!prs_string(name, ps, depth, tmp_str, len+1)) {
+ return False;
+ }
+
+ *str = tmp_str;
+ return True;
+}
+
/*******************************************************************
prs_uint16 wrapper. Call this and it sets up a pointer to where the
uint16 should be stored, or gets the size if reading.
More information about the samba-cvs
mailing list