From 4786a493f70070dce6de4cbe488c9de1bdbb75ad Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 17 Mar 2009 14:04:43 +1100 Subject: Solve some of the conflict between Samba3 and Samba4 push_string This renames push_string in Samba3 into push_string_base and push_string_check for the two different use cases. This should allow push_string to be imported from Samba4, using it's calling conventions. --- source3/libsmb/clistr.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'source3/libsmb/clistr.c') diff --git a/source3/libsmb/clistr.c b/source3/libsmb/clistr.c index 86857814043..1f296ebd099 100644 --- a/source3/libsmb/clistr.c +++ b/source3/libsmb/clistr.c @@ -32,21 +32,23 @@ size_t clistr_push_fn(const char *function, if (dest_len == -1) { if (((ptrdiff_t)dest < (ptrdiff_t)cli->outbuf) || (buf_used > cli->bufsize)) { DEBUG(0, ("Pushing string of 'unlimited' length into non-SMB buffer!\n")); - return push_string_fn(function, line, - cli->outbuf, - SVAL(cli->outbuf, smb_flg2), - dest, src, -1, flags); + return push_string_base(function, line, + cli->outbuf, + SVAL(cli->outbuf, smb_flg2), + dest, src, -1, flags); } - return push_string_fn(function, line, cli->outbuf, - SVAL(cli->outbuf, smb_flg2), - dest, src, cli->bufsize - buf_used, - flags); + return push_string_base(function, line, + cli->outbuf, + SVAL(cli->outbuf, smb_flg2), + 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); + return push_string_base(function, line, + cli->outbuf, + SVAL(cli->outbuf, smb_flg2), + dest, src, dest_len, flags); } size_t clistr_pull_fn(const char *function, -- cgit