diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-02-21 04:14:28 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-02-21 04:14:28 +0000 |
commit | d689f00026541dd2cb87c6949fdc2f8eb3ad919f (patch) | |
tree | 864274dbd6a3e30fb029ea2dee72c9803b0a5e13 /source3/libsmb/clirap.c | |
parent | 7fb8d5a00bf0e13f5198c3f1cdae1343d636bdd0 (diff) | |
download | samba-d689f00026541dd2cb87c6949fdc2f8eb3ad919f.tar.gz samba-d689f00026541dd2cb87c6949fdc2f8eb3ad919f.tar.xz samba-d689f00026541dd2cb87c6949fdc2f8eb3ad919f.zip |
converted the last couple of functions in libsmb to be unicode
the whole of libsmb should now do unicode where appropriate
(This used to be commit ac7529d2b69826f8214d5632c31778cc87216653)
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r-- | source3/libsmb/clirap.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index bf0940d1d6f..3c87464495d 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -388,13 +388,15 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, int count=8; BOOL ret; time_t (*date_fn)(void *); + char *p; - param_len = strlen(fname) + 7; + p = param; + memset(p, 0, 6); + SSVAL(p, 0, SMB_INFO_STANDARD); + p += 6; + p += clistr_push(cli, p, fname, sizeof(pstring)-6, CLISTR_TERMINATE | CLISTR_CONVERT); - memset(param, 0, param_len); - SSVAL(param, 0, SMB_INFO_STANDARD); - pstrcpy(¶m[6], fname); - unix_to_dos(¶m[6],True); + param_len = PTR_DIFF(p, param); do { ret = (cli_send_trans(cli, SMBtrans2, @@ -462,13 +464,15 @@ BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, uint16 setup = TRANSACT2_QPATHINFO; pstring param; char *rparam=NULL, *rdata=NULL; + char *p; - param_len = strlen(fname) + 7; + p = param; + memset(p, 0, 6); + SSVAL(p, 0, SMB_QUERY_FILE_ALL_INFO); + p += 6; + p += clistr_push(cli, p, fname, sizeof(pstring)-6, CLISTR_TERMINATE | CLISTR_CONVERT); - memset(param, 0, param_len); - SSVAL(param, 0, SMB_QUERY_FILE_ALL_INFO); - pstrcpy(¶m[6], fname); - unix_to_dos(¶m[6],True); + param_len = PTR_DIFF(p, param); if (!cli_send_trans(cli, SMBtrans2, NULL, /* name */ |