aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gtphub.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-12-02 15:43:10 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-12-03 11:47:12 +0100
commit996ec1d73150366fa105b7d42ba8003fb018fcf8 (patch)
treee28855041a38c61e5d437d40202e017e5145a10e /openbsc/src/gprs/gtphub.c
parent18d304961249c7815cf3a78ebd1697a4efd9ab42 (diff)
gtphub: wrap gtphub_write() for test suite.
Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src/gprs/gtphub.c')
-rw-r--r--openbsc/src/gprs/gtphub.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 27c70166e..55b900492 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -1741,30 +1741,6 @@ static int gtphub_handle_pdp_ctx(struct gtphub *hub,
}
-static int gtphub_write(const struct osmo_fd *to,
- const struct osmo_sockaddr *to_addr,
- const uint8_t *buf, size_t buf_len)
-{
- errno = 0;
- ssize_t sent = sendto(to->fd, buf, buf_len, 0,
- (struct sockaddr*)&to_addr->a, to_addr->l);
- LOG(LOGL_DEBUG, "to %s\n", osmo_sockaddr_to_str(to_addr));
-
- if (sent == -1) {
- LOG(LOGL_ERROR, "error: %s\n", strerror(errno));
- return -EINVAL;
- }
-
- if (sent != buf_len)
- LOG(LOGL_ERROR, "sent(%d) != data_len(%d)\n",
- (int)sent, (int)buf_len);
- else
- LOG(LOGL_DEBUG, "Sent %d\n%s\n",
- (int)sent, osmo_hexdump(buf, sent));
-
- return 0;
-}
-
static int gtphub_send_del_pdp_ctx(struct gtphub *hub,
struct gtphub_tunnel *tun,
int to_side)