diff options
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-config.c | 16 | ||||
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-find.c | 4 | ||||
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-proxy.c | 19 |
3 files changed, 20 insertions, 19 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 870950d0e..670e3f11a 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -612,14 +612,14 @@ int main(int argc, char **argv) struct gsm_bts *bts; struct sockaddr_in sin; int rc, option_index = 0, stream_id = 0xff; - struct debug_target *stderr_target; - - debug_init(); - stderr_target = debug_target_create_stderr(); - debug_add_target(stderr_target); - debug_set_all_filter(stderr_target, 1); - debug_set_log_level(stderr_target, 0); - debug_parse_category_mask(stderr_target, "DNM,0"); + struct log_target *stderr_target; + + log_init(&log_info); + stderr_target = log_target_create_stderr(); + log_add_target(stderr_target); + log_set_all_filter(stderr_target, 1); + log_set_log_level(stderr_target, 0); + log_parse_category_mask(stderr_target, "DNM,0"); bts_model_nanobts_init(); printf("ipaccess-config (C) 2009 by Harald Welte\n"); diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index 01f8a2d8d..ec4a0b778 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -71,7 +71,7 @@ static int udp_sock(const char *ifname) rc = connect(fd, (struct sockaddr *)&sa, sizeof(sa)); if (rc < 0) goto err; -#endif +#endif return fd; err: @@ -79,7 +79,7 @@ err: return rc; } -const unsigned char find_pkt[] = { 0x00, 0x0b+8, IPAC_PROTO_IPACCESS, 0x00, +const unsigned char find_pkt[] = { 0x00, 0x0b+8, IPAC_PROTO_IPACCESS, 0x00, IPAC_MSGT_ID_GET, 0x01, IPAC_IDTAG_MACADDR, 0x01, IPAC_IDTAG_IPADDR, 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) |