diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-06 17:16:33 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-06 17:16:33 -0800 |
commit | 1b92ea5559bfa00016103508feac9a06ea4b66ae (patch) | |
tree | c11509a3fc07e7c828e1b40e4259f80d1fc0bf2e /source3/libsmb/clistr.c | |
parent | 9bd35ef153ef4b7f892dcf9e69c2232b940a9e18 (diff) | |
download | samba-1b92ea5559bfa00016103508feac9a06ea4b66ae.tar.gz samba-1b92ea5559bfa00016103508feac9a06ea4b66ae.tar.bz2 samba-1b92ea5559bfa00016103508feac9a06ea4b66ae.zip |
Remove pstrings from client/client.c by doing a large rewrite.
Mostly compiles....
Jeremy.
(This used to be commit c87f3eba9aa52f4ab25d77e2167262bf5c43b1a6)
Diffstat (limited to 'source3/libsmb/clistr.c')
-rw-r--r-- | source3/libsmb/clistr.c | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/source3/libsmb/clistr.c b/source3/libsmb/clistr.c index 39315729c4..5d20d632aa 100644 --- a/source3/libsmb/clistr.c +++ b/source3/libsmb/clistr.c @@ -20,9 +20,13 @@ #include "includes.h" -size_t clistr_push_fn(const char *function, unsigned int line, - struct cli_state *cli, void *dest, - const char *src, int dest_len, int flags) +size_t clistr_push_fn(const char *function, + unsigned int line, + struct cli_state *cli, + void *dest, + const char *src, + int dest_len, + int flags) { size_t buf_used = PTR_DIFF(dest, cli->outbuf); if (dest_len == -1) { @@ -38,23 +42,46 @@ size_t clistr_push_fn(const char *function, unsigned int line, dest, src, cli->bufsize - buf_used, flags); } - + /* 'normal' push into size-specified buffer */ return push_string_fn(function, line, cli->outbuf, SVAL(cli->outbuf, smb_flg2), dest, src, dest_len, flags); } -size_t clistr_pull_fn(const char *function, unsigned int line, - struct cli_state *cli, char *dest, const void *src, - int dest_len, int src_len, - int flags) +size_t clistr_pull_fn(const char *function, + unsigned int line, + struct cli_state *cli, + char *dest, + const void *src, + int dest_len, + int src_len, + int flags) { return pull_string_fn(function, line, cli->inbuf, SVAL(cli->inbuf, smb_flg2), dest, src, dest_len, src_len, flags); } +size_t clistr_pull_talloc_fn(const char *function, + unsigned int line, + TALLOC_CTX *ctx, + struct cli_state *cli, + char **pp_dest, + const void *src, + int src_len, + int flags) +{ + return pull_string_talloc_fn(function, + line, + ctx, + cli->inbuf, + SVAL(cli->inbuf, smb_flg2), + pp_dest, + src, + src_len, + flags); +} size_t clistr_align_out(struct cli_state *cli, const void *p, int flags) { |