From 856d5bde1dc311a1cc4f529f9bab68e074cd949e Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 31 Jul 2011 10:46:36 +0200 Subject: [PATCH] Fixed broken gsmmap. --- src/host/gsmmap/Makefile.am | 2 +- src/host/gsmmap/gsmmap.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/host/gsmmap/Makefile.am b/src/host/gsmmap/Makefile.am index e71b887c..29be15c5 100644 --- a/src/host/gsmmap/Makefile.am +++ b/src/host/gsmmap/Makefile.am @@ -12,6 +12,6 @@ AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) sbin_PROGRAMS = gsmmap -gsmmap_SOURCES = gsmmap.c geo.c locate.c log.c ../layer23/src/common/sysinfo.c ../layer23/src/common/networks.c +gsmmap_SOURCES = gsmmap.c geo.c locate.c log.c ../layer23/src/common/sysinfo.c ../layer23/src/common/networks.c ../layer23/src/common/logging.c gsmmap_LDADD = $(LIBOSMOGSM_LIBS) $(LIBOSMOCORE_LIBS) -lm diff --git a/src/host/gsmmap/gsmmap.c b/src/host/gsmmap/gsmmap.c index 588a65ed..038f459c 100644 --- a/src/host/gsmmap/gsmmap.c +++ b/src/host/gsmmap/gsmmap.c @@ -32,6 +32,7 @@ #include #include +#include #include "log.h" #include "geo.h" @@ -499,6 +500,8 @@ void kml_cell(FILE *outfp, struct node_cell *cell) fprintf(outfp, "\t\n"); } +struct log_target *stderr_target; + int main(int argc, char *argv[]) { FILE *infp, *outfp; @@ -510,6 +513,13 @@ int main(int argc, char *argv[]) struct node_cell *cell; struct node_meas *meas; + log_init(&log_info, NULL); + stderr_target = log_target_create_stderr(); + log_add_target(stderr_target); + log_set_all_filter(stderr_target, 1); + log_parse_category_mask(stderr_target, "Dxxx"); + log_set_log_level(stderr_target, LOGL_INFO); + if (argc <= 2) { usage: fprintf(stderr, "Usage: %s " -- 2.11.4.GIT