diff options
Diffstat (limited to 'source4/libcli/raw/rawrequest.c')
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 14 |
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; } |