diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 57f95873fc..6dbf90ba8a 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -371,7 +371,7 @@ static BOOL set_printer_hnd_printertype(Printer_entry *Printer, char *handlename } /* it's a print server */ - if (!strchr(handlename+2, '\\')) { + if (*handlename=='\\' && *(handlename+1)=='\\' && !strchr(handlename+2, '\\')) { DEBUGADD(4,("Printer is a print server\n")); Printer->printer_type = PRINTER_HANDLE_IS_PRINTSERVER; } @@ -407,8 +407,13 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) if (Printer->printer_type!=PRINTER_HANDLE_IS_PRINTER) return False; - aprinter=strchr(handlename+2, '\\'); - aprinter++; + if (*handlename=='\\') { + aprinter=strchr(handlename+2, '\\'); + aprinter++; + } + else { + aprinter=handlename; + } DEBUGADD(5,("searching for [%s] (len=%d)\n", aprinter, strlen(aprinter))); |