summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libappfuse')
-rw-r--r--libappfuse/FuseBridgeLoop.cc6
-rw-r--r--libappfuse/tests/FuseBridgeLoopTest.cc1
2 files changed, 6 insertions, 1 deletions
diff --git a/libappfuse/FuseBridgeLoop.cc b/libappfuse/FuseBridgeLoop.cc
index 07923071b..8b0c53eb2 100644
--- a/libappfuse/FuseBridgeLoop.cc
+++ b/libappfuse/FuseBridgeLoop.cc
@@ -179,7 +179,11 @@ class FuseBridgeEntry {
179 } 179 }
180 180
181 const uint32_t opcode = buffer_.request.header.opcode; 181 const uint32_t opcode = buffer_.request.header.opcode;
182 LOG(VERBOSE) << "Read a fuse packet, opcode=" << opcode; 182 const uint64_t unique = buffer_.request.header.unique;
183 LOG(VERBOSE) << "Read a fuse packet, opcode=" << opcode << " unique=" << unique;
184 if (unique == 0) {
185 return FuseBridgeState::kWaitToReadEither;
186 }
183 switch (opcode) { 187 switch (opcode) {
184 case FUSE_FORGET: 188 case FUSE_FORGET:
185 // Do not reply to FUSE_FORGET. 189 // Do not reply to FUSE_FORGET.
diff --git a/libappfuse/tests/FuseBridgeLoopTest.cc b/libappfuse/tests/FuseBridgeLoopTest.cc
index 51d605136..0a28451bf 100644
--- a/libappfuse/tests/FuseBridgeLoopTest.cc
+++ b/libappfuse/tests/FuseBridgeLoopTest.cc
@@ -67,6 +67,7 @@ class FuseBridgeLoopTest : public ::testing::Test {
67 memset(&request_, 0, sizeof(FuseRequest)); 67 memset(&request_, 0, sizeof(FuseRequest));
68 request_.header.opcode = opcode; 68 request_.header.opcode = opcode;
69 request_.header.len = sizeof(fuse_in_header); 69 request_.header.len = sizeof(fuse_in_header);
70 request_.header.unique = 1;
70 ASSERT_TRUE(request_.Write(dev_sockets_[0])); 71 ASSERT_TRUE(request_.Write(dev_sockets_[0]));
71 72
72 memset(&response_, 0, sizeof(FuseResponse)); 73 memset(&response_, 0, sizeof(FuseResponse));