summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-17 00:28:49 +0100
committerGünther Deschner <gd@samba.org>2009-03-17 12:21:31 +0100
commite89e739e22c5c3ac88f7290fb98c678c3846b755 (patch)
treeb186e8935042f293214ebbf51a9a5584743520c8 /source3/rpc_server
parent4a58f263b9fcd24be480dadf1b464e6bc1df4590 (diff)
downloadsamba-e89e739e22c5c3ac88f7290fb98c678c3846b755.tar.gz
samba-e89e739e22c5c3ac88f7290fb98c678c3846b755.tar.bz2
samba-e89e739e22c5c3ac88f7290fb98c678c3846b755.zip
s3-spoolss: remove unused init_unistr_array().
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index d457180626..0a0c11db62 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5159,79 +5159,6 @@ static WERROR construct_printer_driver_info_2(TALLOC_CTX *mem_ctx,
}
/********************************************************************
- * copy a strings array and convert to UNICODE
- *
- * convert an array of ascii string to a UNICODE string
- ********************************************************************/
-
-static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, const char *servername)
-{
- int i=0;
- int j=0;
- const char *v;
- char *line = NULL;
- TALLOC_CTX *ctx = talloc_tos();
-
- DEBUG(6,("init_unistr_array\n"));
- *uni_array=NULL;
-
- while (true) {
- if ( !char_array ) {
- v = "";
- } else {
- v = char_array[i];
- if (!v)
- v = ""; /* hack to handle null lists */
- }
-
- /* hack to allow this to be used in places other than when generating
- the list of dependent files */
-
- TALLOC_FREE(line);
- if ( servername ) {
- line = talloc_asprintf(ctx,
- "\\\\%s%s",
- canon_servername(servername),
- v);
- } else {
- line = talloc_strdup(ctx, v);
- }
-
- if (!line) {
- SAFE_FREE(*uni_array);
- return 0;
- }
- DEBUGADD(6,("%d:%s:%lu\n", i, line, (unsigned long)strlen(line)));
-
- /* add one extra unit16 for the second terminating NULL */
-
- if ( (*uni_array=SMB_REALLOC_ARRAY(*uni_array, uint16, j+1+strlen(line)+2)) == NULL ) {
- DEBUG(2,("init_unistr_array: Realloc error\n" ));
- return 0;
- }
-
- if ( !strlen(v) )
- break;
-
- j += (rpcstr_push((*uni_array+j), line, sizeof(uint16)*strlen(line)+2, STR_TERMINATE) / sizeof(uint16));
- i++;
- }
-
- if (*uni_array) {
- /* special case for ""; we need to add both NULL's here */
- if (!j)
- (*uni_array)[j++]=0x0000;
- (*uni_array)[j]=0x0000;
- }
-
- DEBUGADD(6,("last one:done\n"));
-
- /* return size of array in uint16's */
-
- return j+1;
-}
-
-/********************************************************************
* construct_printer_info_3
* fill a printer_info_3 struct
********************************************************************/