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

Method checkValues

src/common/config/config.cpp:360–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360void Config::checkValues()
361{
362 checkIntForLoBound(KEY_TEMP_CACHE_LIMIT, 0, true);
363
364 checkIntForLoBound(KEY_TCP_REMOTE_BUFFER_SIZE, 1448, false);
365 checkIntForHiBound(KEY_TCP_REMOTE_BUFFER_SIZE, MAX_SSHORT, false);
366
367 checkIntForLoBound(KEY_DEFAULT_DB_CACHE_PAGES, 0, true);
368
369 checkIntForLoBound(KEY_LOCK_MEM_SIZE, 256 * 1024, false);
370
371 const char* strVal = values[KEY_GC_POLICY].strVal;
372 if (strVal)
373 {
374 NoCaseString gcPolicy(strVal);
375 if (gcPolicy != GCPolicyCooperative &&
376 gcPolicy != GCPolicyBackground &&
377 gcPolicy != GCPolicyCombined)
378 {
379 // user-provided value is invalid - fail to default
380 values[KEY_GC_POLICY] = defaults[KEY_GC_POLICY];
381 }
382 }
383
384 strVal = values[KEY_WIRE_CRYPT].strVal;
385 if (strVal)
386 {
387 NoCaseString wireCrypt(strVal);
388 if (wireCrypt != "DISABLED" && wireCrypt != "ENABLED" && wireCrypt != "REQUIRED")
389 {
390 // user-provided value is invalid - fail to default
391 values[KEY_WIRE_CRYPT] = defaults[KEY_WIRE_CRYPT];
392 }
393 }
394
395 strVal = values[KEY_SERVER_MODE].strVal;
396 if (strVal && !fb_utils::bootBuild())
397 {
398 bool found = false;
399 NoCaseString mode(strVal);
400 for (int x = 0; x < 6; ++x)
401 {
402 if (mode == txtServerModes[x])
403 {
404 serverMode = x / 2;
405 found = true;
406 break;
407 }
408 }
409
410 if (!found)
411 values[KEY_SERVER_MODE] = defaults[KEY_SERVER_MODE];
412 }
413
414 checkIntForLoBound(KEY_FILESYSTEM_CACHE_THRESHOLD, 0, true);
415
416 checkIntForLoBound(KEY_MAX_IDENTIFIER_BYTE_LENGTH, 1, true);
417 checkIntForHiBound(KEY_MAX_IDENTIFIER_BYTE_LENGTH, MAX_SQL_IDENTIFIER_LEN, true);

Callers

nothing calls this directly

Calls 1

bootBuildFunction · 0.85

Tested by

no test coverage detected