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

Method check

src/common/isc_sync.cpp:567–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565
566
567bool MemoryHeader::check(const char* name, USHORT type, USHORT version, bool raiseError) const
568{
569 if (mhb_type == type && mhb_header_version == HEADER_VERSION && mhb_version == version)
570 return true;
571
572 if (!raiseError)
573 return false;
574
575 string found, expected;
576
577 found.printf("%d/%d:%d", mhb_type, mhb_header_version, mhb_version);
578 expected.printf("%d/%d:%d", type, HEADER_VERSION, version);
579
580 // @1: inconsistent shared memory type/version; found @2, expected @3
581 (Arg::Gds(isc_wrong_shmem_ver) <<
582 Arg::Str(name) << Arg::Str(found) << Arg::Str(expected)).raise();
583}
584
585int SharedMemoryBase::eventInit(event_t* event)
586{

Callers 2

getAndParseMethod · 0.45
checkHeaderMethod · 0.45

Calls 4

GdsClass · 0.85
StrClass · 0.85
printfMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected