aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ipaccess/ipaccess-proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/ipaccess/ipaccess-proxy.c')
-rw-r--r--openbsc/src/ipaccess/ipaccess-proxy.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c
index 217e0bdf1..386081349 100644
--- a/openbsc/src/ipaccess/ipaccess-proxy.c
+++ b/openbsc/src/ipaccess/ipaccess-proxy.c
@@ -42,7 +42,7 @@
#include <openbsc/ipaccess.h>
#include <osmocore/talloc.h>
-static struct debug_target *stderr_target;
+static struct log_target *stderr_target;
/* one instance of an ip.access protocol proxy */
struct ipa_proxy {
@@ -265,10 +265,10 @@ static void _logp_ipbc_uid(unsigned int ss, unsigned int lvl, char *file, int li
struct ipa_bts_conn *ipbc, u_int8_t trx_id)
{
if (ipbc)
- debugp2(ss, lvl, file, line, 0, "(%u/%u/%u) ", ipbc->unit_id.site_id,
+ logp2(ss, lvl, file, line, 0, "(%u/%u/%u) ", ipbc->unit_id.site_id,
ipbc->unit_id.bts_id, trx_id);
else
- debugp2(ss, lvl, file, line, 0, "unknown ");
+ logp2(ss, lvl, file, line, 0, "unknown ");
}
/* UDP socket handling */
@@ -550,6 +550,7 @@ static int ipaccess_rcvmsg(struct ipa_proxy_conn *ipc, struct msgb *msg,
}
/* lookup BTS, create sign_link, ... */
+ site_id = bts_id = trx_id = 0;
parse_unitid((char *)TLVP_VAL(&tlvp, IPAC_IDTAG_UNIT),
&site_id, &bts_id, &trx_id);
ipbc = find_bts_by_unitid(ipp, site_id, bts_id);
@@ -946,7 +947,7 @@ static int listen_fd_cb(struct bsc_fd *listen_bfd, unsigned int what)
perror("accept");
return ret;
}
- DEBUGP(DINP, "accept()ed new %s link from %s\n",
+ DEBUGP(DINP, "accept()ed new %s link from %s\n",
(listen_bfd->priv_nr & 0xff) == OML_FROM_BTS ? "OML" : "RSL",
inet_ntoa(sa.sin_addr));
@@ -1108,11 +1109,11 @@ int main(int argc, char **argv)
tall_bsc_ctx = talloc_named_const(NULL, 1, "ipaccess-proxy");
- debug_init();
- stderr_target = debug_target_create_stderr();
- debug_add_target(stderr_target);
- debug_set_all_filter(stderr_target, 1);
- debug_parse_category_mask(stderr_target, "DINP:DMI");
+ log_init(&log_info);
+ stderr_target = log_target_create_stderr();
+ log_add_target(stderr_target);
+ log_set_all_filter(stderr_target, 1);
+ log_parse_category_mask(stderr_target, "DINP:DMI");
rc = ipaccess_proxy_setup();
if (rc < 0)