aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-05 17:58:52 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-05 17:58:52 +0200
commit07bb5094344876a85485c9ffee3247ff38fcece3 (patch)
tree66a3bad25d5ab15dfd016b5bd193e37b799c808a
parent08db6ca509f8e06dc6aa686a92cad8613ccbc31e (diff)
nat: Logging improvement for the nat.
Print some more information, e.g. when a BSC is connected and authenticated, print the SCCP ref number.
-rw-r--r--openbsc/src/bsc_msc.c1
-rw-r--r--openbsc/src/nat/bsc_mgcp_utils.c3
-rw-r--r--openbsc/src/nat/bsc_nat.c3
-rw-r--r--openbsc/src/nat/bsc_sccp.c3
4 files changed, 7 insertions, 3 deletions
diff --git a/openbsc/src/bsc_msc.c b/openbsc/src/bsc_msc.c
index a9dc62021..b3cdd3ac3 100644
--- a/openbsc/src/bsc_msc.c
+++ b/openbsc/src/bsc_msc.c
@@ -84,6 +84,7 @@ static int msc_connection_connect(struct bsc_fd *fd, unsigned int what)
fd->when = BSC_FD_READ;
con->is_connected = 1;
+ LOGP(DMSC, LOGL_NOTICE, "(Re)Connected to the MSC.\n");
if (con->connected)
con->connected(con);
return 0;
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c
index 82eeefc6b..0c666c075 100644
--- a/openbsc/src/nat/bsc_mgcp_utils.c
+++ b/openbsc/src/nat/bsc_mgcp_utils.c
@@ -213,7 +213,8 @@ void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg)
}
if (!bsc_endp) {
- LOGP(DMGCP, LOGL_ERROR, "Could not find active endpoint: %s\n", transaction_id);
+ LOGP(DMGCP, LOGL_ERROR, "Could not find active endpoint: %s for msg: '%s'\n",
+ transaction_id, (const char *) msg->l2h);
return;
}
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index badbc9a53..fcf732b42 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -375,6 +375,7 @@ static void ipaccess_auth_bsc(struct tlv_parsed *tvp, struct bsc_connection *bsc
bsc->authenticated = 1;
bsc->lac = conf->lac;
bsc_del_timer(&bsc->id_timeout);
+ LOGP(DNAT, LOGL_NOTICE, "Authenticated bsc %d\n", bsc->lac);
break;
}
}
@@ -570,7 +571,7 @@ static int ipaccess_listen_bsc_cb(struct bsc_fd *bfd, unsigned int what)
return -2;
}
- LOGP(DNAT, LOGL_INFO, "Registered new BSC\n");
+ LOGP(DNAT, LOGL_NOTICE, "Registered new BSC\n");
llist_add(&bsc->list_entry, &nat->bsc_connections);
send_id_ack(bsc);
send_id_req(bsc);
diff --git a/openbsc/src/nat/bsc_sccp.c b/openbsc/src/nat/bsc_sccp.c
index 995983f91..84a588a93 100644
--- a/openbsc/src/nat/bsc_sccp.c
+++ b/openbsc/src/nat/bsc_sccp.c
@@ -140,7 +140,8 @@ void remove_sccp_src_ref(struct bsc_connection *bsc, struct msgb *msg, struct bs
}
}
- LOGP(DNAT, LOGL_ERROR, "Unknown connection.\n");
+ LOGP(DNAT, LOGL_ERROR, "Can not remove connection: 0x%x\n",
+ sccp_src_ref_to_int(parsed->src_local_ref));
}
/*