aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-06-23jenkins.sh: Disable sanitize for FreeBSDPau Espin Pedrol1-1/+7
Our current build server uses clang-3.4.1 and FreeBSD10.3, and AddressSanitizer support is not good yet on those versions, triggering some link issues when it is enabled. I tested using newer clang 3.7.1 in the same FreeBSD version but another compiler error related to __builtin_cpu_supports is triggered. Conclusion: Explicitly disable AddressSanitizer until we move to FreeBSD11 with clang 3.8. Before this commit, AddressSanitizer was implicitly disabled due to a shell compatibility issue which is fixed in next commit in the series, thus we need to explicitly disable it here. Change-Id: I0db497045a2ebf7877232b28ae1fcf1fd89fb3f3
2017-06-23control_cmd.c: Fix unsigned comparison against < 0Pau Espin Pedrol1-1/+1
Fixes following warning: control_cmd.c:294:16: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] if (cmd->type < 0 || cmd->type == CTRL_TYPE_UNKNOWN) { Change-Id: I3df8a4f646222337927d9e3cac6d09a8a05cb20c
2017-06-23abis_nm.c: Fix implicit enumeration type conversionPau Espin Pedrol1-4/+4
Fixes following warning message: abis_nm.c:101:2: warning: implicit conversion from enumeration type 'enum abis_nm_msgtype_bs11' to different enumeration type 'enum abis_nm_msgtype' [-Wenum-conversion] Change-Id: Icb0ed423febf1ceb6626e256d32011b4118fc527
2017-06-23serial.c: Use pragma message instead of warningPau Espin Pedrol1-1/+1
Change-Id: I65b1ef6e4b9ba0bf0c3c2f03311250f31ddb308a
2017-06-23configure.ac: Enable -Wall by defaultPau Espin Pedrol1-2/+2
Change-Id: I70f917e05ad46049487710d1752aad2505c96696
2017-06-23gsm0411_utils.c: Fix compilation warningsPau Espin Pedrol1-2/+2
gsm0411_utils.c:102:2: warning: #warning find a portable way to obtain timezone offset [-Wcpp] #warning find a portable way to obtain timezone offset gsm0411_utils.c: In function 'gsm338_get_sms_alphabet': gsm0411_utils.c:260:4: warning: large integer implicitly truncated to unsigned type [-Woverflow] return 0xffffffff; Change-Id: I1d6cb31f38721f79e2cf93f9b8e4776f3720aa07
2017-06-23Fix warnings: tolower() and similar require ucharPau Espin Pedrol3-5/+5
utils.c: In function 'osmo_str2lower': utils.c:277:3: warning: array subscript has type 'char' [-Wchar-subscripts] out[i] = tolower(in[i]); And according to man: If c is neither an unsigned char value nor EOF, the behavior of these func‐ tions is undefined. Change-Id: I3fed2ab6a4efba9f8a21fcf84a5b3a91e8df084f
2017-06-23Fix compilation warnings: use correct log type for uint32_tPau Espin Pedrol2-2/+4
Change-Id: Ic1e3255800999669ca9619bfceb4124c773eff2d
2017-06-23fix map entry for gsm0808_speech_codec_from_chan_typeNeels Hofmeyr1-1/+1
Recent commit 884ba0f2bcaf385cabee0b4228a2598d61fa406b adds function gsm0808_chan_type_to_speech_codec() but adds a mismatching name in libosmogsm.map. openbsc.git's aoip branch can't build with this. This must have been an on-the-fly rename that wasn't properly tested. Always test your patches! Change-Id: I68feb14f7bcb2f62b89f9b2d8c085d6824b493bc
2017-06-23fix map entry and .h declaration for gsm0808_chan_type_to_speech_codec()Neels Hofmeyr2-2/+2
Recent commit 3149b0d076477303a38df735fe579b1b06ee17b2 adds function gsm0808_chan_type_to_speech_codec() but adds a completely mismatching name in libosmogsm.map, as well as a definition with a typo in the name. Fix the entry in libosmogsm.map. Add the missing 'c' in gsm0808_utils.h Change-Id: I5a621fa5ef6b632eabbe224f3dd383eacaffb695
2017-06-23doxygen: config: one enum val per lineNeels Hofmeyr5-5/+5
In the generated API doc, do not print multiple enum values on the same line, because this makes the lists pretty much unreadable. Change-Id: I63d6f42567f532851e19eb8a6c842e418ce666af
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr251-866/+873
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23doxygen: various fixes in core/timer.hNeels Hofmeyr1-19/+16
Move a longish comment to the timer group so that it appears in the API doc. Un-doxygen some floating comments that were associated with unrelated code items ('/**' --> '/*'). Add braces to some function names so that the API doc will render as reference links. Change-Id: I3ea5b88cbe9cb54702429158bf47e768e04e8fe7
2017-06-23api doc typo fix in core/logging.hNeels Hofmeyr1-1/+1
Change-Id: I3f1cd5b10e7beccb61f370d7f8fa2666e56542cf
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr144-1576/+1575
Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-23doxygen: add missing gb API doc generationNeels Hofmeyr4-3/+1730
Files in include/osmocom/gprs/ and src/gb/ are not included in any doxygen generated API docs. Add Doxyfile.gb.in and adjust configure.ac and Makefile.am. Change-Id: Ieb64f497f55368e396872083237c9ff28da2dd93
2017-06-23doxygen: include all undocumented items in the API docNeels Hofmeyr5-5/+5
Currently, files that omit the \file directive and all functions, enums, structs lacking a doxygen style comment are completely missing from the doxygen API docs. Set EXTRACT_ALL = YES so that all files and code items are at least listed in the doxygen API. Change-Id: I39f558ec0a33a61a1fcec0554f53c8e7668733de
2017-06-23doxygen: drop INPUT gsm/protocol, already part of gsm/Neels Hofmeyr1-1/+1
include/osmocom/gsm/protocol is also implicitly included in its parent dir because of the recursive rule. Naming it again makes doxygen use it twice. It doesn't seem to be harmful, but not needed either. Change-Id: I5dc22ca65740a88540dacc61c0742fede172de9c
2017-06-23comments: gsm0808_utils: mention various 3GPP specsPhilipp Maier1-0/+5
Tweaked-by: nhofmeyr Change-Id: I990dfe9eeaf96f377484b828143935240a937226
2017-06-23gsm0808: fix length check of the element decoder functionsPhilipp Maier1-6/+6
The length check of the decoder functions is not entirely correct. The check also checks for values below zero, which does not make sense, since the length is encoded as uint8_t. For some elements a minimum length is known (in most cases this is 1), so checking for zero is sufficient but in some cases (e.g. channel type) the spec mentions a minimum and maximum length. This is now also reflected in the code. Tweaked-by: nhofmeyr Change-Id: I78bc887f68d1963d28c6fcd631ac20ccd893d6d6
2017-06-22pseudotalloc: Add simplistic implementation of talloc_asprintfPau Espin Pedrol2-1/+17
fsm.c uses this function. When compiled with --enable-embedded, it triggers a warning: fsm.c: In function 'osmo_fsm_inst_alloc': fsm.c:213:4: warning: implicit declaration of function 'talloc_asprintf' [-Wimplicit-function-declaration] fi->name = talloc_asprintf(fi, "%s(%s)", fsm->name, id); Change-Id: I61cd83d4c8570af1e452c945ac6f194baf7e6ac4
2017-06-22osmo-sim-test.c: Remove unused functionsPau Espin Pedrol1-37/+0
Change-Id: I3060cfee8ece86c4c89a65f93c9f5424df0c410b
2017-06-22fsm.c: Fix compilation warning: Use PRIu32 for uint32_tPau Espin Pedrol1-3/+4
Change-Id: I4c441b20b250c34656f1e8330d6bb4b1ce2b8423
2017-06-22timer_gettimeofday.c: Fix implicit use of timeraddPau Espin Pedrol1-0/+1
timer_gettimeofday.c: In function 'osmo_gettimeofday_override_add': timer_gettimeofday.c:54:2: error: implicit declaration of function 'timeradd' [-Werror=implicit-function-declaration] timeradd(&osmo_gettimeofday_override_time, &val, ^ Change-Id: Iced451be255cfde8a6cf38380bef71ef29673994
2017-06-22sercomm_test.c: return correctly in mainPau Espin Pedrol1-0/+1
Change-Id: I57fd3e1bf74ec24dec692710359a1ce00ecde75a
2017-06-22cosmetic: remove API documentation strings in header filePhilipp Maier1-24/+0
Typically we don't place comments with the function declarations in .h files. Not sure why this file has comments for each. The API doc belongs in the .c file as proper doxygen comments, and shouldn't be duplicated in the .h file. In this particular case, doxygen comments are added in the corresponding c file recently. Change-Id: I5c4cb55be5ec59a6945b1720b875c5987f1cfaad
2017-06-22gsm0808: add function gsm0808_speech_codec_from_chan_type()Philipp Maier3-0/+57
The contents of the speech codec element (struct gsm0808_speech_codec), that is also used in the speech codec list element (struct gsm0808_speech_codec_list) can be generated directly from the permitted speech parameter in the channel type field (struct gsm0808_channel_type) when full AoIP with compressed speech via RTP/UDP/IP is assumed and when the codec configuration on the air interface exactly matches the codec configuration on the IP backhaul. This patch adds a function that can be used as a helper to fill out spech codec fields by only giving a permitted speech parameter as input. Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2
2017-06-22gsm0808: add function gsm0808_chan_type_to_speech_code()Philipp Maier3-0/+40
The permitted speech field used in channel type element (struct gsm0808_channel_type) uses a different representation as the type field in the speech codec element (struct gsm0808_speech_codec) This patch adds a function to convert from permitted speech to speech codec type. Change-Id: Ib26a9c20864459b2baaa04f49b6e7902ba44b7cb
2017-06-22gsm0808: add default speech codec configurationPhilipp Maier1-0/+21
In an AoIP scenario, the speech codec list field specifies the codecs used in the RTP interface. This patch adds a table with default codec configurations that match the codec configurations that are also used on the air interface. Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
2017-06-22gsm0808: fix AoIP speech codec element parser/generatorPhilipp Maier3-61/+118
The implementation of the parser/generator for the speech codec information element slightly wrong, making it impossible to use it properly. (See also: 3GPP TS 48.008, 3.2.2.103) Change-Id: Idabb0f9620659557672e1c6b90c75481192e5c89
2017-06-22abis_test.c: Fix warning appearing on some buggy gcc versionsPau Espin Pedrol1-2/+4
Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000
2017-06-21gsm0808: add speech codec type constantsPhilipp Maier1-0/+18
The codec type to be set in member type in struct gsm0808_speech_codec has its own coding scheme to reference the used codec types. This patch declares an enum with valid speech codec types. Change-Id: Icaa768071d4364e671bc7e6d48b82d1f07f93f93
2017-06-21cosmetic: Add info about coresponding codecs to permitted speech constsPhilipp Maier1-7/+8
The constants in enum gsm0808_permitted_speech are not very expressive. Add comments indicating each constant's corresponding codec. Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
2017-06-21gsm0408: update bearer capability speech versionPhilipp Maier1-1/+6
3GPP TS 24.008 specifies two new speech versions for half rate and two new speech modes for full rate. This patch adds the relevant constants to enum gsm48_bcap_speech_ver in gsm_04_08.h Change-Id: Id2835384c855f924332d38f01c73bd1cfdb62549
2017-06-21cosmetic: Add codec references to Speech Version IndicationPhilipp Maier1-6/+6
Add the information which GSM Speech codec version coresponds to which bearer capability speech version. Change-Id: Ic9493fea139420a52c32b17d00ac7d0b2bf86967
2017-06-21lapd_test.c: Convert compilation warning to level messagePau Espin Pedrol1-1/+1
This way we clean the build of warnings completely and we can enable -Werror but we still see this FIXME message while compiling. Change-Id: I24c11226cd5bb5b6032f4ece7d1a0695dc82f0dd
2017-06-21vty: additional nodes for sccp-address configurationPhilipp Maier2-2/+3
The planned sccp-addressbook implementation in libosmo-sccp requires two additional VTY nodes. See also in libosmo-sccp.git: Change-Id I068ed7f7d113dab88424a9d47bab7fc703bb7942 Change-Id: I42aa29c0cccc97f284b85801c5329b015b189640
2017-06-19src/Makefile.am: fix build: use AM_CFLAGS, not CFLAGSNeels Hofmeyr1-4/+4
This allows passing 'make CFLAGS+="..."' without breaking the build. Suggested-by: zecke Change-Id: I0628a9c739cded771605f5c55df7f21cb07beb3b
2017-06-19core/conv/conv_acc.c: use static allocation for trellisVadim Yanitskiy1-27/+23
Allocation of a new memory is an expensive operation, which takes place when it's initially unknown, how much memory will we need, or in order to decrease total memory usage. The trellis struct wasn't require dynamic allocation itself, so let's allocate one statically inside the vdecoder structure. Change-Id: Ib8e448823ca5548a05a45824b0b1c06743dfe5a4
2017-06-19core/conv/conv_acc.c: use static allocation for vdecoderVadim Yanitskiy1-23/+19
Allocation of a new memory is an expensive operation, which takes place when it's initially unknown, how much memory will we need, or in order to decrease total memory usage. The vdecoder struct wasn't require dynamic allocation itself, so let's use static allocation in order to increase performance. Change-Id: Id1b140d3cb61db7352dcfc217a8fc36091e945ab
2017-06-19core/conv/conv_acc.c: delete reset_decoder()Vadim Yanitskiy1-20/+13
Currently this implementation exposes nothing than osmo_conv_decode_acc(), so it wasn't possible to call reset_decoder() from outside. The method itself was used to initialize accumulated path metrics and the starting state of encoder. Now this code is moved to generate_trellis(). Moreover, setting accumulated path metrics inside existing loop is a bit faster that calling memset(). Change-Id: I8f17cebf468cf0106927ccee091cfb2896649cb2
2017-06-19core/conv/conv_acc.c: drop unused structure memberVadim Yanitskiy1-2/+0
Change-Id: I81f7c35abf424f501ca53d6984c0d56f7936984b
2017-06-19core/conv: update description headers for conv_acc_*Vadim Yanitskiy5-5/+10
Change-Id: I00154776c8e7d346abcbaf9048ce04d9488bb458
2017-06-19core/conv: use proper filenamesVadim Yanitskiy6-10/+10
We already have generic convolutional transcoding implementation written by Sylvain Munaut and named 'conv.c', so 'viterbi_*' names looked a bit confusing. Let's use a single naming scheme for Viterbi related code. Change-Id: I61062a8d1fbf5f5fc85b4fac58dc4e9fa8b5ef90
2017-06-19Move NUM_BYTES macro to core libraryMax3-2/+3
It's universally useful so it make sense to have it in the shared core: * move macro from libosmocoding to libosmocore * add OSMO_ prefix * add doxygen docs Change-Id: I5386ba3e1f1cc153ba96c29dc71c9075a052aa02
2017-06-18tlv_test.c: Fix compilation warningsPau Espin Pedrol1-19/+25
Several warnings like the one below are fixed: warning: array subscript is below array bounds [-Warray-bounds] uint8_t *unchanged_ptr = buf - 1; Change-Id: I35d7d926939c14700cbca732bd64e588c75424b4
2017-06-18gprs_ns_test.c: Remove unused byte arraysPau Espin Pedrol1-49/+0
Commit 0d4e949e229a649ffd0503d8e930dba8be7dd34d changed the code to use functions with local variables holding the bytes, but forgot to remove the old global variables. This test fixes compilation warnings. Change-Id: I140de30038222b0419423d8c4f9da1946651a4e7
2017-06-18sms_test.c: Remove test of deprecated wrapper functionPau Espin Pedrol2-27/+0
The deprecated function is just a wrapper, and it triggers a compilation warning. Change-Id: Iaac701bdf0c0e66c343f68cc31d82550a024ef57
2017-06-18card_fs_uicc.c: Fix unused compilation warningPau Espin Pedrol1-1/+1
This array of bytes is not yet used but is referring to some specs. They may be used in the future, so leave it there but mark it explicitly as unused. Change-Id: I0a61d17f9989ecddafbc68d4b9446853e4c15159
2017-06-18Fix compilation warning on deprecated macroPau Espin Pedrol3-2/+11
A warning was printed even if the deprecation didn't apply to libosmocore because it is still allowed to use it internally. This patch fixes this case while still printing a warning if external projects build using libosmocore headers. Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4