diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-19 12:20:11 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-14 12:53:56 +1000 |
commit | 3b3e21bd9ba701a97e752205263a7903619541c7 (patch) | |
tree | 3f0cdf8e4d5a550a323e73d229083d6329b3f236 /source3/libsmb/climessage.c | |
parent | 4786a493f70070dce6de4cbe488c9de1bdbb75ad (diff) | |
download | samba-3b3e21bd9ba701a97e752205263a7903619541c7.tar.gz |
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
Diffstat (limited to 'source3/libsmb/climessage.c')
-rw-r--r-- | source3/libsmb/climessage.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |