diff options
author | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:28:53 -0500 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:28:53 -0500 |
commit | 65229e966119f0b1537d258854a54105f32ae399 (patch) | |
tree | c6be94324703d914228290a8354021c2691f3ebe /source/lib/charcnv.c | |
parent | 95e77b14b5440a9ced8fdf6dc803b90c9518b8e0 (diff) | |
download | samba-8dc54ea6d0e5bf00e069e52ef608baafc5f05ce2.tar.gz |
[GLUE] Rsync SAMBA_3_0 SVN r25598 in order to create the v3-0-test branch.samba-misc-tags/initial-v3-0-test
Diffstat (limited to 'source/lib/charcnv.c')
-rw-r--r-- | source/lib/charcnv.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index 5ca7f201c24..8d5fbc8118d 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -168,7 +168,7 @@ void init_iconv(void) conv_handles[c1][c2] = smb_iconv_open(n2,n1); if (!conv_handles[c1][c2]) { DEBUG(0,("init_iconv: Conversion from %s to %s failed", n1, n2)); - smb_panic("init_iconv: conv_handle initialization failed"); + smb_panic("init_iconv: conv_handle initialization failed."); } } } @@ -1376,24 +1376,16 @@ size_t push_string_fn(const char *function, unsigned int line, const void *base_ The resulting string in "dest" is always null terminated. **/ -size_t pull_string_fn(const char *function, unsigned int line, - const void *base_ptr, uint16 smb_flags2, char *dest, - const void *src, size_t dest_len, size_t src_len, - int flags) +size_t pull_string_fn(const char *function, unsigned int line, const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags) { #ifdef DEVELOPER if (dest_len != (size_t)-1) clobber_region(function, line, dest, dest_len); #endif - if ((base_ptr == NULL) && ((flags & (STR_ASCII|STR_UNICODE)) == 0)) { - smb_panic("No base ptr to get flg2 and neither ASCII nor " - "UNICODE defined"); - } - if (!(flags & STR_ASCII) && \ ((flags & STR_UNICODE || \ - (smb_flags2 & FLAGS2_UNICODE_STRINGS)))) { + (SVAL(base_ptr, smb_flg2) & FLAGS2_UNICODE_STRINGS)))) { return pull_ucs2(base_ptr, dest, src, dest_len, src_len, flags); } return pull_ascii(dest, src, dest_len, src_len, flags); |