MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / validateHeader

Function validateHeader

src/remote/server/ReplServer.cpp:579–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577 }
578
579 bool validateHeader(const SegmentHeader* header)
580 {
581 if (strcmp(header->hdr_signature, CHANGELOG_SIGNATURE))
582 return false;
583
584 if (header->hdr_version != CHANGELOG_CURRENT_VERSION)
585 return false;
586
587 if (header->hdr_state != SEGMENT_STATE_FREE &&
588 header->hdr_state != SEGMENT_STATE_USED &&
589 header->hdr_state != SEGMENT_STATE_FULL &&
590 header->hdr_state != SEGMENT_STATE_ARCH)
591 {
592 return false;
593 }
594
595 return true;
596 }
597
598 enum ActionType { REPLICATE, REPLAY, FAST_FORWARD };
599

Callers 1

process_archiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected