Changeset 596 for trunk/server/librpc/ndr/ndr_basic.c
- Timestamp:
- Jul 2, 2011, 3:35:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/librpc/ndr/ndr_basic.c
r414 r596 1012 1012 _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) 1013 1013 { 1014 if (ndr->flags & LIBNDR_ALIGN_FLAGS) { 1015 if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1014 if (ndr->flags & LIBNDR_FLAG_REMAINING) { 1015 /* nothing to do */ 1016 } else if (ndr->flags & LIBNDR_ALIGN_FLAGS) { 1017 if (ndr->flags & LIBNDR_FLAG_NOALIGN) { 1018 blob.length = 0; 1019 } else if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1016 1020 blob.length = NDR_ALIGN(ndr, 2); 1017 1021 } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { … … 1022 1026 NDR_PUSH_ALLOC_SIZE(ndr, blob.data, blob.length); 1023 1027 data_blob_clear(&blob); 1024 } else if (!(ndr->flags & LIBNDR_FLAG_REMAINING)){1028 } else { 1025 1029 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length)); 1026 1030 } … … 1036 1040 uint32_t length = 0; 1037 1041 1038 if (ndr->flags & LIBNDR_ALIGN_FLAGS) { 1039 if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1042 if (ndr->flags & LIBNDR_FLAG_REMAINING) { 1043 length = ndr->data_size - ndr->offset; 1044 } else if (ndr->flags & LIBNDR_ALIGN_FLAGS) { 1045 if (ndr->flags & LIBNDR_FLAG_NOALIGN) { 1046 length = 0; 1047 } else if (ndr->flags & LIBNDR_FLAG_ALIGN2) { 1040 1048 length = NDR_ALIGN(ndr, 2); 1041 1049 } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { … … 1047 1055 length = ndr->data_size - ndr->offset; 1048 1056 } 1049 } else if (ndr->flags & LIBNDR_FLAG_REMAINING) {1050 length = ndr->data_size - ndr->offset;1051 1057 } else { 1052 1058 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length));
Note:
See TracChangeset
for help on using the changeset viewer.