summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_misc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-07-11 04:27:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-07-11 04:27:03 +0000
commit7265d4638805a0eb391237c5cba0f39f4d0feb11 (patch)
treef92bc7f06ac559a9b282744f190693703259d95d /source3/rpc_parse/parse_misc.c
parentbe11842e797a6291b39b208b93acf4143e751c58 (diff)
downloadsamba-7265d4638805a0eb391237c5cba0f39f4d0feb11.tar.gz
samba-7265d4638805a0eb391237c5cba0f39f4d0feb11.tar.bz2
samba-7265d4638805a0eb391237c5cba0f39f4d0feb11.zip
This backs out my last change, which broke some of the finer points of RPC
coding :-). I'll be more carfull in this area in future. This does not back out the cli_login change, so domain logons still work, but only for english. Andrew Bartlett (This used to be commit bd3c2a0cddc71daa4165e1a0916208d0c650d55a)
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r--source3/rpc_parse/parse_misc.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index d4754f5e9a..857f964e31 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -5,7 +5,6 @@
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
* Copyright (C) Paul Ashton 1997.
- * Copyright (C) Andrew Bartlett 2001.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -922,59 +921,6 @@ void init_unistr2(UNISTR2 *str, const char *buf, size_t len)
}
/*******************************************************************
- Inits a UNIHDR and UNISTR2 structure at one time.
-********************************************************************/
-
-void init_unistr2_and_hdr(UNISTR2 *str, UNIHDR *hdr, const char *buf )
-{
- size_t convbuf_len_bytes, len_bytes;
- int len;
-
- uint16 *conversion_buffer;
-
- if (buf == NULL) {
- str->buffer = NULL;
- hdr->uni_str_len = 0;
- hdr->uni_max_len = 0;
- hdr->buffer = 0;
- return;
- }
-
- convbuf_len_bytes = (sizeof(uint16)*(strlen(buf) + 1));
- /* Our strings cannot expand from internal to unicode by more
- than a factor of 2 */
-
- conversion_buffer = malloc(convbuf_len_bytes);
- if (conversion_buffer == NULL)
- smb_panic("init_unistr: malloc fail\n");
-
- /* Check this */
-
- len_bytes = rpcstr_push(conversion_buffer, buf, convbuf_len_bytes, STR_TERMINATE);
-
- len = len_bytes/sizeof(uint16);
-
- if (len > MAX_UNISTRLEN) {
- len = MAX_UNISTRLEN;
- }
-
- str->buffer = (uint16 *)talloc_zero(get_talloc_ctx(), len*sizeof(uint16));
- if (str->buffer == NULL)
- smb_panic("init_unistr: talloc fail\n");
-
- hdr->uni_str_len = len;
- hdr->uni_max_len = len;
-
- hdr->buffer = 1;
-
- str->uni_str_len = len;
- str->uni_max_len = len;
- memcpy(str->buffer, conversion_buffer, len*sizeof(uint16));
-
- free(conversion_buffer);
-}
-
-/*******************************************************************
Inits a UNISTR2 structure from a UNISTR
********************************************************************/
void init_unistr2_from_unistr (UNISTR2 *to, UNISTR *from)