2 * Copyright 2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Paweł Dziepak, pdziepak@quarnos.org
13 #include <util/kernel_cpp.h>
21 Reply::Reply(void* buffer
, int size
)
24 fStream(buffer
, size
),
27 ASSERT(buffer
!= NULL
);
29 fXID
= fStream
.GetUInt();
30 if (fStream
.GetInt() != REPLY
) {
35 if (fStream
.GetInt() == MSG_ACCEPTED
) {
37 fStream
.GetOpaque(NULL
);
39 switch (fStream
.GetInt()) {
45 fError
= B_DEVICE_NOT_FOUND
;
48 fError
= B_MISMATCHED_VALUES
;
57 } else { // MSG_DENIED
58 if (fStream
.GetInt() == RPC_MISMATCH
) {
59 fError
= B_DEVICE_NOT_FOUND
;
61 } else { // AUTH_ERROR
62 fError
= B_PERMISSION_DENIED
;