From 3b3e21bd9ba701a97e752205263a7903619541c7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 19 Mar 2009 12:20:11 +1100 Subject: Convert Samba3 to use the common lib/util/charset API This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett --- source3/libsmb/climessage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/climessage.c') diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c index 808190e79c..6538902f5d 100644 --- a/source3/libsmb/climessage.c +++ b/source3/libsmb/climessage.c @@ -85,7 +85,7 @@ int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int p = smb_buf(cli->outbuf); *p++ = 1; - if (!convert_string_allocate(NULL, CH_UNIX, CH_DOS, msg, len, + if (!convert_string_talloc(talloc_tos(), CH_UNIX, CH_DOS, msg, len, (void **)(void *)&msgdos, &lendos, True) || !msgdos) { DEBUG(3,("Conversion failed, sending message in UNIX charset\n")); SSVAL(p, 0, len); p += 2; @@ -101,7 +101,7 @@ int cli_message_text_build(struct cli_state *cli, const char *msg, int len, int } memcpy(p, msgdos, lendos); p += lendos; - SAFE_FREE(msgdos); + TALLOC_FREE(msgdos); } cli_setup_bcc(cli, p); -- cgit