| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Mark abis_nm_debugp_foh() function superseded by macro with the same
name as deprecated.
Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9
|
|
|
|
|
|
|
| |
Stating that it 'truncates src' is misleading. Also clarify whether siz
includes the space needed for the terminating NUL.
Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261
|
|
|
|
|
|
| |
In EMBEDDED builds we don't have a system-wide talloc
Change-Id: Icc526016bda45b36e584afee8669996752d6d89c
|
|
|
|
|
|
|
|
| |
Using --disable-ctrl, one can disable the building of libosmoctrl.
The 'embedded' target will also automaticall disable ctrl.
Change-Id: I6912396338c5b23ae860fef2a55854d6df9a579d
|
|
|
|
|
|
| |
oap_test.c
Change-Id: Id524327b3f44e22e3aa44c5e8e4965b084cb326a
|
|
|
|
|
|
|
|
| |
The TbfTest in osmo-pcu calls gprs_ns_vty_init() repeatedly, which aborts
because of duplicate VTY elements. Fix this by skipping the VTY init if
it already happened.
Change-Id: I05c7f25a4e873ae76b206819180b8b043b60103e
|
|
|
|
|
|
|
|
|
| |
It accept fixed number of arguments including va_list instead of variable
number of arguments in abis_nm_fail_evt_rep() - similar to vprintff() vs
printf().
Related: OS#1615
Change-Id: Ib293dec1c2de9b664584a8456c782ea7b6dd8555
|
|
|
|
|
|
| |
Log error cause and state names in case of SABM errors.
Change-Id: I2c7fa276e03f8b14ba41cc1fb6e19d0aae77d127
|
|
|
|
|
|
|
| |
Max's note: adjusted test output.
Change-Id: I46477c631bf86345cb757f31d7f2e2935b12adcc
Related: OS#1801
|
|
|
|
|
|
|
|
| |
Add string representation of Probable Cause Type from 3GPP TS 12.21 §
9.4.43.
Change-Id: I9fe14ed3b5398f59dd06a509e4d419e074cc20a7
Related: OS#1615
|
|
|
|
| |
Change-Id: I89212e4f149f019099115a85bab353c04170df90
|
|
|
|
|
|
|
| |
This addresses a FIXME in the fsm.c code: osmo_fsm_register() should
fail in case a FSM with the given name already exists.
Change-Id: I5fd882939859c79581eba70c14cbafd64560b583
|
|
|
|
|
|
|
|
|
| |
When the caller installs two identical commands at a given VTY node, the
result is that neither of the two commands can ever be executed: The VTY
would always complain about "Ambiguous command.". Let's fail fast at
program start when two identical commands are intalled.
Change-Id: I85ff4640ebb3d8b75a6a9ab5d2f668edb5b7189e
|
|
|
|
|
|
|
|
| |
Add 3GPP TS 12.21 § 8.8.2 Failure Event Report function which pack given
vararg string and parameters into msgb.
Change-Id: I58c198d8ea588432c62520928b08f0b2a7035e93
Related: OS#1615
|
|
|
|
|
|
|
|
| |
Add human-readable descriptions to event causes from 3GPP TS 12.21 §
9.4.43.
Change-Id: Id173c978616c98b7831fbafb5401064257f1cf73
Related: OS#1615
|
|
|
|
|
|
|
|
|
| |
Function bitvec_rl_curbit added to get number of uninterrupted
bits run in vector starting from the current bit till max number
of bits.
Test case is added to check bitvec_rl_curbit.
Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26
|
|
|
|
|
|
| |
Add functions to copy and merge parsed TLV structures from OsmoBTS.
Change-Id: Ieaaaed19da9c069fe451faa53d24c5b84d7d5615
|
|
|
|
|
| |
Change-Id: I9c3bc15662949654e7bba6aad5488c69ee7d0c45
Related: OS#1615
|
|
|
|
|
|
|
|
| |
Drop perror() calls from GSMTAP code: it's application job to do the
proper logging - library code should not write to stdout/stderr
directly.
Change-Id: Ifa149e65d76c6e64fda2946725c16672233aff2e
|
|
|
|
|
|
|
| |
This resolves
gprs_cipher_core.c:118:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Change-Id: Ib1866595030ad9d11c886621ce69632462befa3a
|
|
|
|
|
|
|
|
|
|
|
|
| |
During FSM instance termination, fetch the parent pointer every time just
before using it, in case the child termination or cleanup callback wish to
change anything about the parent, e.g. to prevent event dispatch.
This patch was created to try and fix a problem that was in the end solved
differently. There is no actual need or use case for this at the moment, but it
generally makes sense to get the parent pointer as late as possible.
Change-Id: I999d7f29ba10281d4005c5163130bb2d80148362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
osmo_fsm_inst_term() has code for safe child removal, publish that part as
osmo_fsm_inst_term_children(); also use from osmo_fsm_inst_term().
As with osmo_fsm_inst_term(), add osmo_fsm_inst_term_children() macro to pass
the caller's source file and line to new _osmo_fsm_inst_term_children().
Rationale: in openbsc's VLR, I want to discard child FSMs when certain events
are handled. I could keep a pointer to each one, or simply iterate all
children, making the code a lot simpler in some places.
(Unfortunately, the patch may be displayed subobtimally. This really only moves
the children-loop to a new function, replaces it with a call to
_osmo_fsm_inst_term_children(fi, OSMO_FSM_TERM_PARENT, NULL, file, line) and
drops two local iterator variables. No other code changes are made, even though
the diff may show large removal + addition chunks)
Change-Id: I8dac1206259cbd251660f793ad023aaa1dc705a2
|
|
|
|
|
|
|
|
|
|
|
| |
LOGPFSM and LOGPFSML are in the header file, put the *SRC variants also there
so users of the osmo_fsm_inst API may conveniently create own functions that
log the caller's source file and line.
Very useful if many action functions call the same event dispatching function,
like foo_fsm_done(), and one needs to know which of the callers to debug.
Change-Id: I39447b1d15237b28f88d8c5f08d82c764679dc80
|
|
|
|
| |
Change-Id: I1970773440865f1415004bcf0164603468acf90b
|
|
|
|
| |
Change-Id: I6af0d43ab0082e45df676c1d69b26310b59a8031
|
|
|
|
|
|
|
| |
if stdin/stdout/stderr are all closed by our environment, it may very
well be that opening a serial port returns fd == 0.
Change-Id: Ifd9670260883a35da0629369e0d49e467d5b4d72
|
|
|
|
|
| |
Change-Id: I14f934957e1086b803f3a7b9b5e6d602380f0be2
Fixes: Coverity CID 158987
|
|
|
|
|
|
| |
So let's ignore the error we might get from this opreration.
Change-Id: I69dad90403355b6512c3bf4c7fd10dd1dd985f01
|
|
|
|
|
|
|
|
| |
There are some serial ports that apparently block during the open in
some circumstances. We don't want that. We want to either open it
immediately, or fail fast.
Change-Id: I626b138574bc50f4f4b09c4d609f3623ff512dff
|
|
|
|
|
|
| |
Use the implementation from Linux lib/crc-ccitt.c (GPLv2)
Change-Id: I26bb54038f5ab36bbb34da7f5fb8ae6c0c0386a4
|
|
|
|
|
|
|
| |
libosmocore itself is GPLv2-or-later. Only the test cases are permitted
to be AGPL licensed.
Change-Id: I62f2eed6305bfa11a64c6d633e08aabeaf9f0b10
|
|
|
|
|
|
|
|
| |
Logging 'Release' is a bit ambiguous. At first I tought a subscriber
connection was being released, IMHO 'Freeing instance' better describes that
we are freeing an osmo_fsm_inst.
Change-Id: I5cf99707d2ba5620b2988f777fa39cc806ec0212
|
|
|
|
| |
Change-Id: Ifc2b499792fda378c807c678b8e06630cb64d273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSMO_STRINGIFY particularly allows putting port numbers from a #define into VTY
doc strings, like:
#define FOO_PORT 2342
DEFUN(...,
"Foo UDP port (default: " OSMO_STRINGIFY(FOO_PORT) ")\n")
OSMO_VALUE_STRING creates value_string items with the string being exactly the
enum value's name. Replaces a similar macro def in fsm.c
Change-Id: I857af45ae602bb9a647ba26cf8b0d1b23403b54c
|
|
|
|
|
|
|
|
|
|
|
|
| |
* update debian/changelog
* update TODO-RELEASE
* add comments to Makefile.am and TODO-RELEASE to simplify the process
in future
* add link to libtool docs to Makefile.am to simplify LIBVERSION
maintenance
Related: OS#1861
Change-Id: I22c257e357f597519120232d742d6a61289db021
|
|
|
|
|
|
|
|
|
|
|
|
| |
When terminating child FSMs, restart iteration after every child, to make
sure that we don't terminate a child twice. Terminating one child may emit
events that in turn terminates other children.
I created this patch because at first it looked like the cause of a bug,
which turned out not to be the case. So I have no actual use case of this
situation, but it does generally make sense to me, so submitting this.
Change-Id: I00990b47e42eeb43707a9a42abcd9df52fe5f483
|
|
|
|
|
|
|
|
|
|
|
| |
Since removing an FSM from its parent twice causes a segfault, it is very
interesting to see when that is attempted.
Removing could be made more robust, but logging is interesting for
investigating why an FSM is being removed twice in the first place (currently
the case in openbsc's vlr_lu_fsm).
Change-Id: Idec6b7aa5344f1e903c9d2aa2a3640cab0d70fb0
|
|
|
|
| |
Change-Id: Iaf63d3cadb0d46bf454e3314ebb439240cafd834
|
|
|
|
| |
Change-Id: I6f683ed0c864a87bf1232994eb2deaf9b313a244
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When looking at log output, it is not interesting to see that a state
transition's petty details are implemented in fsm.c. Rather log the *caller's*
source file and line that caused an event, state change and cascading events.
To that end, introduce LOGPSRC() absorbing the guts of LOGP(), to be able to
explicitly pass the source file and line information.
Prepend an underscore to the function names of osmo_fsm_inst_state_chg(),
osmo_fsm_inst_dispatch() and osmo_fsm_inst_term(), and add file and line
arguments to them. Provide the previous names as macros that insert the
caller's __BASE_FILE__ and __LINE__ constants for the new arguments. Hence no
calling code needs to be changed.
In fsm.c, add LOGPFSMSRC to call LOGPSRC, and add LOGPFSMLSRC, and use them in
above _osmo_fsm_inst_* functions.
In addition, in _osmo_fsm_inst_term(), pass the caller's source file and line
on to nested event dispatches, so showing where a cascade originated from.
Change-Id: Iae72aba7bbf99e19dd584ccabea5867210650dcd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide one central LOGPFSML to print FSM information, take the FSM logging
subsystem from the FSM instance but use an explicitly provided log level
instead of the FSM's default level.
Use to replace some, essentially, duplications of the LOGPFSM macro.
In effect, the fsm_test's expected error changes, since the previous code dup
for logging events used round braces to indicate the fi's state, while the
central macro uses curly braces.
Change-Id: If295fdabb3f31a0fd9490d1e0df57794c75ae547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In log_set_category_filter(), passing a negative index lead to memory
corruption. Particularly dangerous since the internal logging categories have
negative values.
Fix: apply map_subsys() to interpret negative values as internal logging
categories.
As a side effect, out-of-bounds logging categories will be mapped to DLGLOBAL
instead of being dropped.
Fix the expectations in logging_test to match the fixed bug.
While at it also guard against a NULL logging target.
Change-Id: Ib0725b22bc39498c6b3970a61eb3339cf56d19f1
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To check category bounds, rather use num_cat_user, to redirect all semantically
unknown categories to DLGLOBAL.
Adjust logging_test expectations accordingly: "(d)" is now also shown.
Note: subsys is and needs to be signed, while num_cat* are unsigned. Thus for a
negative subsys, 'subsys >= num_cat_user' practically always yields true. Pay
close attention to signedness and check upper bound only for positive values.
Change-Id: I4a952b759f30d90fbfb81fedcfc56a8092ea18c1
|
|
|
|
|
|
|
|
|
|
| |
In map_subsys(), fix the '>' condition to '>=' for array bounds checking.
Also make the bounds checking more strict: after both invocations of
subsys_lib2index(), re-check validity of the array index. If the final index is
still wrong, which should never happen, exit by assertion.
Change-Id: I7ca1a1d47724e40350f1c4dfebe90bad01c965f9
|
|
|
|
|
|
|
|
|
|
|
| |
For out-of-bounds logging categories, redirect to the proper DLGLOBAL array
index instead of returning -1.
Adjust test expectation which shows that the bugs tested for are fixed.
Note: there are separate bounds checking problems, left for another patch.
Change-Id: I6ea9a59e005a22e0305454291714fdb9531c346b
|
|
|
|
|
|
|
| |
Prepares for the unit test, which can now simply check for encode/decode
identity.
Change-Id: I410ff120d868e8d55df9cb19ba6eefd99749cdf0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the process, also:
* Change the license from AGPLv3 to GPLv2-or-later;
* correct spelling of 'sysmocom' to lowercase;
* add '2016' to the copyright;
* rename to osmo_*;
* add API docs;
* add logging category DLOAP: define id and add to internal_cat;
* redirect all oap.c logging to DLOAP.
A unit test will follow in a subsequent patch, since it needs a minor tweak for
decoding of boolean values.
The related openbsc change-id is I2f06aaa6eb54eafa860cfed8e72e41d82ff1c4cf.
Tweaked-by: Neels Hofmeyr
Change-Id: If5099e60681a215e798b6675f21813f26769c253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All DL* categories are typically negative, but DLGSUP isn't, and it's also not
in libosmocore's internal_cat array.
See: 3b6fb0880c3ab1e23a3d7d738d073b00c2a794c2
This means that a program using DLGSUP has to include DLGSUP in its own logging
cat array (typically not needed for DL* categories), which means for osmo-nitb
that DLGSUP (11) replaces DMGCP (also 11), and DMGCP becomes unusable.
Fix this: make DLGSUP -11 and include in internal_cat.
In gsup_test.c, no longer add DLGSUP to the logging categories array.
External follow-ups are otherwise needed only in osmo-hlr.git and some pending
patches for openbsc (Id3938267fa062e1a997d3704cd678874306f86ee).
Change-Id: Id974c7be158e4d60421a98110f5c807aefd31119
|
|
|
|
|
|
|
|
|
| |
Add missing doc string for the HOSTNAME arg.
Added in commit aa00f99be2e4cc64ede20d8c9548b83054696581, this breaks the VTY
tests for openbsc and hence breaks our jenkins build jobs.
Change-Id: I734b22c950242541322e902887bf779c14ba10fd
|
|
|
|
|
|
|
| |
This target wraps the to-be-logged string (With metadata) into a GSMTAP
packet and sends it to the configured destination address.
Change-Id: I9a7e72b8c9c6f6f2d76d1ea2332dcdee12394625
|