diff options
author | Luke Leighton <lkcl@samba.org> | 1999-10-30 22:34:38 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-10-30 22:34:38 +0000 |
commit | 4cda1d2b4faaf9a3abeb338e909a52f8b51fd89d (patch) | |
tree | 76981c3569f836f7f815168f76caf7a255fc15e4 /source3/lib | |
parent | eae9b12ca56837a2a39c1ebad21eee7e502b579b (diff) | |
download | samba-4cda1d2b4faaf9a3abeb338e909a52f8b51fd89d.tar.gz samba-4cda1d2b4faaf9a3abeb338e909a52f8b51fd89d.tar.bz2 samba-4cda1d2b4faaf9a3abeb338e909a52f8b51fd89d.zip |
NetServerTransportEnum parsing, client-side and rpcclient "srvtransports" added.
(This used to be commit 37f4aac06fec3fbb34ed40d1010829b2e1f28558)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_unistr.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 1dff5964fd..e1a2e26623 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -238,3 +238,26 @@ void buffer2_to_multistr(char *dest, const BUFFER2 *str, size_t maxlen) *dest = 0; } + +/******************************************************************* + Convert a buffer4 to space-separated ASCII. + ********************************************************************/ +void buffer4_to_str(char *dest, const BUFFER4 *str, size_t maxlen) +{ + char *destend; + const uchar *src; + size_t len; + register uint16 c; + + src = str->buffer; + len = MIN(str->buf_len, maxlen); + destend = dest + len; + + while (dest < destend) + { + c = *(src++); + *(dest++) = (char)c; + } + + *dest = 0; +} |