osmocom-bb.git
12 years agomisc: Fix crash in cell_log due missing l1_prim_cb
Holger Hans Peter Freyther [Sat, 16 Jul 2011 07:33:35 +0000 (09:33 +0200)]
misc: Fix crash in cell_log due missing l1_prim_cb

Commit 3538c38835b9120d7cf062fa533f7657768bf0d3 introduced the
l1_prim_cb but the init of the misc apps were not updated, make
it us the generic callback that should restore the previous behavior

12 years agolapdm: fix use-after-free
Harald Welte [Mon, 27 Jun 2011 06:40:53 +0000 (08:40 +0200)]
lapdm: fix use-after-free

We cannot msgb_free() the msgb and then later reference msg->l2h!

12 years agoMerge commit '2a68c7c8cd2eca65c58c0898d0e1716e9d4c3ecd'
Sylvain Munaut [Sun, 26 Jun 2011 09:43:51 +0000 (11:43 +0200)]
Merge commit '2a68c7c8cd2eca65c58c0898d0e1716e9d4c3ecd'

12 years agogsm/utils: Adding conversion of "mobile power class" to dBm
Andreas Eversberg [Sun, 26 Jun 2011 09:41:48 +0000 (11:41 +0200)]
gsm/utils: Adding conversion of "mobile power class" to dBm

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/l1a: Add a message to safely count the length of a txqueue
Andreas Eversberg [Sat, 25 Jun 2011 20:46:24 +0000 (22:46 +0200)]
fw/l1a: Add a message to safely count the length of a txqueue

(that is by locking)

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/sercomm: Additional locking needed in drv_pull
Sylvain Munaut [Sat, 25 Jun 2011 20:42:38 +0000 (22:42 +0200)]
fw/sercomm: Additional locking needed in drv_pull

Credits to Andreas Eversberg for finding this bug after countless
hours of debug and providing initial patch :)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/sercomm: Fix up the locking using an 'abstraction' layer
Sylvain Munaut [Sat, 25 Jun 2011 20:38:20 +0000 (22:38 +0200)]
fw/sercomm: Fix up the locking using an 'abstraction' layer

Not _that_ abstract but a long is enough to store a ptr if need
be :p

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/comm/msgb: Protect allocation routine with proper locking
Sylvain Munaut [Sat, 4 Jun 2011 10:24:24 +0000 (12:24 +0200)]
fw/comm/msgb: Protect allocation routine with proper locking

Credits to Andreas Eversberg for finding this bug after countless
hours of debug :)

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/comm/msgb: Really panic (i.e. lockup) if we run out of msgb
Sylvain Munaut [Sat, 4 Jun 2011 10:21:52 +0000 (12:21 +0200)]
fw/comm/msgb: Really panic (i.e. lockup) if we run out of msgb

Ideally we should only panic in interrupt context. In user
context, we could wait ...

We could also return NULL and let the calling code deal with it
but it's not ready for that yet.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/comm: Remove useless include from msgb.c
Sylvain Munaut [Sat, 4 Jun 2011 10:20:32 +0000 (12:20 +0200)]
fw/comm: Remove useless include from msgb.c

Left over from the backlight debug code

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agoMerge commit '620f7ab35034f78f894319e027a151568c331eea'
Sylvain Munaut [Sat, 25 Jun 2011 20:26:49 +0000 (22:26 +0200)]
Merge commit '620f7ab35034f78f894319e027a151568c331eea'

12 years agosysinfo: add EXTENDED MEASUREMENT ORDER / MEASUREMENT INFO to SI types
Harald Welte [Sat, 25 Jun 2011 19:39:18 +0000 (21:39 +0200)]
sysinfo: add EXTENDED MEASUREMENT ORDER / MEASUREMENT INFO to SI types

those two are used in the RSL SACCH FILLING messages and delivered
like SI5 / SI6.

12 years agoRSL: Fix typo
Harald Welte [Sat, 25 Jun 2011 19:39:01 +0000 (21:39 +0200)]
RSL: Fix typo

12 years agolapdm: properly set the msg->l3h to the contents of the RSL L3_INFO IE
Harald Welte [Sat, 25 Jun 2011 16:32:08 +0000 (18:32 +0200)]
lapdm: properly set the msg->l3h to the contents of the RSL L3_INFO IE

12 years agolapdm: introduce a new lapdm_phsap_dequeue_prim()
Harald Welte [Fri, 24 Jun 2011 20:05:46 +0000 (22:05 +0200)]
lapdm: introduce a new lapdm_phsap_dequeue_prim()

This function can be called by a TDMA-driven L1 which will never actually want
to receive unsolicited/asynchronous PH-DATA.req primitives, but who will simply
directly poll the LAPDm transmit queue by calling the abovementioned function

12 years agolapdm: Don't try to send data using a PH-RACH.req, use PH-DATA.req
Harald Welte [Fri, 24 Jun 2011 13:57:59 +0000 (15:57 +0200)]
lapdm: Don't try to send data using a PH-RACH.req, use PH-DATA.req

12 years agolapdm: some more error reporting in case strange primitives arrive from L1
Harald Welte [Fri, 24 Jun 2011 13:28:02 +0000 (15:28 +0200)]
lapdm: some more error reporting in case strange primitives arrive from L1

12 years agoL1CTL is sending PH-DATA.ind, not PH-DATA.req up to LAPDm
Harald Welte [Fri, 24 Jun 2011 13:26:59 +0000 (15:26 +0200)]
L1CTL is sending PH-DATA.ind, not PH-DATA.req up to LAPDm

12 years agointroduce LAPDM entity flags for PH-EMPTY_FRAME.req and pollling
Harald Welte [Fri, 24 Jun 2011 11:56:48 +0000 (13:56 +0200)]
introduce LAPDM entity flags for PH-EMPTY_FRAME.req and pollling

polling means that we never try to proactively generate a PH-DATA.req
unless there was a PH-RTS.ind first.

12 years agolapdm: Introduce LAPDM_MODE_{BTS,MS} to run on both sides
Harald Welte [Fri, 24 Jun 2011 10:23:17 +0000 (12:23 +0200)]
lapdm: Introduce LAPDM_MODE_{BTS,MS} to run on both sides

We also introduce some related functions like
lapdm_{entity,channel}_set_mode()
lapdm_{entity,channel}_reset()

This is all in preparation for the Osmo-BTS Work.

12 years agolapdm: implement RSL CHAN RQD generation from PH-RA.ind
Harald Welte [Thu, 23 Jun 2011 22:42:01 +0000 (00:42 +0200)]
lapdm: implement RSL CHAN RQD generation from PH-RA.ind

12 years agolapdm: use msgb_tlv_put instead of manual equivalent
Harald Welte [Thu, 23 Jun 2011 22:13:17 +0000 (00:13 +0200)]
lapdm: use msgb_tlv_put instead of manual equivalent

12 years agofix some spillage from recent conversion
Harald Welte [Thu, 23 Jun 2011 22:04:50 +0000 (00:04 +0200)]
fix some spillage from recent conversion

12 years agolapdm: remove dependency to osmocom_data.h
Harald Welte [Thu, 23 Jun 2011 22:04:37 +0000 (00:04 +0200)]
lapdm: remove dependency to osmocom_data.h

12 years agolapdm: remove get_rsl_name() and use libosmogsm:gsm_rsl_name() instead
Harald Welte [Thu, 23 Jun 2011 21:57:34 +0000 (23:57 +0200)]
lapdm: remove get_rsl_name() and use libosmogsm:gsm_rsl_name() instead

12 years agofurther decouple lapdm code from osmocom_ms and l1ctl
Harald Welte [Thu, 23 Jun 2011 21:55:20 +0000 (23:55 +0200)]
further decouple lapdm code from osmocom_ms and l1ctl

we introduce a new primitive layer betwen PH and DL, enabling the
use of the LAPDm code in applications that are not based on L1CTL

12 years agoadd value_string definitions for RSL message types
Harald Welte [Thu, 23 Jun 2011 18:43:13 +0000 (20:43 +0200)]
add value_string definitions for RSL message types

12 years agointroduce GSM primitive definitions
Harald Welte [Thu, 23 Jun 2011 13:04:47 +0000 (15:04 +0200)]
introduce GSM primitive definitions

The idea here is to use the osmocom core primitive code ot abstract out
primitives for inter-layer comunication in GSM.

12 years agoadd new 'prim.h' header file for primitives
Harald Welte [Thu, 23 Jun 2011 12:14:20 +0000 (14:14 +0200)]
add new 'prim.h' header file for primitives

12 years agoadd l1ctl_proto.h #includes to lots of files
Harald Welte [Wed, 22 Jun 2011 21:08:55 +0000 (23:08 +0200)]
add l1ctl_proto.h #includes to lots of files

this is apparently a result of no longer including it indirectly via lapdm.h

12 years agoremove l1ctl data structure form l2_ph_chan_conf()
Harald Welte [Wed, 22 Jun 2011 21:04:20 +0000 (23:04 +0200)]
remove l1ctl data structure form l2_ph_chan_conf()

This brings us one step closer to de-couple LAPDm from L1CTL

12 years agoremove l1ctl data structure from l2_ph_data_ind()
Harald Welte [Wed, 22 Jun 2011 21:01:18 +0000 (23:01 +0200)]
remove l1ctl data structure from l2_ph_data_ind()

12 years agolapdm.c: remove unneeded header file #includes
Harald Welte [Tue, 21 Jun 2011 17:46:20 +0000 (19:46 +0200)]
lapdm.c: remove unneeded header file #includes

12 years agolayer23: make LAPDm code mostly independent of 'struct osmocom_ms'
Harald Welte [Sun, 22 May 2011 18:10:34 +0000 (20:10 +0200)]
layer23: make LAPDm code mostly independent of 'struct osmocom_ms'

This is one step in the direction of re-using the lapdm code in osmo-bts.

12 years agoremove osmocom_ms reference from lapdm_init()
Harald Welte [Fri, 20 May 2011 16:16:09 +0000 (18:16 +0200)]
remove osmocom_ms reference from lapdm_init()

... yet another step in making lapdm code independent of osmocom_ms

12 years agoremove 'osmocom_ms' from struct lapdm_enetity
Harald Welte [Thu, 19 May 2011 22:08:22 +0000 (00:08 +0200)]
remove 'osmocom_ms' from struct lapdm_enetity

and replace it with more general l1_ctx nad l3_ctx.

12 years agosocket: add OSMO_SOCK_F_[CONNECT|BIND|NON_BLOCK] flags
Pablo Neira Ayuso [Thu, 9 Jun 2011 13:04:30 +0000 (15:04 +0200)]
socket: add OSMO_SOCK_F_[CONNECT|BIND|NON_BLOCK] flags

This extends the socket infrastructure in libosmocore to allow
to create non-blocking sockets.

Basically, it replaces the connect0_bind1 parameter by one
flags parameter.

12 years agoMerge branch 'master' of git.osmocom.org:libosmocore
Pablo Neira Ayuso [Mon, 13 Jun 2011 17:15:50 +0000 (19:15 +0200)]
Merge branch 'master' of git.osmocom.org:libosmocore

12 years agoadd missing #include file to sysinfo.h
Harald Welte [Sun, 5 Jun 2011 17:53:56 +0000 (19:53 +0200)]
add missing #include file to sysinfo.h

(otherwise 'struct value_string' would not be defined)

12 years agoabis_nm.h: Add include to gsm_utils.h
Harald Welte [Sun, 5 Jun 2011 09:22:59 +0000 (11:22 +0200)]
abis_nm.h: Add include to gsm_utils.h

12 years agosocket: getaddrinfo(): set AI_PASSIVE if we want to bind
Harald Welte [Tue, 31 May 2011 15:47:54 +0000 (17:47 +0200)]
socket: getaddrinfo(): set AI_PASSIVE if we want to bind

This will tell getaddrinfo() that we want a INADDR_ANY style socket

12 years agoabis_nm: Forward declare the used enums
Holger Hans Peter Freyther [Mon, 30 May 2011 22:42:38 +0000 (00:42 +0200)]
abis_nm: Forward declare the used enums

This file is using enums in that might or might not be
known to the compiler. Forward declare them.

12 years agoboard: mtk: increase RAM sizes in linker script
Wolfram Sang [Mon, 30 May 2011 18:03:17 +0000 (20:03 +0200)]
board: mtk: increase RAM sizes in linker script

gcc3 (and some gcc4) produce code which does not fit into the
0x5000-sized RAM sections. Extend them to 0x6000 for now, so it will
build correctly again. The created binary (gcc3) has been successfully
tested on my G2.

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
12 years agomtk: uart: remove forgotten calypso-include
Wolfram Sang [Mon, 30 May 2011 18:03:16 +0000 (20:03 +0200)]
mtk: uart: remove forgotten calypso-include

Dunno how that survived...

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
12 years ago[layer23] Adding Quadband support and GSM 4x0 support
Andreas.Eversberg [Wed, 16 Mar 2011 08:52:01 +0000 (08:52 +0000)]
[layer23] Adding Quadband support and GSM 4x0 support

This makes it possible to use GSM 850 and PCS 1900 bands, as used in the
US. The support relies on the phone hardware.

Each band (900, DCS, 850, PCS, 480 and 450) can be enabled and
disabled individually for each setting.

12 years agofw/rffe/compal: Add support for 850 band
Sylvain Munaut [Mon, 23 May 2011 21:15:09 +0000 (23:15 +0200)]
fw/rffe/compal: Add support for 850 band

The HW switch supports it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/trf6151: Use a #define to enable/disable out-of-spec warnings
Sylvain Munaut [Sun, 24 Apr 2011 08:36:21 +0000 (10:36 +0200)]
fw/trf6151: Use a #define to enable/disable out-of-spec warnings

We also disable them by default because:
 - It can operate fine out of spec
 - Some phone will actually do it (like using the DCS port for PCS)
 - It's verbose for nothing for most people anyway

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/trf6151: Better PLL settings routines
Sylvain Munaut [Sat, 23 Apr 2011 21:00:24 +0000 (23:00 +0200)]
fw/trf6151: Better PLL settings routines

 * We actually support TX 850/1900 now
 * We try to find the better settings for a given frequency,
   no matter if it's in spec or not ...
   (for e.g. TXin in DCS downlink is better done with PCS config)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agofw/rffe: Add function to query RF wiring
Sylvain Munaut [Sat, 23 Apr 2011 20:27:59 +0000 (22:27 +0200)]
fw/rffe: Add function to query RF wiring

Depending on the chipset and the HW, not all ports are connected
and we need to know what we can use when we have the choice ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agoMerge commit '3710e462f85824cd9d84b3f95e6b2ea694119ff9'
Sylvain Munaut [Sun, 29 May 2011 17:49:53 +0000 (19:49 +0200)]
Merge commit '3710e462f85824cd9d84b3f95e6b2ea694119ff9'

12 years agogsmtap_util: Remove msg_free from the wq call back
Sylvain Munaut [Sun, 29 May 2011 17:48:15 +0000 (19:48 +0200)]
gsmtap_util: Remove msg_free from the wq call back

write_queue already frees the message after the callback is called.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agoMakefile: disable the check for sys/socket.h in the libosmocore target build
Harald Welte [Sun, 29 May 2011 15:01:26 +0000 (17:01 +0200)]
Makefile: disable the check for sys/socket.h in the libosmocore target build

12 years agosrc/Makefile: The configure.in was renamed configure.ac -> update Makefile
Sylvain Munaut [Sun, 29 May 2011 13:55:24 +0000 (15:55 +0200)]
src/Makefile: The configure.in was renamed configure.ac -> update Makefile

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agoMerge commit 'f2699501bc20a1dc5ee965ca1cbb8f18a3471ff8'
Sylvain Munaut [Sun, 29 May 2011 13:53:59 +0000 (15:53 +0200)]
Merge commit 'f2699501bc20a1dc5ee965ca1cbb8f18a3471ff8'

12 years agogsm/sysinfo: Fix rsl2sitype array size
Sylvain Munaut [Sun, 29 May 2011 13:39:04 +0000 (15:39 +0200)]
gsm/sysinfo: Fix rsl2sitype array size

0xff is the maximum value ... so there is 256 elements.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
12 years agogsm/sysinfo: don't include netinet/in.h
Harald Welte [Sun, 29 May 2011 13:37:49 +0000 (15:37 +0200)]
gsm/sysinfo: don't include netinet/in.h

12 years agobitvec: add missing stdint.h
Harald Welte [Sun, 29 May 2011 13:37:38 +0000 (15:37 +0200)]
bitvec: add missing stdint.h

12 years agosocket: remove unused IPv4 related header includes
Harald Welte [Sun, 29 May 2011 13:26:48 +0000 (15:26 +0200)]
socket: remove unused IPv4 related header includes

13 years agoMerge commit '4d3a7b124e08a597d5f01fb2a71f3a4677a360a9'
Harald Welte [Fri, 27 May 2011 16:17:05 +0000 (18:17 +0200)]
Merge commit '4d3a7b124e08a597d5f01fb2a71f3a4677a360a9'

13 years agosocket: Skip ifa's without ifa->ifa_addr
Harald Welte [Tue, 24 May 2011 19:31:53 +0000 (21:31 +0200)]
socket: Skip ifa's without ifa->ifa_addr

Apparently getifaddrs() returns ifa's without an ifa_addr set.

13 years agoMerge branch 'master' of git.osmocom.org:libosmocore
Pablo Neira Ayuso [Tue, 24 May 2011 16:31:13 +0000 (18:31 +0200)]
Merge branch 'master' of git.osmocom.org:libosmocore

13 years agoImport abis_nm_{chcomb4pchan,pchan4chcomb}() from openbsc
Harald Welte [Tue, 24 May 2011 15:15:12 +0000 (17:15 +0200)]
Import abis_nm_{chcomb4pchan,pchan4chcomb}() from openbsc

13 years agolibosmocore: rename configure.in -> configure.ac
Alexander Huemer [Tue, 24 May 2011 13:16:14 +0000 (15:16 +0200)]
libosmocore: rename configure.in -> configure.ac

rename autoconf input file to align with osmocom-bb host applications,
and because that suffix is preferred nowadays.

13 years agolibosmocore: add missing AC_LANG_SOURCE for current autoconf
Alexander Huemer [Tue, 24 May 2011 13:16:13 +0000 (15:16 +0200)]
libosmocore: add missing AC_LANG_SOURCE for current autoconf

autoconf >=2.68 demands the body of an AC_COMPILE_IFELSE to be wrapped in
an AC_LANG_SOURCE macro, otherwise outputs annoying warnings on the
invocation of `autoreconf -i`. this patch follows that demand.

13 years agoImport sytem information related definitions + code from openbsc
Harald Welte [Tue, 24 May 2011 13:01:53 +0000 (15:01 +0200)]
Import sytem information related definitions + code from openbsc

13 years agoMerge commit '3036612d59a5c8d97b2086a5e7817613f45948ef'
Harald Welte [Mon, 23 May 2011 20:17:26 +0000 (22:17 +0200)]
Merge commit '3036612d59a5c8d97b2086a5e7817613f45948ef'

13 years agoabis_nm: Mark the structs as extern to avoid compiler warning
Holger Hans Peter Freyther [Mon, 23 May 2011 19:41:34 +0000 (21:41 +0200)]
abis_nm: Mark the structs as extern to avoid compiler warning

warning: array ‘abis_nm_obj_class_names’ assumed to have one element

13 years agoabis_nm: remove abis_nm_obj_class_name / abis_nm_adm_state_name
Harald Welte [Mon, 23 May 2011 18:41:31 +0000 (20:41 +0200)]
abis_nm: remove abis_nm_obj_class_name / abis_nm_adm_state_name

and export the underlying raw value_string arrays instead:
abis_nm_obj_class_names / abis_nm_adm_state_names.

This permits the caller to use get_string_value() as well as
get_value_string().

13 years agorename abis_nm_adm_name() to abis_nm_adm_state_name()
Harald Welte [Mon, 23 May 2011 18:30:17 +0000 (20:30 +0200)]
rename abis_nm_adm_name() to abis_nm_adm_state_name()

13 years agoMerge branch 'master' of git.osmocom.org:libosmocore
Pablo Neira Ayuso [Mon, 23 May 2011 17:01:34 +0000 (19:01 +0200)]
Merge branch 'master' of git.osmocom.org:libosmocore

13 years agoabis_nm: import definitions and common code on A-bis OML from OpenBSC
Harald Welte [Sun, 22 May 2011 20:45:16 +0000 (22:45 +0200)]
abis_nm: import definitions and common code on A-bis OML from OpenBSC

13 years agolibosmogsm: add ipaccess related header file
Harald Welte [Sun, 22 May 2011 19:57:15 +0000 (21:57 +0200)]
libosmogsm: add ipaccess related header file

13 years agosocket: use listen() and SO_REUSEADDR, new osmo_sock_init_ofd() function
Harald Welte [Sun, 22 May 2011 19:47:29 +0000 (21:47 +0200)]
socket: use listen() and SO_REUSEADDR, new osmo_sock_init_ofd() function

osmo_sock_init_ofd() is a wrapper around osmo_sock_init() which will
take care of initializing and registering a 'struct osmo_fd' for the
newly-created socket.

13 years agoremove debug printf from socket.c
Harald Welte [Sun, 22 May 2011 18:30:18 +0000 (20:30 +0200)]
remove debug printf from socket.c

13 years agogsmtap: deal with apps that call gsmtap_send*() with NULL gsmtap_inst
Harald Welte [Sun, 22 May 2011 18:06:11 +0000 (20:06 +0200)]
gsmtap: deal with apps that call gsmtap_send*() with NULL gsmtap_inst

13 years agovty: print actual application name rather than always OpenBSC on connect
Harald Welte [Sun, 22 May 2011 17:15:07 +0000 (19:15 +0200)]
vty: print actual application name rather than always OpenBSC on connect

13 years agolayer23: update to new GSMTAP API in libosmocore >= 0.3.1
Harald Welte [Sun, 22 May 2011 10:36:55 +0000 (12:36 +0200)]
layer23: update to new GSMTAP API in libosmocore >= 0.3.1

13 years agoMerge commit 'e476442cf0e84c65565ace545f5b73602b5f0ffc'
Harald Welte [Sun, 22 May 2011 10:26:42 +0000 (12:26 +0200)]
Merge commit 'e476442cf0e84c65565ace545f5b73602b5f0ffc'

13 years agoGSMTAP/socket code: Check for sys/socket.h and conditionally compile
Harald Welte [Sun, 22 May 2011 10:25:57 +0000 (12:25 +0200)]
GSMTAP/socket code: Check for sys/socket.h and conditionally compile

13 years agoMerge commit '33cb71ac91fb870702dbb71595dba4a554001e3c'
Harald Welte [Sun, 22 May 2011 10:07:37 +0000 (12:07 +0200)]
Merge commit '33cb71ac91fb870702dbb71595dba4a554001e3c'

13 years agogsmtap: rework GSMTAP API to be more future-proof
Harald Welte [Sat, 21 May 2011 16:54:32 +0000 (18:54 +0200)]
gsmtap: rework GSMTAP API to be more future-proof

* use write_queue where applicable
* provide functions that work on raw FD and those with osmo_fd
* add support for multiple gsmtap instances (no global variables)

13 years agologging: fix corrupted output
Pablo Neira Ayuso [Thu, 19 May 2011 06:55:32 +0000 (08:55 +0200)]
logging: fix corrupted output

Harald reported a problem in the logging:
http://lists.osmocom.org/pipermail/openbsc/2011-May/002896.html

Reverting 81e9636454294ae10ef9bc8bf149dd0248afce76 seems to
fix the problem. However, that workaround looks ugly.

Holger gives us another clue on what was wrong:
http://lists.osmocom.org/pipermail/openbsc/2011-May/002905.html

While digging in the manpage, I found this:

"The functions vprintf(), vfprintf(), vsprintf(), vsnprintf()
are equivalent to the functions printf(), fprintf(), sprintf(),
snprintf(), respectively, except that they are called with a
va_list instead of a variable number of arguments. These functions
do not call the va_end macro. Consequently, the value of ap is
undefined after the call. The application should call va_end(ap)
itself afterwards."

13 years agologging: fix corrupted output
Pablo Neira Ayuso [Wed, 18 May 2011 23:40:43 +0000 (01:40 +0200)]
logging: fix corrupted output

Harald reported a problem in the logging:
http://lists.osmocom.org/pipermail/openbsc/2011-May/002896.html

Reverting 81e9636454294ae10ef9bc8bf149dd0248afce76 seems to
fix the problem. However, that workaround looks ugly.

Holger gives us another clue on what was wrong:
http://lists.osmocom.org/pipermail/openbsc/2011-May/002905.html

While digging in the manpage, I found this:

"The functions vprintf(), vfprintf(), vsprintf(), vsnprintf()
are equivalent to the functions printf(), fprintf(), sprintf(),
snprintf(), respectively, except that they are called with a
va_list instead of a variable number of arguments. These functions
do not call the va_end macro. Consequently, the value of ap is
undefined after the call. The application should call va_end(ap)
itself afterwards."

13 years agosrc: use namespace prefix osmo_* for crc16 functions
Pablo Neira Ayuso [Sun, 15 May 2011 12:45:08 +0000 (14:45 +0200)]
src: use namespace prefix osmo_* for crc16 functions

Summary of changes:

s/crc16_table/osmo_crc16_table/g
s/crc16/osmo_crc16/g
s/crc16_byte/osmo_crc16_byte/g

13 years agosrc: use namespace prefix osmo_* for utils
Pablo Neira Ayuso [Sun, 15 May 2011 12:23:17 +0000 (14:23 +0200)]
src: use namespace prefix osmo_* for utils

Summary of changes:

s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g

13 years agosrc: use namespace prefix osmo_wqueue*
Pablo Neira Ayuso [Sun, 15 May 2011 12:23:14 +0000 (14:23 +0200)]
src: use namespace prefix osmo_wqueue*

Summary of changes:

s/struct write_queue/struct osmo_wqueue/g
s/write_queue_init/osmo_wqueue_init/g
s/write_queue_clear/osmo_wqueue_clear/g
s/write_queue_enqueue/osmo_wqueue_enqueue/g
s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g

13 years agosrc: use namespace prefix osmo_signal*
Pablo Neira Ayuso [Sun, 15 May 2011 12:23:10 +0000 (14:23 +0200)]
src: use namespace prefix osmo_signal*

Summary of changes:

s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g

13 years agosrc: use namespace prefix osmo_fd* and osmo_select*
Pablo Neira Ayuso [Sun, 15 May 2011 12:23:05 +0000 (14:23 +0200)]
src: use namespace prefix osmo_fd* and osmo_select*

Summary of changes:

s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g

13 years agosrc: use namespace prefix osmo_timer*
Pablo Neira Ayuso [Sun, 15 May 2011 12:23:02 +0000 (14:23 +0200)]
src: use namespace prefix osmo_timer*

Summary of changes:

s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g

13 years agoMerge commit 'ba01fa44feb6deb0f0359f381eafe866991c06c1' into pablo/namespace
Pablo Neira Ayuso [Sun, 15 May 2011 12:39:08 +0000 (14:39 +0200)]
Merge commit 'ba01fa44feb6deb0f0359f381eafe866991c06c1' into pablo/namespace

13 years agoapp: Introduce some routines to help with application startup
Holger Hans Peter Freyther [Thu, 12 May 2011 11:46:33 +0000 (13:46 +0200)]
app: Introduce some routines to help with application startup

The plan is to collect structs and routines for application
setup and remove many copies of the boilerplate code we have
right now. This starts with routines to ignore certain signals
and the stderr init code.

Increment the age of the library because a new interface was added.

13 years agoupdate debian changelog to 0.3.0
Harald Welte [Tue, 10 May 2011 15:29:01 +0000 (17:29 +0200)]
update debian changelog to 0.3.0

13 years agoupdate include paths in debian packaging spec
Harald Welte [Tue, 10 May 2011 09:28:02 +0000 (11:28 +0200)]
update include paths in debian packaging spec

13 years agolibosmocore: bump library interface version to '1' for new osmo_ names
Harald Welte [Sun, 8 May 2011 12:35:40 +0000 (14:35 +0200)]
libosmocore: bump library interface version to '1' for new osmo_ names

13 years agomsgfile: use namespace prefix osmo_* and use more descriptive names
Pablo Neira Ayuso [Sat, 7 May 2011 11:01:41 +0000 (13:01 +0200)]
msgfile: use namespace prefix osmo_* and use more descriptive names

Summary of changes:

s/msg_entry/osmo_config_entry/g
s/msg_entries/osmo_config_list/g
s/msg_entry_parse/osmo_config_list_parse/g

minor glitch included in this patch while I was at it:

-#include "linuxlist.h"
+#include <osmocom/core/linuxlist.h>

13 years agoplugin: use namespace prefix osmo_*
Pablo Neira Ayuso [Sat, 7 May 2011 10:50:08 +0000 (12:50 +0200)]
plugin: use namespace prefix osmo_*

Summary of changes:

s/plugin_load_all/osmo_plugin_load_all/g

13 years agobacktrace: use namespace prefix osmo_*
Pablo Neira Ayuso [Sat, 7 May 2011 10:45:47 +0000 (12:45 +0200)]
backtrace: use namespace prefix osmo_*

Summary of changes:

s/backtrace/osmo_backtrace/g

13 years agocrc: use namespace prefix osmo_*
Pablo Neira Ayuso [Sat, 7 May 2011 10:43:12 +0000 (12:43 +0200)]
crc: use namespace prefix osmo_*

Summary of changes:

s/crc16_table/osmo_crc16_table/g
s/crc16/osmo_crc16/g
s/crc16_byte/osmo_crc16_byte/g

13 years agoutils: use namespace prefix osmo_*
Pablo Neira Ayuso [Sat, 7 May 2011 10:43:08 +0000 (12:43 +0200)]
utils: use namespace prefix osmo_*

Summary of changes:

s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g

13 years agostatistics: use namespace prefix osmo_counter*
Pablo Neira Ayuso [Sat, 7 May 2011 10:43:04 +0000 (12:43 +0200)]
statistics: use namespace prefix osmo_counter*

Summary of changes:

s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free/g
s/counters_for_each/osmo_counters_for_each/g