summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-02-20 10:19:02 +0000
committerAndrew Tridgell <tridge@samba.org>2001-02-20 10:19:02 +0000
commit23ded01d93ae83bbfab4c7b373f40e92ab1386db (patch)
tree8cdb7eb155c2cf4a029441657ca753f3c7547871 /source3/libsmb
parentbbf58942b7bc439c17733b579c1874ef77740a6f (diff)
downloadsamba-23ded01d93ae83bbfab4c7b373f40e92ab1386db.tar.gz
samba-23ded01d93ae83bbfab4c7b373f40e92ab1386db.tar.bz2
samba-23ded01d93ae83bbfab4c7b373f40e92ab1386db.zip
converted cli_mkdir()
(This used to be commit bce3ed01a9c3c7c89cdc21b60f1122dc6b6db264)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clifile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index ce9a79ede3..ab16b21564 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -107,7 +107,7 @@ BOOL cli_mkdir(struct cli_state *cli, char *dname)
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
- set_message(cli->outbuf,0, 2 + strlen(dname),True);
+ set_message(cli->outbuf,0, 0,True);
CVAL(cli->outbuf,smb_com) = SMBmkdir;
SSVAL(cli->outbuf,smb_tid,cli->cnum);
@@ -115,8 +115,9 @@ BOOL cli_mkdir(struct cli_state *cli, char *dname)
p = smb_buf(cli->outbuf);
*p++ = 4;
- pstrcpy(p,dname);
- unix_to_dos(p,True);
+ p += clistr_push(cli, p, dname, -1, CLISTR_CONVERT|CLISTR_TERMINATE);
+
+ set_message(cli->outbuf,0, PTR_DIFF(p, smb_buf(cli->outbuf)), False);
cli_send_smb(cli);
if (!cli_receive_smb(cli)) {