From b4ea96ecd9bab32d06599d872f091576e31e12f8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Dec 2009 14:32:15 +1100 Subject: s4-libcli: use GUID_to_ndr_blob() --- source4/libcli/raw/rawrequest.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source4/libcli/raw') 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; } -- cgit