summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-10 14:32:15 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-10 17:51:28 +1100
commitb4ea96ecd9bab32d06599d872f091576e31e12f8 (patch)
tree2c4bf5ec7f91bbcb2488f372a3e711fa51208636 /source4/libcli/raw
parent33cbe9c6310a7853a0189cd17b0f6c26f208cf16 (diff)
downloadsamba-b4ea96ecd9bab32d06599d872f091576e31e12f8.tar.gz
samba-b4ea96ecd9bab32d06599d872f091576e31e12f8.tar.bz2
samba-b4ea96ecd9bab32d06599d872f091576e31e12f8.zip
s4-libcli: use GUID_to_ndr_blob()
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/rawrequest.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 723e3d909c..52b9bf74bf 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -1007,19 +1007,17 @@ NTSTATUS smbcli_pull_guid(void *base, uint16_t offset,
/*
push a guid onto the wire. The buffer must hold 16 bytes
*/
-enum ndr_err_code smbcli_push_guid(void *base, uint16_t offset,
- const struct GUID *guid)
+NTSTATUS smbcli_push_guid(void *base, uint16_t offset, const struct GUID *guid)
{
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
- enum ndr_err_code ndr_err;
+ NTSTATUS status;
DATA_BLOB blob;
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL,
- guid, (ndr_push_flags_fn_t)ndr_push_GUID);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err) || blob.length != 16) {
+ status = GUID_to_ndr_blob(guid, tmp_ctx, &blob);
+ if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
- return ndr_err;
+ return status;
}
memcpy(offset + (uint8_t *)base, blob.data, blob.length);
talloc_free(tmp_ctx);
- return ndr_err;
+ return NT_STATUS_OK;
}