s3:rpc_parse remove unused prs_unistr2()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 19 Mar 2009 08:18:14 +0000 (19:18 +1100)
committerGünther Deschner <gd@samba.org>
Tue, 7 Apr 2009 18:51:55 +0000 (20:51 +0200)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/include/proto.h
source3/rpc_parse/parse_prs.c

index d5c11faf56556a4a7d242368242159ced00f47e8..7ae008511ca83c0c38a6051172c2c49f2358c944 100644 (file)
@@ -5782,7 +5782,6 @@ bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint
 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
 bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
-bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
 bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size);
 bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str);
index 94732b0a740342fa7166f453f0bcd7d3b148b91c..dfbd6dac74242004f52b984a38fc76cafd15bce4 100644 (file)
@@ -1048,44 +1048,6 @@ bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uin
        return True;
 }
 
-/******************************************************************
- Stream a unicode string, length/buffer specified separately,
- in uint16 chars. The unicode string is already in little-endian format.
- ********************************************************************/
-
-bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str)
-{
-       char *p;
-       char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16));
-       if (q == NULL)
-               return False;
-
-       /* If the string is empty, we don't have anything to stream */
-       if (str->uni_str_len==0)
-               return True;
-
-       if (UNMARSHALLING(ps)) {
-               if (str->uni_str_len > str->uni_max_len) {
-                       return False;
-               }
-               if (str->uni_max_len) {
-                       str->buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_max_len);
-                       if (str->buffer == NULL)
-                               return False;
-               } else {
-                       str->buffer = NULL;
-               }
-       }
-
-       p = (char *)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.