summaryrefslogtreecommitdiffstats
path: root/source3/libads
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-09 18:10:18 +0100
committerGünther Deschner <gd@samba.org>2009-02-09 19:07:34 +0100
commit438af255c6dcbc225357ae5162853915002d0d15 (patch)
tree57f072633329403d834b5658cf7c39d76486ae91 /source3/libads
parentb3a2b3ade0ddd3ddd93079286d2a06547d182a99 (diff)
downloadsamba-438af255c6dcbc225357ae5162853915002d0d15.tar.gz
samba-438af255c6dcbc225357ae5162853915002d0d15.tar.xz
samba-438af255c6dcbc225357ae5162853915002d0d15.zip
s3-rpcclient: use srv_name_slash instead of formating servername again and again.
Guenther
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap_printer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index 023acaa638b..c9c43f0e108 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -310,20 +310,19 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
const char *printer)
{
WERROR result;
- char *printername, *servername;
+ char *printername;
REGVAL_CTR *dsdriver_ctr, *dsspooler_ctr;
uint32 i;
POLICY_HND pol;
- if ((asprintf(&servername, "\\\\%s", cli->desthost) == -1)
- || (asprintf(&printername, "%s\\%s", servername, printer) == -1)) {
+ if ((asprintf(&printername, "%s\\%s", cli->srv_name_slash, printer) == -1)) {
DEBUG(3, ("Insufficient memory\n"));
return WERR_NOMEM;
}
result = rpccli_spoolss_open_printer_ex(cli, mem_ctx, printername,
"", MAXIMUM_ALLOWED_ACCESS,
- servername, cli->auth->user_name,
+ cli->srv_name_slash, cli->auth->user_name,
&pol);
if (!W_ERROR_IS_OK(result)) {
DEBUG(3, ("Unable to open printer %s, error is %s.\n",