0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 16:52:44 +01:00

construct: Add header/library version startup checks.

This commit is contained in:
Jason Volk 2019-04-23 01:30:52 -07:00
parent 28f677eef2
commit ccb2d86cdc

View file

@ -224,6 +224,31 @@ bool
startup_checks() startup_checks()
try try
{ {
if(RB_VERSION != ircd::info::version)
ircd::log::warning
{
"Header version '%s' mismatch library '%s'",
RB_VERSION,
ircd::info::version,
};
if(RB_VERSION_TAG != ircd::info::tag)
ircd::log::warning
{
"Header version tag '%s' mismatch library '%s'",
RB_VERSION_TAG,
ircd::info::tag,
};
if(RB_DATECODE > ircd::info::configured_time || RB_DATECODE < ircd::info::configured_time)
ircd::log::warning
{
"Header configuration time:%ld %s than library configuration time:%ld.",
RB_VERSION_TAG,
RB_DATECODE > ircd::info::configured_time? "newer" : "older",
ircd::info::tag,
};
return true; return true;
} }
catch(const std::exception &e) catch(const std::exception &e)