aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 11:17:56 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 11:17:56 +0200
commitc70e8c2103f2e22b3f1712092f1f597cebb9f7ba (patch)
treed31d59116a09fdd555bbcd6adad743227c446416
parentb462a03c3525090e3a1d4999980ae19349ffb9fd (diff)
nat: Fix thinko... use the right fd to determine the IP of the bts
Use the fd of the BSC Connection to determine the IP address of the BTS as we are seeing it.
-rw-r--r--openbsc/src/nat/bsc_mgcp_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c
index 9e7c822ad..2dbf1fd00 100644
--- a/openbsc/src/nat/bsc_mgcp_utils.c
+++ b/openbsc/src/nat/bsc_mgcp_utils.c
@@ -156,7 +156,7 @@ int bsc_mgcp_policy_cb(struct mgcp_config *cfg, int endpoint, int state, const c
if (state == MGCP_ENDP_CRCX) {
struct sockaddr_in sock;
socklen_t len = sizeof(sock);
- if (getpeername(nat->mgcp_queue.bfd.fd, (struct sockaddr *) &sock, &len) != 0) {
+ if (getpeername(bsc_con->write_queue.bfd.fd, (struct sockaddr *) &sock, &len) != 0) {
LOGP(DMGCP, LOGL_ERROR, "Can not get the peername...%d/%s\n",
errno, strerror(errno));
} else {