summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-07-31 21:41:03 +0000
committerJeremy Allison <jra@samba.org>2000-07-31 21:41:03 +0000
commit55ff9cb38bbabfaee591f6f5190e57b5564f3942 (patch)
treefcc9ad441963bedf28df1b4a6f9fae2b73e3fd2a /source3/rpc_server
parent49fcb300de40d6da8682b485fd2c51236bcbb3dd (diff)
downloadsamba-55ff9cb38bbabfaee591f6f5190e57b5564f3942.tar.gz
samba-55ff9cb38bbabfaee591f6f5190e57b5564f3942.tar.bz2
samba-55ff9cb38bbabfaee591f6f5190e57b5564f3942.zip
Save & restore the port name correctly.
Jeremy. (This used to be commit c0648c981edef2a29b3a22a7d08aa226ca724e95)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index b675175544..47df204ef3 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1935,12 +1935,7 @@ static BOOL construct_printer_info_2(fstring servername, PRINTER_INFO_2 *printer
init_unistr(&printer->servername, chaine); /* servername*/
init_unistr(&printer->printername, chaine2); /* printername*/
init_unistr(&printer->sharename, lp_servicename(snum)); /* sharename */
-#if 1 /* JRATEST */
- /* We need to determine the correct model for this..... */
- init_unistr(&printer->portname, lp_printername(snum)); /* port */
-#else
- init_unistr(&printer->portname, lp_servicename(snum)); /* port */
-#endif
+ init_unistr(&printer->portname, ntprinter->info_2->portname); /* port */
init_unistr(&printer->drivername, ntprinter->info_2->drivername); /* drivername */
if (*ntprinter->info_2->comment == '\0')
@@ -1966,9 +1961,6 @@ static BOOL construct_printer_info_2(fstring servername, PRINTER_INFO_2 *printer
if((printer->devmode = construct_dev_mode(snum, servername)) == NULL) {
DEBUG(8, ("Returning NULL Devicemode!\n"));
-#if 0 /* JFMTEST */
- goto err;
-#endif
}
if (ntprinter->info_2->secdesc_buf && ntprinter->info_2->secdesc_buf->len != 0) {
@@ -1985,13 +1977,6 @@ static BOOL construct_printer_info_2(fstring servername, PRINTER_INFO_2 *printer
free_a_printer(&ntprinter, 2);
safe_free(queue);
return True;
-
- err:
-
- if (ntprinter)
- free_a_printer(&ntprinter, 2);
- safe_free(queue);
- return False;
}
/********************************************************************