aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2018-06-11gsm/gsm0480.c: introduce gsm0480_extract_ie_by_tag()Vadim Yanitskiy1-0/+2
In some cases, there is no need to parse the whole message, e.g. during the conversion from DTAP to GSUP/MAP. This function can be used to extract given IE from a message. Change-Id: I3989d061903352473305f80712f1a1560d05df3d
2018-06-09vty: Add logging_vty_add_deprecated_subsysHarald Welte1-0/+1
This function permits the user to register deprecated log categories, which will ensure that if log categories are removed from a program, old config files will still load. We simply dynamically allocate a cmd_element and install it at CFG_LOG_NODE. Not registering it at VIEW_NODE or ENABLE_NODE ensures that it's not accessible from the interactive VTY, but only from the config file / configure node. Change-Id: I171f62ea2dc565b3a6c3eecd27fb7853e2529598
2018-06-08fsm: Change semantics of LOGPFSML() log-levelHarald Welte1-1/+2
The general idea about each osmo_fsm_instance having a separate log-level was to be able to selectively increase/show/enable logging for some FSM instances (e.g. of a particular subscriber) while maintaining normal logging verbosity for all other instances of the same FSM. The introduction of LOGPFSML() in Change-Id If295fdabb3f31a0fd9490d1e0df57794c75ae547 broke that idea, as it would use a compile-time log level, irrespective of the osmo_fsm_inst.log_level setting of the given instance. Let's combine the two: Use the explicit level stated at LOGPFSML(), _unless_ this instance has a higher log_level configured. This way, all FSMs should normally be created with osmo_fsm_inst.log_level == LOGL_DEBUG. At that point LOGPFSM() statements would be rendered at debug level, typically below the threshold of most logging configurations. Code that has explicit higher log levels like LOGPFSML(fi, LOGL_ERROR) would always be printed, as it is an error message. And if we now increase the osmo_fsm_inst.log_level, then even the normal LOGPFSM() statements would suddenly be logged at that higher level, selectively increasing log verbosity - like originally intended. Change-Id: I1820f04d0c6f5d5ff08eb95b8c0e88764534491a
2018-06-07fix gsm0808_permitted_speech(): don't return HR3 for TCH_F + AMRNeels Hofmeyr1-1/+1
Change-Id: Icca23940791f97fa64dbc3f2734270b99f9550c1
2018-06-06Add osmo_isqrt32() to compute 32bit integer square rootHarald Welte1-0/+2
Change-Id: I2b96db6e037e72e92317fec874877e473a1cf909
2018-06-02tlv: Add TLVP_VAL_MINLEN() to obtain value _if_ length is >= minimumHarald Welte1-0/+10
This is a combination of TLVP_VAP() and TLVP_GET_MINLEN() Change-Id: Ic5a177941219ebc3a3bceb3f68bdb3b2cacb934b
2018-06-02gsm0808: Add value_string for LCLS related IEsHarald Welte1-0/+15
Change-Id: I18d7a29496929c761aeaba9c0aee847befc13108
2018-05-31add osmo_fsm_inst_state_chg_keep_timer()Neels Hofmeyr1-0/+15
Change-Id: I3c0e53b846b2208bd201ace99777f2286ea39ae8
2018-05-31GSUP: introduce new messages for SS/USSD payloadsVadim Yanitskiy1-0/+11
In order to be able to transfer SS/USSD messages via GSUP, this change introduces the following new message types: - OSMO_GSUP_MSGT_PROC_SS_*, and the following new IE: - OSMO_GSUP_SS_INFO_IE which represents an ASN.1 encoded MAP payload coming to/from the mobile station 'as is', without any transcoding. Change-Id: Ie17a78043a35fffbdd59e80fd2b2da39cce5e532 Related: OS#1597
2018-05-31GSUP: implement TCAP-like session managementVadim Yanitskiy1-0/+21
Unlike TCAP/MAP, GSUP is just a transport layer without the dialogue/context. This prevents us from having session based communication, required e.g. for USSD. But we can emulate TCAP dialogue by adding additional IEs, which would allow to relate each message to a particular session. This change introduces the following IEs: - OSMO_GSUP_SESSION_ID_IE, - OSMO_GSUP_SESSION_STATE_IE, which optionally can be used to indicate that the message is related to a session with given ID, and to manage session state, i.e. initiate, continue, and finish. Change-Id: I1cee271fed0284a134ffed103c0d4bebbcfde2a8 Related: OS#1597
2018-05-30gsm0808: Add encoding functions for LCLS BSSMAP messagesHarald Welte1-0/+5
Change-Id: Ib83143e467df068b7d462a8e51d94b9d961ce18f
2018-05-30gsm_08_08.h: Add enum for LCLS config, control and statusHarald Welte1-0/+28
Change-Id: I775aba59942fb6f34fb31b71d2f0f2ac5c3ae831
2018-05-29ports.h: Add ctrl port for osmo-gbproxyDaniel Willmann2-1/+2
Change-Id: I46a1cef3013c9bbf9b5a6d64e83cd84568f2523c
2018-05-28Add enum gsm48_progress_descKeith1-0/+12
From GSM 04.08 Section 10.5.4.21 / Table 10.5.127 Change-Id: I6574e8808aaf39fad8026290aa2cc657734e18b5
2018-05-27add gsm0808_create_handover_request_ack()Neels Hofmeyr1-0/+4
Related: OS#2283 (inter-BSC Handover, BSC side, MT) Change-Id: I692292a06c7d66004404560dc4ed933ca9107f9b
2018-05-27add support for gsm0808 HANDOVER REQUIRED messageNeels Hofmeyr2-0/+59
Related: OS#2283 (inter-BSC Handover, BSC side, MO) Change-Id: Idb6dc3eab0282158a17091d97ed77c1e2e3eb3c2
2018-05-27add gsm0808_cell_id_to_list()Neels Hofmeyr1-0/+1
The idea is to be able to add a gsm0808_cell_id to a gsm0808_cell_id_list2: first convert it to a list, then re-use gsm0808_cell_id_list_add(). It will be used by osmo-bsc to manage neighbor-BSS cell identifiers from VTY. Change-Id: Ibf746ac60b1b1e920baf494b396658a5ceabd788
2018-05-26ctrl: Add doxygen API documentation; generate html from itHarald Welte1-6/+77
Closes: OS#3293 Change-Id: I8dc2f24d4bf557ff7bb0f2f46881f9f8d9d7f86f
2018-05-26Add enum gsm48_cause_coding from GSM 04.08 Section 10.5.4.11Keith1-0/+8
Change-Id: I3d9c8e117ad19f70a3273650d7c0f8280d7bdb9a
2018-05-24introduce vty_out_rate_ctr_group_fmt() functionStefan Sperling1-0/+2
This new function can be used to print a rate counter group according to a format string. The intention is to generalize and replace manual printing of counters as implemented for the 'show statistics' VTY command of osmo-bsc. Related: OS#3245 Related: osmo-bsc commit 71d524c059c5a5c90e7cb77d8a2134c1c68b9cde (g#9217) Change-Id: Idb3ec12494ff6a3a05efcc8818e78d1baa6546bd
2018-05-24mncc: properly export osmo_mncc_name()Harald Welte1-0/+5
For some strange reason, the osmo_mncc_name() inline function was not in the mncc.h header, but in the mncc.c file. Let's fix that. Change-Id: I2c3666510c981dffa4ba25bed517fd7ebd1250f5
2018-05-15fix spellingThorsten Alteholz1-2/+2
Change-Id: I3ac92217f83279d5f987ab34eb18b2e6cb1c7812
2018-05-11isdnhdlc: Port from kernel to userspaceHarald Welte2-23/+26
* prefix all symbols/constants with osmo_ * use stdint.h types instead of kernel types * use Doxygen API documentation * use Osmocom CRC16-CCITT functions * use Osmocom bit-reversal functions * integrate with Automake Change-Id: I109085ab3e412c20b19cd42fb7137aa0e4167542
2018-05-11import isdn4linux HDLC code from linux kernelHarald Welte1-0/+82
I've been importing from 94d7dbf108813ea45a91e27e9a8bd231d5a23fa7 but the isdnhdlc code hasn't seen any changes since 2012 anyway. Change-Id: I3c58f9cb6921c2fdd0f2fcb11f622a0be88c7c63
2018-05-10Add osmo_timerfd_* functions for osmo_fd-wrapped timerfdHarald Welte1-0/+7
Linux offers file descriptor based periodic (interval) timers, which can achieve a higher precision than our userspace based timers and which can be slave'd to CLOCK_MONOTINIC or other clock sources. Let's add some code for osmo_fd wrapped versions that integrate well with our select() abstraction. The code has been used in osmo-bts-trx since June 2017 (change-id I51b19adde14ebb7ef3bb863d45e06243c323e22e), and I'm just renaming and moving it to libosmocore here. After a merge, the osmo-bts implementations can be removed in favor if this one. Change-Id: Ibeffba7c997252c003723bcd5d14122c4ded2fe7
2018-05-08add gsm0808 channel enum to IE val conversion functionsNeels Hofmeyr1-0/+107
Add: - gsm0808_current_channel_type_1() - gsm0808_permitted_speech() - gsm0808_chosen_channel() - gsm0808_channel_type_name() gsm0808_permitted_speech() is moved from osmo-bsc's bssap_speech_from_lchan(); gsm0808_chosen_channel() is moved from osmo-bsc's lchan_to_chosen_channel(); Rationale: will be re-used by inter-BSC handover, makes sense to keep with the other gsm0808 utils. Related: OS#2283 (inter-BSC handover, BSC side) Change-Id: I8a3cc5d4548e9a78d945d54c69ccced251edcec9
2018-05-07define a constant for the max length of called party BCD IEStefan Sperling1-0/+1
According to TS 24.008 10.5.4.7 the called party BSC number IE has a maximum length of 43 octets. This length is assumed inside osmo-hlr with a magic number: uint8_t msisdn_enc[43]; /* TODO use constant; TS 24.008 10.5.4.7 */ This change makes libosmocore provide a constant which osmo-hlr can use. Change-Id: Ia0bf6ceadcac38a8c75d166402b54058e5c6c6d4
2018-05-04control_if: Avoid heap-use-after-free in osmo_wqueue_bfd_cbPau Espin Pedrol1-3/+3
Imagine following scenario: 1- client connects to CTRL iface, a new conn is created with POLL_READ enabled. 2- A non-related event happens which triggers a TRAP to be sent. As a result, the wqueue for the conn has now enabled POLL_WRITE, and message will be sent next time we go through osmo_main_select(). 3- At the same time, we receive the GET cmd from the CTRL client, which means POLL_READ event will be also triggered next time we call osmo_main_select(). 4- osmo_main_select triggers osmo_wqueue_bfd_cb with both READ/WRITE flags set. 5- The read_cb of wqueue is executed first. The handler closes the CTRL conn for some reason, freeing the osmo_fd struct and returns. 6- osmo_qeueue_bfd_cb keeps using the already freed osmo_fd and calls write_cb. So in step 6 we get a heap-use-after-free catched by AddressSanitizer: 20180424135406115 DLCTRL <0018> control_if.c:506 accept()ed new CTRL connection from (r=10.42.42.1:53910<->l=10.42.42.7:4249) 20180424135406116 DLCTRL <0018> control_cmd.c:378 Command: GET bts.0.oml-connection-state 20180424135406117 DLINP <0013> bts_ipaccess_nanobts.c:417 Identified BTS 1/0/0 20180424135406118 DNM <0005> abis_nm.c:1628 Get Attr (bts=0) 20180424135406118 DNM <0005> abis_nm.c:1628 Get Attr (bts=0) 20180424135406118 DCTRL <000e> osmo_bsc_ctrl.c:158 BTS connection (re)established, sending TRAP. 20180424135406119 DLCTRL <0018> control_if.c:173 close()d CTRL connection (r=10.42.42.1:53910<->l=10.42.42.7:4249) ================================================================= ==12301==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000003e04 at pc 0x7f23091c3a2f bp 0x7ffc0cb73ff0 sp 0x7ffc0cb73fe8 READ of size 4 at 0x611000003e04 thread T0 #0 0x7f23091c3a2e in osmo_wqueue_bfd_cb /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bsc/libosmocore/src/write_queue.c:65 #1 0x7f23091ad5d8 in osmo_fd_disp_fds /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bsc/libosmocore/src/select.c:216 #2 0x7f23091ad5d8 in osmo_select_main /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bsc/libosmocore/src/select.c:256 #3 0x56538bdb7a26 in main /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bsc/osmo-bsc/src/osmo-bsc/osmo_bsc_main.c:532 #4 0x7f23077532e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) #5 0x56538bdb8999 in _start (/home/jenkins/workspace/osmo-gsm-tester_run-prod/trial-896/inst/osmo-bsc/bin/osmo-bsc+0x259999) Fixes: OS#3206 Change-Id: I84d10caaadcfa6bd46ba8756ca89aa0badcfd2e3
2018-04-23gsm_08_58.h: introduce RSL_IE_ERIC_PAGING_GROUPAlexander Couzens1-0/+1
Ericsson supports a RSL command to page and immediate assign as single command. For paging a MS the BTS must know the paging group. Change-Id: I9194500e307ad69f8da07510bc965a7a5cd82a2a
2018-04-21gsm_08_58.h: Add Ericsson vendor-specific RSL message typesPau Espin Pedrol1-0/+5
We are alredy doing the same way for ip.access and siemens ones, and this way we avoid using the hardcoded value in osmo-bsc. Change-Id: I7cb65f3ff1cfdbe4eee97b7545bcd13a38c72e25
2018-04-18add gsm0808_cell_{id,id_list}_name() and friendsNeels Hofmeyr2-1/+13
Provide comprehensive API to obtain string representations of Cell Identifiers and -Lists. Change gsm0808_test.c to use the new functions (which simplifies the output a bit), so that we don't duplicate printing code in gsm0808_test.c, and so that the not-so-trivial printing code is also tested. In gsm0808_test, also test gsm0808_cell_id_list_name_buf()'s return value and truncation behavior. The rationale for gsm0808_cell_id_list_name(), i.e. printing an entire list of cell identifiers, is that even though the maximum is 127 elements, a list of more than a few elements is hardly ever expected in practice (even more than one element isn't actually expected: either "entire BSS" or a single LAC). It is thus useful to log the entire list when it shows up in Paging and Handover. Change-Id: I9b2106805422f96c5cc96ebb9178451355582df3
2018-04-18tlv: add TLV_GET() and TLV_GET_MINLEN()Neels Hofmeyr1-0/+21
Rationale: so far we use code like if (TLVP_PRESENT(&tp, VERY_LONG_ENUM_VALUE_NAME_THAT_NEVER_ENDS)) { val = TLVP_VAL(&tp, VERY_LONG_ENUM_VALUE_NAME_THAT_NEVER_ENDS); len = TLVP_LEN(&tp, VERY_L0NG_ENUM_VALUE_NAME_TH4T_NEVER_EMDS); } This is a) very long and b) prone to picking the wrong name one of the three times, which would use the wrong length or val without necessarily being noticed. A safer and shorter, more readable pattern is: struct tlv_p_entry *e = TVLP_GET(&tp, VERY_LONG_ENUM_VALUE_NAME_THAT_NEVER_ENDS); if (!e) return -ENOENT; hexdump(e->val, e->len); Change-Id: I445de17fc2daa3ab051f5708dd0cc185b23dc048
2018-04-17protocol/gsm_04_08.h: drop incorrect GSM48_PDISC_USSDVadim Yanitskiy1-1/+0
According to the GSM TS 04.07, section 11.2.3.1.1 "Protocol discriminator", bits 1 to 4 of the first octet of a standard L3 message contain the protocol discriminator IE. Meanwhile, the GSM48_PDISC_USSD represents value 0x11, i.e. 0b10001, that requires 5 bits, and moreover it is not documented anywhere. Let's drop it. Change-Id: Ic4eb8a6db4ff1dfd535bd0c84e7acf1908422f64
2018-04-13add gsm0808_{enc,dec}_cell_idNeels Hofmeyr1-12/+21
Clarify semantics and micro-optimise for the case of single Cell Identifer IEs. Test in gsm0808_test.c So far we have gsm0808_enc_cell_id_list2(), but there also exist instances of single Cell Identifiers (3GPP TS 48.008 3.2.2.17). It is possible to decode the same using the cell identifier list API, but this forces the caller to also keep a full struct gsm0808_cell_id_list2 with all its 127 entries around. E.g. for handover, there are two Cell Identifiers (Serving and Target); I'd need two full cell id lists for each, and these would be dynamically allocated for each handover operation, whether it uses them or not. Related: OS#2283 (inter-BSC HO, BSC side) Change-Id: I9f9c528965775698ab62ac386af0516192c4b0cc
2018-04-13add tlv_parse2(), capable of multiple instances of the same IENeels Hofmeyr1-0/+3
Allow passing multiple struct tlv_parsed in an array, to allow parsing as many repeated IEs as are expected by the caller. From tlv_parse(), call tlv_parse2() with dec_multiple = 1 to yield the previous behavior. tlv_parse() remains valid API. An example of multiple IEs is the BSSMAP Handover Request, containing Cell Identifier (Serving) and Cell Identifier (Target), both defined by 3GPP TS 48.008 3.2.2.17 with identical IE tags; both are mandatory. Related: OS#2283 (inter-BSC HO, BSC side) Change-Id: Id04008eaf0a1cafdbdc11b7efc556e3035b1c84d
2018-04-13add gsm0808_cell_id_list_add() to combine two cell identifier listsNeels Hofmeyr1-0/+1
This will be used by the upcoming neighbor_ident API in osmo-bsc, where the vty interface allows composing neihbor BSS cell identifier lists, and we want to allow adding individual items from individual user commands. It will also be useful to accumulate cell identifiers in case a subscriber sees multiple alternative cells from a neighboring BSS, and we want to pass these on to the MSC in a Handover Required. Related: OS#2283 (inter-BSC HO, BSC side) Change-Id: I5781f5fa5339c92ab2e2620489b002829d206925
2018-04-13add osmo_cgi_name()Neels Hofmeyr1-0/+2
This will be used by cell idenitifier list code, like upcoming neighbor_ident VTY in osmo-bsc and regression tests. Change-Id: Iebc5cdf61b697b1603900993fc265af3eca0cedf
2018-04-11msgb: msgb_pull: Abort when pulling more than avail sizePau Espin Pedrol1-0/+3
Change-Id: I512ff2035ae7a929e6c96df82938cc1ddbcc4e2a
2018-04-11msgb: msgb_get: Drop unneeded tmp varPau Espin Pedrol1-2/+1
Change-Id: I27bb2ab59408c9cd1363b3b5acb2263128c55732
2018-04-10deprecate PLMN de-/coding functions incapable of 3-digit MNC with leading zerosNeels Hofmeyr2-7/+12
All our projects have seen patches to move to 3-digit MNC handling. Furthermore, since our builds no longer break from deprecation warnings, I shall no longer refrain from deprecating old API. Change-Id: I55dfaf7ce74870de44120b26c42d45bb7b184341
2018-04-09fix issue on big endian architectureThorsten Alteholz1-1/+1
OSMO_IS_LITTLE_ENDIAN is always defined and has a value of either 0 or 1 as a result in byteswap.h the corresponding swap functions will be always called, independent of the endianess Signed-off-by: Thorsten Alteholz <osmocom@alteholz.de> Change-Id: I4a09d2d8ccf155e70a3977ae1747758b6bc5125e
2018-04-09add gsm48_reject_value_namesNeels Hofmeyr1-0/+4
There seems to be quite some confusion / overlap between enum gsm48_reject_value, gsm48_gsm_cause and gsm48_gmm_cause. I tried to go with gsm48_gsm_cause_names[], but e.g. GSM48_REJECT_CONGESTION is not represented. Instead of attempting to mix/merge those enums, provide a separate value string array for enum gsm48_reject_value. This will be used by osmo-msc's libvlr (refactoring of FSM result handling), I27bf8d68737ff1f8dc6d11fb1eac3d391aab0cb1. Change-Id: I6661f139e68a498fb1bef10c266c2f064b72774a
2018-04-09add osmo_fsm_inst_update_id_f()Neels Hofmeyr1-0/+1
In the osmo-msc, I would like to set the subscr conn FSM identifier by a string format, to include the type of Complete Layer 3 that is taking place. I could each time talloc a string and free it again. This API is more convenient. From osmo_fsm_inst_update_id(), call osmo_fsm_inst_update_id_f() with "%s" (or pass NULL). Put the name updating into separate static update_name() function to clarify. Adjust the error message for erratic ID: don't say "allocate", it might be from an update. Adjust test expectation. Change-Id: I76743a7642f2449fd33350691ac8ebbf4400371d
2018-04-09add osmo_quote_str(),osmo_quote_str_buf() and testNeels Hofmeyr1-0/+2
Rationale: with osmo_escape_str(), you get the escaped contents of the string, but not so graceful handling of NULL strings. The caller needs to quote it, and for NULL strings not quote it. osmo_quote_str() is like osmo_escape_str() but always quotes a non-NULL string, and for a NULL string returns a literal NULL, i.e. it should (tm) give the exact C representation of a string. That's useful in testing, to show exactly what char* situation we have, without jumping through hoops like if (str) printf("\"%s\"", osmo_escape_str(str, -1)); else printf("NULL"); Copy the unit test for osmo_escape_str() and adjust. To indicate that the double quotes are returned by osmo_quote_str(), use single quotes in the test printf()s. I considered allowing to pick the quoting characters by further arguments, but that complicates things: we'd need to escape the quoting characters. Just hardcode double quotes like C. Change-Id: I6f1b3709b32c23fc52f70ad9ecc9439c62b02a12
2018-04-05ctrl: fix deferred commands (and hence fix osmo-bts-sysmo 'clock-info' cmd)Neels Hofmeyr1-0/+3
The CTRL interface has a ctrl_cmd_def_* API that allows deferring a CTRL command reply until later. However, the command handling currently fails to acknowledge this and deallocates the struct ctrl_cmd anyway. Fix: in struct ctrl_cmd, add a defer pointer to be populated by ctrl_cmd_def_make(). A cmd thus marked as deferred is not deallocated at the end of command handling. This fix needs no change in calling code. (Another idea was to return a different code than CTRL_CMD_HANDLED when the command is to be deferred, but that would require adjusting each user of ctrl_cmd_def_make(). The implicit marking is safer and easier.) Show that handling deferred commands is fixed by adjusting the expectations of ctrl_test.c's test_deferred_cmd() and removing the now obsolete exit_early label. One symptom of the breakage is that osmo-bts-sysmo crashes when asked to report a trx's clock-info, which is aggravated by the fact that the sysmobts-mgr does ask osmo-bts-sysmo for a clock-info. The crash appears since Id583b413f8b8bd16e5cf92a8a9e8663903646381 -- it looked like just fixing an obvious memory leak, which it did as shown by the unit test, but deferred ctrl commands actually relied on that leak. Both fixed now. Related: OS#3120 Change-Id: I24232be7dcf7be79f4def91ddc8b8f8005b56318
2018-04-04gsm0480: copy the raw USSD data, its DCS and lengthVadim Yanitskiy1-0/+12
As it was already documented before, the 'ss_request' struct has a rudiment of deprecated 'ussd_request' struct - the 'ussd_text' field. It represents the data either of an INVOKE component, either of a RETURN_RESULT component, encoded as ASCII in case if DCS is 0x0f (i.e. decoded by the code itself), otherwise raw bytes 'as is'. Previously, there was no possibility to distinguish between ASCII and raw bytes with different DCS. Moreover, the payload decoding is not desired in some cases. Let's introduce the new fields, which will carry the raw unmodified payload, its length and DCS (Data Coding Scheme). Change-Id: Ia193d175021e145bb3b131290231f307dbefc64a
2018-04-04gsm0480: document the 'ss_request' structureVadim Yanitskiy1-0/+31
Change-Id: I22144dd759e0c1bb1965574b7ddd676606e5d6b7
2018-03-29gsm0808: Add value strings for BSSMAP cause codesPhilipp Maier1-0/+1
libosmocore has no value strings for BSSMAP cause codes yet. - Add value strings for BSSMAP cause codes and a function to retrieve them Change-Id: I313dd8d7b06374e1e35ddc18b7a42562d9e25d45 Related: OS#1609
2018-03-28fix logging talloc ctx: add osmo_init_logging2()Neels Hofmeyr1-1/+5
Deprecate osmo_init_logging() for the benefit of adding an explicit talloc context argument to new function osmo_init_logging2(). Pass a ctx to log_init() instead of hardcoded NULL. Before now, *all* of our code uses a NULL ctx for logging, which amounts to talloc "leaks" hit by address sanitizer builds on newer gcc (e.g. gcc 7.3.0 on debian 9). This commit helps fixing "leaks" detected in e.g. osmo-bsc unit tests by a sanitize build with gcc (Debian 7.3.0-12) 7.3.0. Change-Id: I216837780e9405fdaec8059c63d10699c695b360
2018-03-23gsm_08_08: correct speech codec defaultsPhilipp Maier1-4/+4
The speech codec defaults are not correct. The defaults recommended in 3GPP TS 28.062, Table 7.11.3.1.3-2 are limited by 3GPP TS 48.008, Section 3.2.2.103. Some defaults are actually reserved for future use. Also the endianess of the 16 bit values is reversed. - correct values so that they match the specification - transmit bytes in the correct endianess Change-Id: I6c3a34d39a375d71c4128fd38f06629e8b98b100