summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-03-13 03:45:29 +0000
committerAndrew Tridgell <tridge@samba.org>2001-03-13 03:45:29 +0000
commit26f63881e242947e7d4a5f5c3ce6f13305d2601e (patch)
tree57c44ed329bfedbb61d7ecf6e9a332a29d5c1dee
parent93143c96a6c7d882d83ea2724e4c1985fc1dbc2d (diff)
downloadsamba-26f63881e242947e7d4a5f5c3ce6f13305d2601e.tar.gz
samba-26f63881e242947e7d4a5f5c3ce6f13305d2601e.tar.bz2
samba-26f63881e242947e7d4a5f5c3ce6f13305d2601e.zip
added STR_ASCII flag to srvstr_pull()
(This used to be commit e54d37903013df1c799ab3aaa10f10df24e3de61)
-rw-r--r--source3/smbd/srvstr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c
index e420b8fa99..b944ed2578 100644
--- a/source3/smbd/srvstr.c
+++ b/source3/smbd/srvstr.c
@@ -119,12 +119,12 @@ int srvstr_pull(void *inbuf, char *dest, const void *src, int dest_len, int src_
dest_len = sizeof(pstring);
}
- if (srvstr_align(inbuf, PTR_DIFF(src, inbuf))) {
+ if (!(flags & STR_ASCII) && srvstr_align(inbuf, PTR_DIFF(src, inbuf))) {
src++;
if (src_len > 0) src_len--;
}
- if (!(flags & STR_UNICODE) && !UNICODE_FLAG()) {
+ if ((flags & STR_ASCII) || (!(flags & STR_UNICODE) && !UNICODE_FLAG())) {
/* the server doesn't want unicode */
if (flags & STR_TERMINATE) {
safe_strcpy(dest, src, dest_len);