osmo-msc/tests/db_sms
Vadim Yanitskiy 570b4c8be2 libmsc/db.c: get rid of hard-coded SMS expiry threshold
The initial idea of the SMS expiry threshold was to avoid storing
SMS messages with too long validity time (e.g. 63 weeks).
Unfortunately, neither this feature was properly documented, nor
the expiry threshold is configurable. Moreover, it has been
implemented in a wrong way, so instead of deleting the oldest
expired message, it would delete the youngest one or nothing:

  SELECT ... FROM SMS ORDER BY created LIMIT 1;

while it should be sorted by 'valid_until' in ascending order:

  SELECT .. FROM SMS ORDER BY valid_until LIMIT 1;

Thus, if the oldest message is expired, it gets deleted. If the
oldest message is not expired yet, there is nothing to delete.

Change-Id: I0ce6b1ab50986dc69a2be4ea62b6a24c7f3f8f0a
2019-06-07 08:05:24 +07:00
..
Makefile.am Introduce initial unit test for db_sms_* API 2019-06-03 17:28:35 +07:00
db_sms_test.c db_sms_test: Do not print exact memcmp result 2019-06-04 11:18:39 +02:00
db_sms_test.err db_sms_test: Remove libdbi expected driver load errors 2019-06-05 17:01:06 +00:00
db_sms_test.ok libmsc/db.c: get rid of hard-coded SMS expiry threshold 2019-06-07 08:05:24 +07:00