14af167a55
SNPRINTF_BUFFER_SIZE() looks too complex, previous version maintains two different variables to account for the remaining space in the buffer, one of them is always decremented based on what snprintf() returns, which may result in underflow. These variables are swapped - not used consistently - all over this code. Replace this macro by a simplified version, with one single parameter to account for remaining space. This macro also deals with two corner cases: 1) snprintf() fails, actually never happens in practise, but documentation indicates it may return -1, so let's catch this case from here to stick to specs. 2) There is not enough space in the buffer, in that case, keep increasing offset, so we know how much would have been printed, just like snprintf() does. Thanks to Pau Espin for reporting, and Holger for clues on this. I have run osmux_test and, at quick glance, it looks good. Change-Id: I5b5d6ec57a02f57c23b1ae86dbd894bad28ea797 |
||
---|---|---|
contrib | ||
debian | ||
examples | ||
include | ||
m4 | ||
src | ||
tests | ||
.gitignore | ||
.gitreview | ||
COPYING | ||
Doxyfile.in | ||
Makefile.am | ||
README.md | ||
TODO-RELEASE | ||
configure.ac | ||
git-version-gen | ||
libosmo-netif.pc.in |
README.md
libosmo-netif- Osmocom network interface interface library
This repository contains a C-language library that form the basis of various higher-layer cellular communications protocol implementation. It implements stream server and clients for TCP, UDP, IPA as well as the non-standard/proprietary OSMUX protocol.
Homepage
The official homepage of the project is https://osmocom.org/projects/libosmo-netif
GIT Repository
You can clone from the official libosmo-netif.git repository using
git clone git://git.osmocom.org/libosmo-netif.git
There is a cgit interface at http://git.osmocom.org/libosmo-netif/
Documentation
There is no Doxygen-generated API documentation yet for this library. It would be great to some day have it, comparable to libosmocore.
Mailing List
Discussions related to libosmo-netif 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.
Contributing
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 libosmo-netif can be seen at https://gerrit.osmocom.org/#/q/project:libosmo-netif+status:open