Don't store the relative expiry duration in the timer object. Only store
the absolute value. Pass the relative expiry for a new timer as a method
argument when inserting the timer into the tree instead.
No functional/behavioural changes.
Change-Id: I24817b0ac5801a5addf05bf9155fcb31017f2f68
Move some of the timer arming logic out of the wheeltimer and into the
timer class, so that more members can be made private. No functional
changes.
Change-Id: I4f2a10b0a3d9c775ec6cb903c2b82f4aa3219349
There is no reason we cannot directly insert new timers or remove
existing timers from the list of timers without having to delegate it to
the worker thread.
Change-Id: I2e615af83f64ac7e5024d7905432823044afe252
... instead of manually maintaining a linked list.
Store an iterator in the timer object so that it can be directly removed
if needed.
Change-Id: I38f1fbcdc6fe1b36a8adef6a95f36f8902a4f729
Move the timer resolution from a global define to an instance variable.
Use a default of the previous value. Switch all expiry values from
resolution-based to microseconds, and use 64-bit ints for all values.
Changes
timer::arm_absolute(u_int32_t wall_clock)
to
timer::arm()
Change-Id: I431220f378b4a9d2bd0f047d091ee5c8b3b72bfc
Don't use the `B2BgetHeaderReply()`, it's based on
last received positive reply (200OK), so quite useless
for provisional replies processing (18X).
Thus e.g. for 180 Ringing handling it will never
return anything, because it has no data to parse.
Instead cast event into B2BSipReplyEvent and
parse headers from there.
Change-Id: I4bc4ad5d3aebd7b9ea497bcd53f63736e89d61db
This makes it possible to retain the previously set absolute expiry
time. Update trans_timer to use this (the only relevant place).
Change-Id: I9765fbeddd2807406d2603b3c7fd9e8c9c09db68
Introduce `ILOG_DLG()` call-id logging based on `dlg`.
This commit only introduces a usage of it for
CallLeg and SBCCallLeg classes.
Later commits will spread this usage over all
AmB2BSession based classes.
Change-Id: I18ad8ba5129cb8912f401bb089ad82dbf9909a18
Compilation/installation guide introduced.
Usage guide added as a file only and placed
in docs hierarchy, but still not filled in.
Change-Id: Ia97d1d1595e21c2bc8d6c0fa3916e163868c38ce
From MySQL (mariadb) release notes:
"Incompatible Change: The my_bool type is no longer used in MySQL source code.
Any third-party code that used this type to represent C boolean variables
should use the bool or int C type instead.
The change from my_bool to bool means that the mysql.h header file
now requires a C++ or C99 compiler to compile. "
Fixes:
SW_Vsc.cpp: In member function ‘virtual void SW_VscDialog::onInvite(const AmSipRequest&)’:
SW_Vsc.cpp:913:5: error: ‘my_bool’ was not declared in this scope; did you mean ‘bool’?
913 | my_bool recon = 1;
| ^~~~~~~
| bool
SW_Vsc.cpp:981:57: error: ‘recon’ was not declared in this scope
981 | if (mysql_options(my_handler, MYSQL_OPT_RECONNECT, &recon) != 0)
| ^~~~~
make: *** [../../core/plug-in/Makefile.app_module:83: SW_Vsc.o] Error 1
Change-Id: I74bc973299223fd00236569e905a57882b055f1a
For the `AmThreadLocalStorage` its static `t` member
must be explicitely initialized outside of the template class.
Because it is a template class, it will only be instantiated
when used (when the data type is known), if no initialization
of the static member provided, then linker will fail to link
it (for other users like `RedisCheckpointWriter` which instantiates
`AmThreadLocalStorage` with `RedisConnection`).
Fixes:
ERROR: opening plugin '/usr/lib/sems-pbx/plug-in//redis_store.so':
/usr/lib/sems-pbx/plug-in//redis_store.so: undefined symbol: _ZN20AmThreadLocalStorageI15RedisConnectionE1tE
ERROR: while loading plug-in '/usr/lib/sems-pbx/plug-in//redis_store.so'
Change-Id: Iad3072c07fd04c5341838bb2a2c08858ca94b03a
Replace occurences of escaped CRLF used in
the hdrs value passed to the function.
This allows to pass multiple headers to the function,
whereas each header has `\r\n` at the end
(but the DSM script will always make it escaped,
hence the code must take care of it).
Change-Id: Ie76b44ff0f2d76105691aad6dbb5eb8d7dfb628a
This function replaces escaped `\r\n` occurences
into normal its view: `\r\n`.
Make this a function, to let it be reusable
for other DSM implementations.
Change-Id: Ica737df259fbf136b9a6855bc9439cbe005be6c1
Ignore SDP repeated in 183 and 200OK messages
in the late offer/answer, but only for the
`OA_OfferSent` OA state.
Change-Id: I136ad02182685d0158e2c7c4eee53833cd8e00f4
When OA generates own SDP body (e.g. case with
accepted invite in DSP), save it as established_body
for this leg, in order to be able to re-invite
this leg later.
It can happen there is still no SDP seen from the
callee side (other side), and in case we want to
send established re-invite towards this leg,
this will fail, since no SDP body seen yet.
Change-Id: Ifd9f0fb70d27deac871de4eed1648f7c152813f3
Move it to the dlg level, because of complex visibility.
In other words, when working on the dialog level and e.g.
generating new SDP body using `dlg.oa`, there is no way
to save it.
Moving it to the dlg level, gives a control over it on
the whole amount of inheritance levels plus dlg.
Change-Id: Iebb13e3e58f2558dc060e23270d99d690fa54572
Save last reply gotten and processed with
`DSMCallCalleeSession::onSipReply()`.
E.g. 18X are getting processed for DSM sessions there.
Change-Id: Ie0c44b1ddc8acd3fb07e01c6353eb2dce7a45a6e
Use std::condition_variable and std::mutex to implement AmCondition.
Only bools are used for conditions in the code, so make it not a
template.
Change-Id: I57d67492e29c220a5ce941ef67d142b34dcebbff
Re-implement AmMutex as a subclass of std::mutex. Provide copy and
assignment constructors so that it can be used as a member of another
class without preventing it from being copy/assignment constructed.
Change-Id: Id300a6501105a7871396c2be9380d6e0eae02cc7
Consider RecvonlyStream and None (sendrecv) hold types
as NonHold methods.
Fixes:
16: 52:44 CallLeg.cpp: In member function 'CallLeg::holdMethod CallLeg::updateHoldMethod(const AmSdp&)':
16: 52:44 CallLeg.cpp:1421:10: warning: enumeration value 'None' not handled in switch [-Wswitch]
16: 52:44 1421 | switch (hold_method)
16: 52:44 | ^
Change-Id: I2021dd7152ad258e03c28c56cb3b0c7a5e363266
C++20 deprecates implicit conversion of enumerations
during math operations like division.
Instead deprecate enum CPS_SAMPLERATE which is used
in a role of pre-proc definition and add a `const float`
value of which is defined by the constructor and is
unchangable.
Also don't use straight-forward (old style) cast with `(<type>)`
but use C++ designed type casts like a static cast, for the
rest of operands in the formula.
Change-Id: Idbfff86f4ec805f3f6db144f3aa041f8fe2c017a
Volatile increments/decrements are deprecated by C++20,
use a full operation instead.
Fixes:
18: 57:47 AmSession.cpp: In static member function 'static void AmSession::session_started()':
18: 57:47 AmSession.cpp:607:3: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
18: 57:47 607 | session_num++;
18: 57:47 | ^~~~~~~~~~~
18: 57:47 AmSession.cpp: In static member function 'static void AmSession::session_stopped()':
18: 57:47 AmSession.cpp:624:3: warning: '--' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
18: 57:47 624 | session_num--;
18: 57:47 | ^~~~~~~~~~~
Change-Id: I68ad2cee9396765b0df1ba5b583435c326154dde
Add a notice about GPL compatibility.
Add a notice and link to the original SEMS'es GH page
(the one which is dead mainly, less or more).
Change-Id: I72085edd1bb6f34b0a7f41d15a789726dabf0b63