9
0
Fork 0

pcap: Fix stupid bug and unbreak pcap writing

This commit is contained in:
Holger Hans Peter Freyther 2011-01-23 16:18:18 +01:00
parent fca7b12e0d
commit 8ade9b7bc2
1 changed files with 2 additions and 2 deletions

View File

@ -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? */