diff options
author | Gerald Carter <jerry@samba.org> | 2000-08-04 20:32:34 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-08-04 20:32:34 +0000 |
commit | 4fabc1ad0de4864f1c8d58875086c8ce28db5cc1 (patch) | |
tree | 01d8dc6a1e311caadf9477c05b8a4004c6529518 /source3/rpcclient | |
parent | b3b512264d90f58a9a9c50cef33d9b860f54c51a (diff) | |
download | samba-4fabc1ad0de4864f1c8d58875086c8ce28db5cc1.tar.gz samba-4fabc1ad0de4864f1c8d58875086c8ce28db5cc1.tar.bz2 samba-4fabc1ad0de4864f1c8d58875086c8ce28db5cc1.zip |
spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!
--jerry
(This used to be commit 8e5e929561a1ae954bd60f7bd745d697438f835c)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 058c6db457..f79a7042d2 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -512,7 +512,6 @@ uint32 cmd_spoolss_addprinterex(struct client_info *info, int argc, char *argv[] fstring srv_port_name; BOOL valid_port = False; TALLOC_CTX *mem_ctx = NULL; - uint32 result; fstrcpy(srv_name, "\\\\"); fstrcat(srv_name, info->dest_host); @@ -620,8 +619,9 @@ uint32 cmd_spoolss_addprinterex(struct client_info *info, int argc, char *argv[] /* if successful, spoolss_addprinterex() should return True and hnd should be a valid handle to an open printer */ - if ((result = spoolss_addprinterex(&hnd, srv_name, &print_info_2)) == NT_STATUS_NOPROBLEMO) + if (spoolss_addprinterex(&hnd, srv_name, &print_info_2)) { + DEBUG(0,("cmd_spoolss_addprinterex: [%s] added successfully.\n", printer_name)); if (!spoolss_closeprinter( &hnd )) { report (out_hnd, "cmd_spoolss_addprinterex: spoolss_closeprinter FAILED!\n"); @@ -629,7 +629,7 @@ uint32 cmd_spoolss_addprinterex(struct client_info *info, int argc, char *argv[] } else { - report (out_hnd, "cmd_spoolss_addprinterex: spoolss_addprinterex FAILED! [%d]\n", result); + report (out_hnd, "cmd_spoolss_addprinterex: spoolss_addprinterex FAILED!\n"); } |