MCPcopy Create free account
hub / github.com/apache/trafficserver / RecordValidityCheck

Function RecordValidityCheck

src/records/RecUtils.cc:452–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450} // namespace
451
452bool
453RecordValidityCheck(const char *value, RecCheckT checkType, const char *pattern)
454{
455 switch (checkType) {
456 case RECC_STR:
457 if (recordRegexCheck(pattern, value)) {
458 return true;
459 }
460 break;
461 case RECC_INT:
462 if (recordRangeCheck(pattern, value)) {
463 return true;
464 }
465 break;
466 case RECC_IP:
467 if (recordIPCheck(pattern, value)) {
468 return true;
469 }
470 break;
471 case RECC_NULL:
472 // skip checking
473 return true;
474 default:
475 // unknown RecordCheckType...
476 ;
477 }
478
479 return false;
480}

Callers 2

SetRecordFromYAMLNodeFunction · 0.85
set_config_recordsFunction · 0.85

Calls 3

recordRegexCheckFunction · 0.85
recordRangeCheckFunction · 0.85
recordIPCheckFunction · 0.85

Tested by

no test coverage detected