aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-02-11 08:35:25 +0100
committerClemens Ladisch <clemens@ladisch.de>2012-05-18 13:48:23 +0200
commit8b69767697d6c43e6f4127f14c1384441b9fd8ff (patch)
treecc5f73aed6e971f613e1ac9d96737f46ba6b8c42
parentb82aed4f1d39ac9e054b1d2d3c69db14c42c7151 (diff)
downloadlinux-firewire-utils-8b69767697d6c43e6f4127f14c1384441b9fd8ff.tar.gz
firewire-request: fix FCP transaction handling
The event polling loop exited when either the command's ack or the actual response was received, so there was a chance for the response to be suppressed.
-rw-r--r--src/firewire-request.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firewire-request.c b/src/firewire-request.c
index 7da792c..e1791ca 100644
--- a/src/firewire-request.c
+++ b/src/firewire-request.c
@@ -1,7 +1,7 @@
/*
* firewire-request.c - send requests to FireWire devices
*
- * Copyright 2010 Clemens Ladisch <clemens@ladisch.de>
+ * Copyright 2010-2011 Clemens Ladisch <clemens@ladisch.de>
*
* licensed under the terms of version 2 of the GNU General Public License
*/
@@ -354,7 +354,7 @@ static void do_fcp(void)
response_received = false;
pfd.fd = fd;
pfd.events = POLLIN;
- while (!ack_received && !response_received) {
+ while (!ack_received || !response_received) {
ready = poll(&pfd, 1, 123);
if (ready < 0) {
perror("poll failed");