X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fredis%2Fasyncdatabasediscovery.cpp;fp=src%2Fredis%2Fasyncdatabasediscovery.cpp;h=b57955e049c60fc28ac8d37166c2c118d72095c5;hb=5bdca62d89d430f607310370fe1391bd1d1bd21a;hp=526757ed817372b695946777e6823edbf0962f5d;hpb=b4e17e19a35bf714f5ae6c1c041e951ed9de10d4;p=ric-plt%2Fsdl.git diff --git a/src/redis/asyncdatabasediscovery.cpp b/src/redis/asyncdatabasediscovery.cpp index 526757e..b57955e 100644 --- a/src/redis/asyncdatabasediscovery.cpp +++ b/src/redis/asyncdatabasediscovery.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2018-2019 Nokia. + Copyright (c) 2018-2022 Nokia. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -62,11 +62,13 @@ std::shared_ptr AsyncDatabaseDiscovery::create(std::shar staticDbType == DatabaseConfiguration::DbType::SDL_SENTINEL_CLUSTER) { auto sentinelAddress(staticDatabaseConfiguration.getSentinelAddress(addressIndex)); + auto sentinelMasterName(staticDatabaseConfiguration.getSentinelMasterName(addressIndex)); + if (sentinelAddress) return std::make_shared(engine, logger, *sentinelAddress, - staticDatabaseConfiguration.getSentinelMasterName()); + sentinelMasterName); else SHAREDDATALAYER_ABORT("Sentinel address not configured."); }