commit | f3270f246fd05e56e13bd95dffda0fb361567ab4 | [log] [tgz] |
---|---|---|
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | Fri Dec 17 14:21:29 2021 +0100 |
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | Mon Feb 07 22:10:19 2022 +0100 |
tree | 40e969609d0aaba5dfc42e401d7d28b8ef0b0054 | |
parent | e452dd053ec044bceb2933f189ed34bc1278b3aa [diff] |
log: socket.c: rather use the osmo_sockaddr_str _FMT The OSMO_SOCKADDR_STR_FMT() and _ARGS() macros properly place square braces around IPv6 addresses, so that the port nr is clearly distinguishable. before: 1:2::3:4:5 after: [1:2::3:4]:5 When using a struct reference, the macro resolves to '(&sastr) ? .. : ..', which the compiler complains about as "condition is always true". Shim around that error with a pointer variable. I considered using osmo_sockaddr_to_str_c() instead, but here in socket.c we cannot assume that osmo_select_main_ctx() is being used and hence can't just use OTC_SELECT for log string composition. The struct osmo_sockaddr_str is a string representation in a local variable, and hence doesn't need talloc for log strings. I considered adding log_check_level() around the log string conversion, but since all of these instances are on LOGL_ERROR, I didn't bother. Related: SYS#5599 Change-Id: Idbe7582b2b7f14540919e911dad08af6d491f68f
This repository contains a set of C-language libraries that form the core infrastructure of many Osmocom Open Source Mobile Communications projects.
Historically, a lot of this code was developed as part of the OpenBSC project, but which are of a more generic nature and thus useful to (at least) other programs that we develop in the sphere of Free Software / Open Source mobile communications.
There is no clear scope of it. We simply move all shared code between the various Osmocom projects in this library to avoid code duplication.
The libosmocore.git repository build multiple libraries:
The official homepage of the project is https://osmocom.org/projects/libosmocore/wiki/Libosmocore
You can clone from the official libosmocore.git repository using
git clone git://git.osmocom.org/libosmocore.git
There is a cgit interface at https://git.osmocom.org/libosmocore/
Doxygen-generated API documentation is generated during the build process, but also available online for each of the sub-libraries at https://ftp.osmocom.org/api/latest/libosmocore/
Discussions related to libosmocore are happening on the openbsc@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/openbsc for subscription options and the list archive.
Please observe the Osmocom Mailing List Rules when posting.
Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
We us a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details
The current patch queue for libosmocore can be seen at https://gerrit.osmocom.org/#/q/project:libosmocore+status:open