diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-13 20:37:13 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-13 23:56:01 +0200 |
commit | 69cfa179ef9a1ae787b4e8134cfaef670cd31095 (patch) | |
tree | 9547c594ff0a447eb91edf3e184e9830a31e909d /openbsc/src/nat/bsc_nat.c | |
parent | 4d44fc56e782dd0598ddfb8fc963c46c3b1b5a20 (diff) |
nat: Make the write_queue write callback a public function
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r-- | openbsc/src/nat/bsc_nat.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index ded05c6c8..fc8b0a952 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -984,17 +984,6 @@ static int ipaccess_bsc_read_cb(struct bsc_fd *bfd) return 0; } -static int ipaccess_bsc_write_cb(struct bsc_fd *bfd, struct msgb *msg) -{ - int rc; - - rc = write(bfd->fd, msg->data, msg->len); - if (rc != msg->len) - LOGP(DNAT, LOGL_ERROR, "Failed to write message to the BSC.\n"); - - return rc; -} - static int ipaccess_listen_bsc_cb(struct bsc_fd *bfd, unsigned int what) { struct bsc_connection *bsc; @@ -1049,7 +1038,7 @@ static int ipaccess_listen_bsc_cb(struct bsc_fd *bfd, unsigned int what) bsc->write_queue.bfd.data = bsc; bsc->write_queue.bfd.fd = fd; bsc->write_queue.read_cb = ipaccess_bsc_read_cb; - bsc->write_queue.write_cb = ipaccess_bsc_write_cb; + bsc->write_queue.write_cb = bsc_write_cb; bsc->write_queue.bfd.when = BSC_FD_READ; if (bsc_register_fd(&bsc->write_queue.bfd) < 0) { LOGP(DNAT, LOGL_ERROR, "Failed to register BSC fd.\n"); |