diff options
Diffstat (limited to 'libappfuse/FuseBridgeLoop.cc')
-rw-r--r-- | libappfuse/FuseBridgeLoop.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libappfuse/FuseBridgeLoop.cc b/libappfuse/FuseBridgeLoop.cc index 3f47066a8..07923071b 100644 --- a/libappfuse/FuseBridgeLoop.cc +++ b/libappfuse/FuseBridgeLoop.cc @@ -57,6 +57,12 @@ void GetObservedEvents(FuseBridgeState state, int* device_events, int* proxy_eve return; } } + +void LogResponseError(const std::string& message, const FuseResponse& response) { + LOG(ERROR) << message << ": header.len=" << response.header.len + << " header.error=" << response.header.error + << " header.unique=" << response.header.unique; +} } class FuseBridgeEntry { @@ -135,6 +141,7 @@ class FuseBridgeEntry { } if (!buffer_.response.Write(device_fd_)) { + LogResponseError("Failed to write a reply from proxy to device", buffer_.response); return FuseBridgeState::kClosing; } @@ -200,6 +207,7 @@ class FuseBridgeEntry { } if (!buffer_.response.Write(device_fd_)) { + LogResponseError("Failed to write a response to device", buffer_.response); return FuseBridgeState::kClosing; } @@ -215,6 +223,11 @@ class FuseBridgeEntry { case ResultOrAgain::kSuccess: return FuseBridgeState::kWaitToReadEither; case ResultOrAgain::kFailure: + LOG(ERROR) << "Failed to write a request to proxy:" + << " header.len=" << buffer_.request.header.len + << " header.opcode=" << buffer_.request.header.opcode + << " header.unique=" << buffer_.request.header.unique + << " header.nodeid=" << buffer_.request.header.nodeid; return FuseBridgeState::kClosing; case ResultOrAgain::kAgain: return FuseBridgeState::kWaitToWriteProxy; |