diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 19:06:18 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:07 +0800 |
commit | 6c45f2e325acde97f7b20d704b867bb55a2634c3 (patch) | |
tree | 3bcd25bc4875a93e4120512879dc782cb0eb41bd | |
parent | aad68b5ef8ca6c6e9e932fca0a3e7ef68f0e050d (diff) |
nat: Redo a merge with master that happend at this time.
-rw-r--r-- | openbsc/include/openbsc/bsc_msc.h | 2 | ||||
-rw-r--r-- | openbsc/include/openbsc/bsc_nat.h | 6 | ||||
-rw-r--r-- | openbsc/src/nat/bsc_filter.c | 3 | ||||
-rw-r--r-- | openbsc/src/nat/bsc_nat.c | 18 | ||||
-rw-r--r-- | openbsc/src/nat/bsc_nat_vty.c | 3 |
5 files changed, 20 insertions, 12 deletions
diff --git a/openbsc/include/openbsc/bsc_msc.h b/openbsc/include/openbsc/bsc_msc.h index 9b523c749..9454e07ce 100644 --- a/openbsc/include/openbsc/bsc_msc.h +++ b/openbsc/include/openbsc/bsc_msc.h @@ -23,7 +23,7 @@ #ifndef BSC_MSC_H #define BSC_MSC_H -#include "select.h" +#include <osmocore/select.h> int connect_to_msc(struct bsc_fd *fd, const char *ip, int port); diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 1da58bcba..9dd5b8f3d 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -25,9 +25,9 @@ #include <sys/types.h> #include <sccp/sccp_types.h> -#include "select.h" -#include "msgb.h" -#include "timer.h" +#include <osmocore/select.h> +#include <osmocore/msgb.h> +#include <osmocore/timer.h> #define DIR_BSC 1 #define DIR_MSC 2 diff --git a/openbsc/src/nat/bsc_filter.c b/openbsc/src/nat/bsc_filter.c index ad2f6138f..051e53087 100644 --- a/openbsc/src/nat/bsc_filter.c +++ b/openbsc/src/nat/bsc_filter.c @@ -24,9 +24,10 @@ #include <openbsc/bsc_nat.h> #include <openbsc/bssap.h> #include <openbsc/ipaccess.h> -#include <openbsc/talloc.h> #include <openbsc/debug.h> +#include <osmocore/talloc.h> + #include <sccp/sccp.h> /* diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index 6ce78be7f..09df4dcb6 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -36,19 +36,20 @@ #include <getopt.h> #include <openbsc/debug.h> -#include <openbsc/msgb.h> #include <openbsc/bsc_msc.h> #include <openbsc/bsc_nat.h> #include <openbsc/bssap.h> #include <openbsc/ipaccess.h> #include <openbsc/abis_nm.h> -#include <openbsc/talloc.h> #include <openbsc/telnet_interface.h> +#include <osmocore/talloc.h> + #include <vty/vty.h> #include <sccp/sccp.h> +struct debug_target *stderr_target; static const char *config_file = "bsc-nat.cfg"; static char *msc_address = "127.0.0.1"; static struct in_addr local_addr; @@ -309,7 +310,7 @@ static int forward_sccp_to_bts(struct msgb *msg) if (!bsc) return -1; if (!bsc->authenticated) { - LOGP(DNAT, LOGL_ERRO, "Selected BSC not authenticated.\n"); + LOGP(DNAT, LOGL_ERROR, "Selected BSC not authenticated.\n"); return -1; } @@ -707,16 +708,16 @@ static void handle_options(int argc, char** argv) print_help(); exit(0); case 's': - debug_use_color(0); + debug_set_use_color(stderr_target, 0); break; case 'd': - debug_parse_category_mask(optarg); + debug_parse_category_mask(stderr_target, optarg); break; case 'c': config_file = strdup(optarg); break; case 'T': - debug_timestamp(1); + debug_set_print_timestamp(stderr_target, 1); break; case 'm': msc_address = strdup(optarg); @@ -749,6 +750,11 @@ int main(int argc, char** argv) { int rc; + debug_init(); + stderr_target = debug_target_create_stderr(); + debug_add_target(stderr_target); + debug_set_all_filter(stderr_target, 1); + /* parse options */ local_addr.s_addr = INADDR_ANY; handle_options(argc, argv); diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c index 24ef39835..5430670c9 100644 --- a/openbsc/src/nat/bsc_nat_vty.c +++ b/openbsc/src/nat/bsc_nat_vty.c @@ -25,7 +25,8 @@ #include <openbsc/bsc_nat.h> #include <openbsc/gsm_04_08.h> -#include <openbsc/talloc.h> + +#include <osmocore/talloc.h> #include <sccp/sccp.h> |