pcap: Fix stupid bug and unbreak pcap writing
This commit is contained in:
parent
fca7b12e0d
commit
8ade9b7bc2
|
@ -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)
|
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);
|
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);
|
mtp_pcap_write_msu(link->set->pcap_fd, data, len);
|
||||||
|
|
||||||
/* This might be too expensive? */
|
/* This might be too expensive? */
|
||||||
|
|
Reference in New Issue