From e0bcc7ff5434e9f858acc6a79d1842d86d37d73e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 14 Nov 2000 02:14:58 +0000 Subject: printing/nt_printing.c: After long soul searching and making both Andrew and my life a misery, here is the only possible null driver fix we have found. This *SUCKS*. rpc_server/srv_spoolss_nt.c: Correct printername search. Correct portname reply Correct attributes reply. Removal of unused temp variable. Jeremy. (This used to be commit 06e71c9f8be20b84e33e143c3d0b7904225efb45) --- source3/printing/nt_printing.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 15b78032cd..1519faa567 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1664,11 +1664,13 @@ static uint32 get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin snum = lp_servicenumber(sharename); slprintf(info.servername, sizeof(info.servername), "\\\\%s", global_myname); - slprintf(info.printername, sizeof(info.printername), "\\\\%s\\%s", - global_myname, sharename); fstrcpy(info.sharename, sharename); fstrcpy(info.portname, SAMBA_PRINTER_PORT_NAME); fstrcpy(info.drivername, lp_printerdriver(snum)); + if (*info.drivername == '\0') + fstrcpy(info.drivername, "NO DRIVER AVAILABLE"); + + slprintf(info.printername, sizeof(info.printername), "\\\\%s\\%s", global_myname, sharename); pstrcpy(info.comment, ""); fstrcpy(info.printprocessor, "winprint"); fstrcpy(info.datatype, "RAW"); -- cgit