aboutsummaryrefslogtreecommitdiffstats
path: root/src/links.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-23 16:18:18 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-23 16:18:18 +0100
commit8ade9b7bc235b644a1ce63ba0db9e855b118d267 (patch)
tree3fc6fe3bc758942107f7428561a46fd2c839cc86 /src/links.c
parentfca7b12e0d2fdcdfff334c4576899e82f99e8d43 (diff)
pcap: Fix stupid bug and unbreak pcap writing
Diffstat (limited to 'src/links.c')
-rw-r--r--src/links.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/links.c b/src/links.c
index 2e74fc5..086b95c 100644
--- a/src/links.c
+++ b/src/links.c
@@ -180,9 +180,9 @@ int link_clear_all(struct mtp_link_set *set)
int mtp_handle_pcap(struct mtp_link *link, int dir, const uint8_t *data, int len)
{
- if (link->pcap_fd < 0)
+ if (link->pcap_fd >= 0)
mtp_pcap_write_msu(link->pcap_fd, data, len);
- if (link->set->pcap_fd < 0)
+ if (link->set->pcap_fd >= 0)
mtp_pcap_write_msu(link->set->pcap_fd, data, len);
/* This might be too expensive? */