[OpenSIPS-Devel] [OpenSIPS/opensips] 031f1d: cfgutils: Fix check_time_rec() with BYXXX rules
Liviu Chircu
noreply at github.com
Tue Mar 23 10:12:32 EST 2021
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 031f1d6416b4d23bc44b4addc04af43f50791fa7
https://github.com/OpenSIPS/opensips/commit/031f1d6416b4d23bc44b4addc04af43f50791fa7
Author: Liviu Chircu <liviu at opensips.org>
Date: 2021-03-23 (Tue, 23 Mar 2021)
Changed paths:
M modules/cfgutils/test/cfgutils.c
M time_rec.c
Log Message:
-----------
cfgutils: Fix check_time_rec() with BYXXX rules
Most unit tests added in 4942bfca4d were incorrect as they were using an
invalid "19700000T000000" Date-Time (both month and day should be 01).
This patch fixes both the tests and the code to work as expected, while
also extending BYYEARDAY to support ascending daily intervals.
Additionally, the following logic is added:
* protection against invalid Year, Month, Day or Frequency specified
in the time recurrence string. Previously, this kind of bad input
would have passed undetected!
* auto-recovery for some invalid recurrences, e.g.:
- missing DTSTART (assume UNIX timestamp 0)
- missing DURATION, without a recursion rule (assume infinity)
- missing DURATION with a recursion rule. Here, the assumed
duration varies according to the recurring interval size
More information about the Devel
mailing list