This is relevant for records coming from Redis, as the insertion into
the trash and backup tables is done from the strings kept in memory.
Change-Id: I1398f7bfc0d4a0c2da8b8104dc4589ea9d983da7
(cherry picked from commit 6e957e69b7)
(cherry picked from commit d9dd8eebdf)
With the increased length of src/dst_leg strings, we must also increase
the buffer size for the insert string.
Did I mention that we should really move to dynamic strings here...
Change-Id: I0e77155d36f434055e36124d37bf699179f887b1
(cherry picked from commit 1b29fd3705)
(cherry picked from commit 3422246b02)
Avoids truncated strings from Kamailio. This length is in line with what
we have in mr8.5+.
Change-Id: I3ea02012c674fb595dfa1071c81039ca7e8df25a
(cherry picked from commit 1c80b74f60)
medredis_fetch_records() allocates memory for 0 return records, which in
the calling code is understood as "no memory has been allocated",
leading to a slow leak. Returning early is correct as the mem block
pointer is set to NULL in this case.
Change-Id: I69a2d397edd15cb9e4033531a218658c7ca93b12
(cherry picked from commit 96e59f70f5)
The db_redis module also writes simulated non-unique keys for acc
records, so we must use handle them appropriately when deleting the
keys, because otherwise we get leftover entries.
Change-Id: Ic080dc5d4520ac548a726440d0b677028bfb6be3
(cherry picked from commit 7618456ec7)
(cherry picked from commit 0d7ccc8141)
The DB schema allows for certain columns to be NULL. Handle this
appropriately to elminiate failed assertions from g_strlcpy.
Change-Id: I8768847b96b169dfad94b2ca448cc2af5058d38b
We must distinguish between old-style acc records without an appended
branch ID (key ends in `:<ts>`) and broken new-stype acc records with an
empty branch ID (key ends in `:<ts>:`). Failure to do so results in
leftover entries in the DB that are never trashed and repeatedly
processed.
Change-Id: I61a4086359369e460cf23cacfd53854605a6a955
The mediator is doing nothing when maintenance mode is enabled,
it has been implemented in TT#16753 but later after migration to
systemd and after migration to unit 'type=notify' we forget to send READY=1.
Fixing it here, as it cause 90 seconds delay on ngcpcfg apply on
active node if maintenance mode is enabled.
Change-Id: I66c3dc13506f7069ec60c56edcbe875b4a9912e4
(cherry picked from commit aa7536b359)
* callid that is used in sql statements is now escaped,
for scenarios where there are calls with quotes in callids
Change-Id: I3061a73fe944ec911e84031a1cff40043b7e174c
(cherry picked from commit 024994e45e)
(cherry picked from commit 7c10e8db61)
* type=id values are pre-fetched from cdr_tag_data on init
* 3 new data columns are stored in cdr_tag_data
furnished_charing_info,
header=P-Asserted-Identity
header=Diversion
Change-Id: I228743beb05cc09cc28d7df8dedc90dd3cdbcfed
Make sure every function that calls medredis_init() properly returns an
error if the connection fails, as it frees the connection struct and
sets the pointer to NULL when it does.
Also eliminate the `con` global variable being passed to functions. This
eliminates a scope collision (global `con` vs local `con`) and also
makes sure all functions always see an up-to-date pointer and won't use
a possibly stale local copy of the pointer.
Change-Id: I63561c49923cc30d97fce9f69c8135cc023626bd
Is service B "Requires" service A to be started before B
and B does NOT require B restart on A restart, B should use "Wants=A".
Also using real service name mariadb.service instead of alias one.
The same for redis-server.service.
Also migrate from alias mysql.service to mariadb.service.
Change-Id: I94276a8647053646abd545e4d5b768b284b8a652
Since recently (see below), this service depends on redis-server but it didn't
declare it as dependency in its systemd unit file, so the service will not wait
for Redis, on which it depends on, and will fail to start properly.
commit 2812d161a5
Date: Mon Feb 26 16:09:35 2018 +0100
(Catched by tests of the task in the first line).
Change-Id: I599c8c2fa8ac4e2c7428bb787889f3c9f00185e2
* Fetch acc records both from mysql and redis
* Backup/trash redis acc records into mysql
* Introduce loglevel config option and log macros
Change-Id: I9bc55ed72502feaff03550c99ce481aea33e5e58