MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / check_min_unit

Function check_min_unit

time_rec.c:1411–1448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1409
1410
1411int check_min_unit(tmrec_p _trp, ac_tm_p _atp)
1412{
1413 int min_itv;
1414 struct tm end;
1415
1416 min_itv = get_min_interval(_trp);
1417 LM_DEV("min_itv: %d\n", min_itv);
1418
1419 switch (min_itv) {
1420 case FREQ_DAILY:
1421 if (_trp->duration >= SEC_DAILY)
1422 return REC_MATCH;
1423 break;
1424
1425 case FREQ_WEEKLY:
1426 if (_trp->duration >= SEC_WEEKLY)
1427 return REC_MATCH;
1428 break;
1429
1430 case FREQ_MONTHLY:
1431 if (_trp->duration >= SEC_MONTHLY_MAX)
1432 return REC_MATCH;
1433 break;
1434
1435 case FREQ_YEARLY:
1436 if (_trp->duration >= SEC_YEARLY_MAX)
1437 return REC_MATCH;
1438 break;
1439
1440 default:
1441 return REC_NOMATCH;
1442 }
1443
1444 LM_DEV("check recur...\n");
1445
1446 localtime_r(&_trp->dtend, &end);
1447 return check_recur_itv(&_atp->t, &_trp->ts, &end, _trp->duration, min_itv);
1448}
1449
1450int check_byxxx(tmrec_p _trp, ac_tm_p _atp)
1451{

Callers 1

check_tmrecFunction · 0.85

Calls 2

get_min_intervalFunction · 0.85
check_recur_itvFunction · 0.85

Tested by

no test coverage detected