s3:rpc_parse: remove unused init_unistr().
authorGünther Deschner <gd@samba.org>
Wed, 25 Mar 2009 22:23:06 +0000 (23:23 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 26 Mar 2009 09:42:13 +0000 (10:42 +0100)
Guenther

source3/include/proto.h
source3/rpc_parse/parse_misc.c
source3/utils/net_rpc_printer.c

index d619c3ba007737c134705f9450fb30fc0f9454cc..77be0aba09008d892033e01b21431d2f91c4df52 100644 (file)
@@ -5695,7 +5695,6 @@ bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME
 bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
                 prs_struct *ps, int depth);
-void init_unistr(UNISTR *str, const char *buf);
 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags);
 
 /* The following definitions come from rpc_parse/parse_prs.c  */
index ffbd67befe82e2a18ae91b50f3b8f1de76eb8158..1ea4ecf46f8eb5b53dc0376e9855cea8a70a9760 100644 (file)
@@ -128,25 +128,6 @@ bool smb_io_uuid(const char *desc, struct GUID *uuid,
        return True;
 }
 
-/*******************************************************************
- Inits a UNISTR structure.
-********************************************************************/
-
-void init_unistr(UNISTR *str, const char *buf)
-{
-       size_t len;
-
-       if (buf == NULL) {
-               str->buffer = NULL;
-               return;
-       }
-
-       len = rpcstr_push_talloc(talloc_tos(), &str->buffer, buf);
-       if (len == (size_t)-1) {
-               str->buffer = NULL;
-       }
-}
-
 /*******************************************************************
  Inits a UNISTR2 structure.
 ********************************************************************/
index 1d0e9a38beebb132e2b0498dd521d6b0b9ead411..9721628f022b53dde3cd2d1a256a5bbb7d81dad0 100644 (file)
@@ -2260,14 +2260,13 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
                        info_dst.info2.secdesc = NULL;
 
 #if 0
-                       if (asprintf(&devicename, "\\\\%s\\%s", longname,
-                                    printername) < 0) {
+                       info_dst.info2.devmode.devicename =
+                               talloc_asprintf(mem_ctx, "\\\\%s\\%s",
+                                               longname, printername);
+                       if (!info_dst.info2.devmode.devicename) {
                                nt_status = NT_STATUS_NO_MEMORY;
                                goto done;
                        }
-
-                       init_unistr(&ctr_dst.printers_2->devmode->devicename,
-                                   devicename);
 #endif
                        if (!net_spoolss_setprinter(pipe_hnd_dst, mem_ctx, &hnd_dst,
                                                    level, &info_dst))