From 8ade9b7bc235b644a1ce63ba0db9e855b118d267 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 23 Jan 2011 16:18:18 +0100 Subject: pcap: Fix stupid bug and unbreak pcap writing --- src/links.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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? */ -- cgit v1.2.3