aboutsummaryrefslogtreecommitdiffstats
path: root/src/link_udp.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-22 17:36:01 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-22 21:33:11 +0100
commitddf8eae7da02b20dd4310af9428a1eb18b1dd57d (patch)
tree530001939877c4e7a75adf02d33eb5f6a8c2b4dd /src/link_udp.c
parentc6bfa27b5e56845491c6d03406d4dba65d86095f (diff)
pcap: Run all pcap operations through one method
Diffstat (limited to 'src/link_udp.c')
-rw-r--r--src/link_udp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/link_udp.c b/src/link_udp.c
index f7c6703..a9b2d9b 100644
--- a/src/link_udp.c
+++ b/src/link_udp.c
@@ -61,8 +61,7 @@ static int udp_write_cb(struct bsc_fd *fd, struct msgb *msg)
}
LOGP(DINP, LOGL_DEBUG, "Sending MSU: %s\n", hexdump(msg->data, msg->len));
- if (link->base.pcap_fd >= 0)
- mtp_pcap_write_msu(link->base.pcap_fd, msg->l2h, msgb_l2len(msg));
+ mtp_handle_pcap(&link->base, msg->l2h, msgb_l2len(msg));
/* the assumption is we have connected the socket to the remote */
rc = sendto(fd->fd, msg->data, msg->len, 0,
@@ -137,8 +136,7 @@ static int udp_read_cb(struct bsc_fd *fd)
msg->l2h = msgb_put(msg, length);
LOGP(DINP, LOGL_DEBUG, "MSU data on: %p data %s.\n", link, hexdump(msg->data, msg->len));
- if (link->pcap_fd >= 0)
- mtp_pcap_write_msu(link->pcap_fd, msg->l2h, msgb_l2len(msg));
+ mtp_handle_pcap(link, msg->l2h, msgb_l2len(msg));
mtp_link_set_data(link, msg);
exit: