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

Method write

src/jrd/trace/TraceConfigStorage.cpp:930–947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928}
929
930void ConfigStorage::Writer::write(ITEM tag, ULONG len, const void* data)
931{
932 if (m_mem + 1 > m_end)
933 (Arg::Gds(isc_random) << Arg::Str("Item data not fits into memory")).raise();
934
935 *m_mem++ = tag;
936 if (tag == tagEnd)
937 return;
938
939 if (m_mem + sizeof(len) + len > m_end)
940 (Arg::Gds(isc_random) << Arg::Str("Item data not fits into memory")).raise();
941
942 memcpy(m_mem, &len, sizeof(len));
943 m_mem += sizeof(len);
944
945 memcpy(m_mem, data, len);
946 m_mem += len;
947}
948
949const void* ConfigStorage::Reader::read(ITEM& tag, ULONG& len)
950{

Callers 1

addSessionMethod · 0.45

Calls 3

GdsClass · 0.85
StrClass · 0.85
raiseMethod · 0.45

Tested by

no test coverage detected