summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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
********************************************************************/