aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ipaccess/ipaccess-proxy.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 21:49:41 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 21:51:26 +0200
commit9960d59fffa176ab022c9641c7358030d7f8065c (patch)
tree18573b4edf3eb496307d4b33d99ca031c98c3981 /openbsc/src/ipaccess/ipaccess-proxy.c
parent161bd6d253abeef6b181dbe9fdd245bd7c9884af (diff)
parent3c71232b112a40bf09bd9687f1bc6aed12e863a3 (diff)
Merge remote branch 'origin/master' into on-waves/bsc-master
* Move to the new log code and update binaries * Catch up with lchan changes from master Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/bsc_rll.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_04_08.c openbsc/src/gsm_04_11.c openbsc/src/gsm_subscriber_base.c openbsc/src/handover_logic.c openbsc/src/silent_call.c openbsc/src/transaction.c openbsc/src/vty_interface.c openbsc/src/vty_interface_cmds.c
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)