Cedar: Add support for 32 bit unsigned integer Proto options

This commit also fixes a bug which caused the server to initialize all boolean options to false.

It was caused by SiLoadProtoCfg() not checking whether the item exists in the configuration file.

CfgGetBool() always returns false if the item doesn't exist.
This commit is contained in:
Davide Beatrici committed 2021-04-21 08:12:45 +02:00
1 parent 6a25ccfa28
commit 4b05de1a93
5 files changed
+44 -7

No files matched your search

+3
View File
@@ -278,6 +278,9 @@ PROTO_CONTAINER *ProtoContainerNew(const PROTO_IMPL *impl)
case PROTO_OPTION_BOOL:
option->Bool = impl_option->Bool;
break;
case PROTO_OPTION_UINT32:
option->UInt32 = impl_option->UInt32;
break;
case PROTO_OPTION_STRING:
option->String = impl_option->String != NULL ? CopyStr(impl_option->String) : impl->OptionStringValue(option->Name);
break;