summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2012-11-14 20:17:37 +0100
committerSylvain Munaut <tnt@246tNt.com>2012-11-14 20:17:37 +0100
commit5c036d59831d013099ba6f750c25018f4bc3bef9 (patch)
tree02718ab4a266f7243e5c25c0fdb57c180779bb8e
parent63cb795d22a25fc3992b9723039b6ec75e964cd8 (diff)
parent5905d5be60249b2d9ca9abce4c801bc3bceed6d9 (diff)
Merge commit '5905d5be60249b2d9ca9abce4c801bc3bceed6d9'
-rw-r--r--src/shared/libosmocore/configure.ac12
-rw-r--r--src/shared/libosmocore/debian/changelog6
-rw-r--r--src/shared/libosmocore/debian/control2
-rwxr-xr-xsrc/shared/libosmocore/debian/rules5
-rw-r--r--src/shared/libosmocore/include/osmocom/core/msgb.h6
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/abis_nm.h10
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/gsm0411_smc.h1
-rw-r--r--src/shared/libosmocore/include/osmocom/vty/command.h1
-rw-r--r--src/shared/libosmocore/src/gb/Makefile.am2
-rw-r--r--src/shared/libosmocore/src/gb/gprs_ns_frgre.c2
-rw-r--r--src/shared/libosmocore/src/gsm/Makefile.am2
-rw-r--r--src/shared/libosmocore/src/gsm/gsm0411_smc.c6
-rw-r--r--src/shared/libosmocore/src/gsm/gsm0411_smr.c6
-rw-r--r--src/shared/libosmocore/src/gsm/gsm0411_utils.c1
-rw-r--r--src/shared/libosmocore/src/gsm/gsm48.c4
-rw-r--r--src/shared/libosmocore/src/vty/logging_vty.c6
16 files changed, 48 insertions, 24 deletions
diff --git a/src/shared/libosmocore/configure.ac b/src/shared/libosmocore/configure.ac
index f119c90d..24ddd0c7 100644
--- a/src/shared/libosmocore/configure.ac
+++ b/src/shared/libosmocore/configure.ac
@@ -17,6 +17,18 @@ LT_INIT([pic-only])
AC_CONFIG_MACRO_DIR([m4])
+dnl check os: some linker flags not available on osx
+case $host in
+*-darwin*)
+ ;;
+*)
+ LTLDFLAGS_OSMOGB='-Wl,--version-script=$(srcdir)/libosmogb.map'
+ LTLDFLAGS_OSMOGSM='-Wl,--version-script=$(srcdir)/libosmogsm.map'
+ ;;
+esac
+AC_SUBST(LTLDFLAGS_OSMOGB)
+AC_SUBST(LTLDFLAGS_OSMOGSM)
+
dnl checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h)
diff --git a/src/shared/libosmocore/debian/changelog b/src/shared/libosmocore/debian/changelog
index 11ac298d..c2b221b1 100644
--- a/src/shared/libosmocore/debian/changelog
+++ b/src/shared/libosmocore/debian/changelog
@@ -1,3 +1,9 @@
+libosmocore (0.5.3+git1-2) unstable; urgency=low
+
+ * New upstream version
+
+ -- Holger Hans Peter Freyther <holger@freyther.de> Mon, 05 Nov 2012 21:35:57 +0100
+
libosmocore (0.5.3+git1-1) precise; urgency=low
* Fix issue with package version.
diff --git a/src/shared/libosmocore/debian/control b/src/shared/libosmocore/debian/control
index a3083e69..cd8398fd 100644
--- a/src/shared/libosmocore/debian/control
+++ b/src/shared/libosmocore/debian/control
@@ -2,7 +2,7 @@ Source: libosmocore
Section: libs
Priority: optional
Maintainer: Harald Welte <laforge@gnumonks.org>
-Build-Depends: debhelper (>= 7.0.50~), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git
+Build-Depends: debhelper (>= 7.0.50~), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen
Standards-Version: 3.8.4
Homepage: http://bb.osmocom.org/trac/wiki/libosmocore
Vcs-Git: git://git.osmocom.org/libosmocore.git
diff --git a/src/shared/libosmocore/debian/rules b/src/shared/libosmocore/debian/rules
index 430babce..f97995d5 100755
--- a/src/shared/libosmocore/debian/rules
+++ b/src/shared/libosmocore/debian/rules
@@ -13,8 +13,6 @@ DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
-CFLAGS = -Wall -g
-
%:
dh --with autoreconf $@ --fail-missing
@@ -25,6 +23,3 @@ override_dh_autoreconf:
echo $(VERSION) > .tarball-version
dh_autoreconf
-override_dh_auto_test:
-# tests are broken...
-
diff --git a/src/shared/libosmocore/include/osmocom/core/msgb.h b/src/shared/libosmocore/include/osmocom/core/msgb.h
index 36c7c0f9..a1939ab6 100644
--- a/src/shared/libosmocore/include/osmocom/core/msgb.h
+++ b/src/shared/libosmocore/include/osmocom/core/msgb.h
@@ -305,7 +305,7 @@ static inline unsigned char *msgb_pull(struct msgb *msgb, unsigned int len)
*/
static inline uint8_t msgb_pull_u8(struct msgb *msgb)
{
- uint8_t *space = msgb_pull(msgb, 1);
+ uint8_t *space = msgb_pull(msgb, 1) - 1;
return space[0];
}
/*! \brief remove uint16 from front of message
@@ -314,7 +314,7 @@ static inline uint8_t msgb_pull_u8(struct msgb *msgb)
*/
static inline uint16_t msgb_pull_u16(struct msgb *msgb)
{
- uint8_t *space = msgb_pull(msgb, 2);
+ uint8_t *space = msgb_pull(msgb, 2) - 2;
return space[0] << 8 | space[1];
}
/*! \brief remove uint32 from front of message
@@ -323,7 +323,7 @@ static inline uint16_t msgb_pull_u16(struct msgb *msgb)
*/
static inline uint32_t msgb_pull_u32(struct msgb *msgb)
{
- uint8_t *space = msgb_pull(msgb, 4);
+ uint8_t *space = msgb_pull(msgb, 4) - 4;
return space[0] << 24 | space[1] << 16 | space[2] << 8 | space[3];
}
diff --git a/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h b/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h
index cc017650..320ac3e5 100644
--- a/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h
+++ b/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h
@@ -14,10 +14,10 @@
enum abis_nm_msgtype;
enum gsm_phys_chan_config;
-const enum abis_nm_msgtype abis_nm_reports[4];
-const enum abis_nm_msgtype abis_nm_no_ack_nack[3];
-const enum abis_nm_msgtype abis_nm_sw_load_msgs[9];
-const enum abis_nm_msgtype abis_nm_nacks[33];
+extern const enum abis_nm_msgtype abis_nm_reports[4];
+extern const enum abis_nm_msgtype abis_nm_no_ack_nack[3];
+extern const enum abis_nm_msgtype abis_nm_sw_load_msgs[9];
+extern const enum abis_nm_msgtype abis_nm_nacks[33];
extern const struct value_string abis_nm_obj_class_names[];
extern const struct value_string abis_nm_adm_state_names[];
@@ -26,7 +26,7 @@ const char *abis_nm_nack_cause_name(uint8_t cause);
const char *abis_nm_nack_name(uint8_t nack);
const char *abis_nm_event_type_name(uint8_t cause);
const char *abis_nm_severity_name(uint8_t cause);
-const struct tlv_definition abis_nm_att_tlvdef;
+extern const struct tlv_definition abis_nm_att_tlvdef;
const char *abis_nm_opstate_name(uint8_t os);
const char *abis_nm_avail_name(uint8_t avail);
const char *abis_nm_test_name(uint8_t test);
diff --git a/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smc.h b/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smc.h
index e1508a2d..2140db43 100644
--- a/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smc.h
+++ b/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smc.h
@@ -1,6 +1,7 @@
#ifndef _GSM0411_SMC_H
#define _GSM0411_SMC_H
+#include <osmocom/core/timer.h>
#include <osmocom/gsm/protocol/gsm_04_11.h>
#define GSM411_MMSMS_EST_REQ 0x310
diff --git a/src/shared/libosmocore/include/osmocom/vty/command.h b/src/shared/libosmocore/include/osmocom/vty/command.h
index caafdeb5..8fbb4824 100644
--- a/src/shared/libosmocore/include/osmocom/vty/command.h
+++ b/src/shared/libosmocore/include/osmocom/vty/command.h
@@ -361,6 +361,7 @@ void cmd_init(int);
extern struct cmd_element config_exit_cmd;
extern struct cmd_element config_help_cmd;
extern struct cmd_element config_list_cmd;
+extern struct cmd_element config_end_cmd;
char *host_config_file();
void host_config_set(const char *);
diff --git a/src/shared/libosmocore/src/gb/Makefile.am b/src/shared/libosmocore/src/gb/Makefile.am
index c1377665..04d21085 100644
--- a/src/shared/libosmocore/src/gb/Makefile.am
+++ b/src/shared/libosmocore/src/gb/Makefile.am
@@ -11,7 +11,7 @@ noinst_HEADERS = common_vty.h
if ENABLE_GB
lib_LTLIBRARIES = libosmogb.la
-libosmogb_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libosmogb.map -version-info $(LIBVERSION)
+libosmogb_la_LDFLAGS = $(LTLDFLAGS_OSMOGB) -version-info $(LIBVERSION)
libosmogb_la_LIBADD = \
$(top_builddir)/src/libosmocore.la \
$(top_builddir)/src/vty/libosmovty.la \
diff --git a/src/shared/libosmocore/src/gb/gprs_ns_frgre.c b/src/shared/libosmocore/src/gb/gprs_ns_frgre.c
index 23443812..e557c7e8 100644
--- a/src/shared/libosmocore/src/gb/gprs_ns_frgre.c
+++ b/src/shared/libosmocore/src/gb/gprs_ns_frgre.c
@@ -48,7 +48,7 @@ struct gre_hdr {
uint16_t ptype;
} __attribute__ ((packed));
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__APPLE__)
/**
* On BSD the IPv4 struct is called struct ip and instead of iXX
* the members are called ip_XX. One could change this code to use
diff --git a/src/shared/libosmocore/src/gsm/Makefile.am b/src/shared/libosmocore/src/gsm/Makefile.am
index b72a8d43..0544e0a1 100644
--- a/src/shared/libosmocore/src/gsm/Makefile.am
+++ b/src/shared/libosmocore/src/gsm/Makefile.am
@@ -21,7 +21,7 @@ libosmogsm_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c gsm_utils.c \
milenage/aes-encblock.c milenage/aes-internal.c \
milenage/aes-internal-enc.c milenage/milenage.c gan.c
-libosmogsm_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libosmogsm.map -version-info $(LIBVERSION)
+libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION)
libosmogsm_la_LIBADD = $(top_builddir)/src/libosmocore.la
EXTRA_DIST = libosmogsm.map
diff --git a/src/shared/libosmocore/src/gsm/gsm0411_smc.c b/src/shared/libosmocore/src/gsm/gsm0411_smc.c
index 54e6129c..4152ef1c 100644
--- a/src/shared/libosmocore/src/gsm/gsm0411_smc.c
+++ b/src/shared/libosmocore/src/gsm/gsm0411_smc.c
@@ -140,7 +140,7 @@ static int gsm411_tx_cp_error(struct gsm411_smc_inst *inst, uint8_t cause)
GSM411_MT_CP_ERROR);
}
-/* etablish SMC connection */
+/* establish SMC connection */
static int gsm411_mnsms_est_req(struct gsm411_smc_inst *inst, struct msgb *msg)
{
struct msgb *nmsg;
@@ -303,7 +303,9 @@ static int gsm411_mnsms_rel_req(struct gsm411_smc_inst *inst, struct msgb *msg)
/* store release, until established or released */
if (inst->cp_state != GSM411_CPS_MM_ESTABLISHED) {
- LOGP(DLSMS, LOGL_NOTICE, "Cannot release yet.\n");
+ LOGP(DLSMS, LOGL_NOTICE,
+ "Cannot release yet current state: %s\n",
+ smc_state_names[inst->cp_state]);
inst->cp_rel = 1;
return 0;
}
diff --git a/src/shared/libosmocore/src/gsm/gsm0411_smr.c b/src/shared/libosmocore/src/gsm/gsm0411_smr.c
index d5ca9238..7dd8f723 100644
--- a/src/shared/libosmocore/src/gsm/gsm0411_smr.c
+++ b/src/shared/libosmocore/src/gsm/gsm0411_smr.c
@@ -172,7 +172,7 @@ static int gsm411_send_release(struct gsm411_smr_inst *inst)
{
struct msgb *msg = gsm411_msgb_alloc();
- LOGP(DLSMS, LOGL_NOTICE, "TX: MNSMS-REL-REQ\n");
+ LOGP(DLSMS, LOGL_DEBUG, "TX: MNSMS-REL-REQ\n");
return inst->mn_send(inst, GSM411_MNSMS_REL_REQ, msg);
}
@@ -182,7 +182,7 @@ static int gsm411_send_abort(struct gsm411_smr_inst *inst)
struct msgb *msg = gsm411_msgb_alloc();
msgb_tv_put(msg, 1, 111); //FIXME: better idea ? */
- LOGP(DLSMS, LOGL_NOTICE, "TX: MNSMS-ABORT-REQ\n");
+ LOGP(DLSMS, LOGL_DEBUG, "TX: MNSMS-ABORT-REQ\n");
return inst->mn_send(inst, GSM411_MNSMS_ABORT_REQ, msg);
}
@@ -191,7 +191,7 @@ static int gsm411_send_report(struct gsm411_smr_inst *inst)
{
struct msgb *msg = gsm411_msgb_alloc();
- LOGP(DLSMS, LOGL_NOTICE, "send empty SM_RL_REPORT_IND\n");
+ LOGP(DLSMS, LOGL_DEBUG, "Sending empty SM_RL_REPORT_IND\n");
return inst->rl_recv(inst, GSM411_SM_RL_REPORT_IND, msg);
}
diff --git a/src/shared/libosmocore/src/gsm/gsm0411_utils.c b/src/shared/libosmocore/src/gsm/gsm0411_utils.c
index ebde8fca..fe69bf41 100644
--- a/src/shared/libosmocore/src/gsm/gsm0411_utils.c
+++ b/src/shared/libosmocore/src/gsm/gsm0411_utils.c
@@ -273,7 +273,6 @@ int gsm340_gen_oa(uint8_t *oa, unsigned int oa_len, uint8_t type,
if (strlen(number) > 20)
number = "";
-// oa[1] = 0xb9; /* networks-specific number, private numbering plan */
oa[1] = 0x80 | (type << 4) | plan;
len_in_bytes = gsm48_encode_bcd_number(oa, oa_len, 1, number);
diff --git a/src/shared/libosmocore/src/gsm/gsm48.c b/src/shared/libosmocore/src/gsm/gsm48.c
index fe62dee7..ea05d450 100644
--- a/src/shared/libosmocore/src/gsm/gsm48.c
+++ b/src/shared/libosmocore/src/gsm/gsm48.c
@@ -416,6 +416,7 @@ int gsm48_construct_ra(uint8_t *buf, const struct gprs_ra_id *raid)
{
uint16_t mcc = raid->mcc;
uint16_t mnc = raid->mnc;
+ uint16_t _lac;
buf[0] = ((mcc / 100) % 10) | (((mcc / 10) % 10) << 4);
buf[1] = (mcc % 10);
@@ -430,7 +431,8 @@ int gsm48_construct_ra(uint8_t *buf, const struct gprs_ra_id *raid)
buf[2] = ((mnc / 100) % 10) | (((mnc / 10) % 10) << 4);
}
- *(uint16_t *)(buf+3) = htons(raid->lac);
+ _lac = htons(raid->lac);
+ memcpy(buf + 3, &_lac, 2);
buf[5] = raid->rac;
diff --git a/src/shared/libosmocore/src/vty/logging_vty.c b/src/shared/libosmocore/src/vty/logging_vty.c
index 6166f1f2..d473f129 100644
--- a/src/shared/libosmocore/src/vty/logging_vty.c
+++ b/src/shared/libosmocore/src/vty/logging_vty.c
@@ -535,6 +535,10 @@ static int config_write_log_single(struct vty *vty, struct log_target *tgt)
break;
}
+ vty_out(vty, " logging filter all %u%s",
+ tgt->filter_map & LOG_FILTER_ALL ? 1 : 0, VTY_NEWLINE);
+ /* FIXME: how to do this for filters outside of libosmocore? */
+
vty_out(vty, " logging color %u%s", tgt->use_color ? 1 : 0,
VTY_NEWLINE);
vty_out(vty, " logging timestamp %u%s", tgt->print_timestamp ? 1 : 0,
@@ -588,6 +592,8 @@ void logging_vty_add_cmds(const struct log_info *cat)
install_element_ve(&show_logging_vty_cmd);
install_node(&cfg_log_node, config_write_log);
+ install_default(CFG_LOG_NODE);
+ install_element(CFG_LOG_NODE, &config_end_cmd);
install_element(CFG_LOG_NODE, &logging_fltr_all_cmd);
install_element(CFG_LOG_NODE, &logging_use_clr_cmd);
install_element(CFG_LOG_NODE, &logging_prnt_timestamp_cmd);