summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-18 12:22:22 +0100
committerGünther Deschner <gd@samba.org>2009-03-18 20:17:01 +0100
commit7a85a87edf3a589235b932a3c802278e78da4ec5 (patch)
treeace8f992423de6faac1615218f5fe8b5f3bb44c9 /source3/rpc_parse
parente966719049702827c482c5e19783b9a7c725bdb1 (diff)
downloadsamba-7a85a87edf3a589235b932a3c802278e78da4ec5.tar.gz
samba-7a85a87edf3a589235b932a3c802278e78da4ec5.tar.bz2
samba-7a85a87edf3a589235b932a3c802278e78da4ec5.zip
s3-rpc_parse: remove unused BUFFER5 and UNISTR3.
Guenther
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_misc.c81
-rw-r--r--source3/rpc_parse/parse_prs.c61
2 files changed, 0 insertions, 142 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index d966790249..bddd4212dc 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -214,30 +214,6 @@ bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth)
}
/*******************************************************************
-reads or writes a BUFFER5 structure.
-the buf_len member tells you how large the buffer is.
-********************************************************************/
-bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "smb_io_buffer5");
- depth++;
-
- if (buf5 == NULL) return False;
-
- if(!prs_align(ps))
- return False;
- if(!prs_uint32("buf_len", ps, depth, &buf5->buf_len))
- return False;
-
- if(buf5->buf_len) {
- if(!prs_buffer5(True, "buffer" , ps, depth, buf5))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
creates a UNISTR2 structure: sets up the buffer, too
********************************************************************/
@@ -575,63 +551,6 @@ bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth
}
/*******************************************************************
- Create a UNISTR3.
-********************************************************************/
-
-void init_unistr3(UNISTR3 *str, const char *buf)
-{
- if (buf == NULL) {
- str->uni_str_len=0;
- str->str.buffer = NULL;
- return;
- }
-
- str->uni_str_len = strlen(buf) + 1;
-
- if (str->uni_str_len) {
- str->str.buffer = TALLOC_ZERO_ARRAY(talloc_tos(), uint16, str->uni_str_len);
- if (str->str.buffer == NULL)
- smb_panic("init_unistr3: malloc fail");
-
- rpcstr_push((char *)str->str.buffer, buf, str->uni_str_len * sizeof(uint16), STR_TERMINATE);
- } else {
- str->str.buffer = NULL;
- }
-}
-
-/*******************************************************************
- Reads or writes a UNISTR3 structure.
-********************************************************************/
-
-bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth)
-{
- if (name == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "smb_io_unistr3");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("uni_str_len", ps, depth, &name->uni_str_len))
- return False;
-
- /* we're done if there is no string */
-
- if ( name->uni_str_len == 0 )
- return True;
-
- /* don't know if len is specified by uni_str_len member... */
- /* assume unicode string is unicode-null-terminated, instead */
-
- if(!prs_unistr3(True, "unistr", name, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
return the length of a UNISTR string.
********************************************************************/
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index c42018947f..94732b0a74 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1049,37 +1049,6 @@ bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uin
}
/******************************************************************
- Stream an array of unicode string, length/buffer specified separately,
- in uint16 chars. The unicode string is already in little-endian format.
- ********************************************************************/
-
-bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str)
-{
- char *p;
- char *q = prs_mem_get(ps, str->buf_len * sizeof(uint16));
- if (q == NULL)
- return False;
-
- /* If the string is empty, we don't have anything to stream */
- if (str->buf_len==0)
- return True;
-
- if (UNMARSHALLING(ps)) {
- str->buffer = PRS_ALLOC_MEM(ps,uint16,str->buf_len);
- if (str->buffer == NULL)
- return False;
- }
-
- p = (char *)str->buffer;
-
- dbg_rw_punival(charmode, name, depth, ps, q, p, str->buf_len);
-
- ps->data_offset += (str->buf_len * sizeof(uint16));
-
- return True;
-}
-
-/******************************************************************
Stream a unicode string, length/buffer specified separately,
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
@@ -1117,36 +1086,6 @@ bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNI
return True;
}
-/******************************************************************
- Stream a unicode string, length/buffer specified separately,
- in uint16 chars. The unicode string is already in little-endian format.
- ********************************************************************/
-
-bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth)
-{
- char *p;
- char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16));
- if (q == NULL)
- return False;
-
- if (UNMARSHALLING(ps)) {
- if (str->uni_str_len) {
- str->str.buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_str_len);
- if (str->str.buffer == NULL)
- return False;
- } else {
- str->str.buffer = NULL;
- }
- }
-
- p = (char *)str->str.buffer;
-
- dbg_rw_punival(charmode, name, depth, ps, q, p, str->uni_str_len);
- ps->data_offset += (str->uni_str_len * sizeof(uint16));
-
- return True;
-}
-
/*******************************************************************
Stream a unicode null-terminated string. As the string is already
in little-endian format then do it as a stream of bytes.