git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
242a6a9
)
added STR_ASCII flag to srvstr_pull()
author
Andrew Tridgell
<tridge@samba.org>
Tue, 13 Mar 2001 03:45:29 +0000
(
03:45
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 13 Mar 2001 03:45:29 +0000
(
03:45
+0000)
source/smbd/srvstr.c
patch
|
blob
|
history
diff --git
a/source/smbd/srvstr.c
b/source/smbd/srvstr.c
index e420b8fa999063b016641b584524ffa4da22318b..b944ed257829d4c209b2eae1f1ca303a7d204c1a 100644
(file)
--- a/
source/smbd/srvstr.c
+++ b/
source/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);