diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-31 01:32:33 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-31 01:32:33 +0000 |
commit | 2558f81a8d60435b6618f1c7b408117a765d94ff (patch) | |
tree | b7c6a120257a8abbf635aad01c1bb6bb4dfd3a08 /source4/librpc/ndr/ndr_basic.c | |
parent | f4307200ac338202bc4680cd25fcbac83620ae95 (diff) | |
download | samba-2558f81a8d60435b6618f1c7b408117a765d94ff.tar.gz samba-2558f81a8d60435b6618f1c7b408117a765d94ff.tar.bz2 samba-2558f81a8d60435b6618f1c7b408117a765d94ff.zip |
the endpoint mapper now works in bigendian mode
(This used to be commit 1f89d89954a3501e08efa97d1276ba9bb2d2305f)
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index be4f16e89b..0c63faf347 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -22,7 +22,7 @@ #include "includes.h" -#define NDR_BE(ndr) ((ndr)->flags & LIBNDR_FLAG_BIGENDIAN) +#define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN) #define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs)) #define NDR_IVAL(ndr, ofs) (NDR_BE(ndr)?RIVAL(ndr->data,ofs):IVAL(ndr->data,ofs)) #define NDR_SSVAL(ndr, ofs, v) do { if (NDR_BE(ndr)) { RSSVAL(ndr->data,ofs,v); } else SSVAL(ndr->data,ofs,v); } while (0) @@ -350,7 +350,7 @@ NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s) return NT_STATUS_OK; } - if (ndr->flags & LIBNDR_FLAG_BIGENDIAN) { + if (NDR_BE(ndr)) { chset = CH_UCS2BE; } @@ -472,7 +472,7 @@ NTSTATUS ndr_push_string(struct ndr_push *ndr, int ndr_flags, const char *s) return NT_STATUS_OK; } - if (ndr->flags & LIBNDR_FLAG_BIGENDIAN) { + if (NDR_BE(ndr)) { chset = CH_UCS2BE; } |