|
@@ -71,49 +71,42 @@ static void LoadLocalEndpoints()
|
|
|
WIN_LOCAL_ENDPOINTS_CONFIG_3;
|
|
WIN_LOCAL_ENDPOINTS_CONFIG_3;
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
- try
|
|
|
|
|
|
|
+ if (!reader.parse(LOCAL_ENDPOINTS_CONFIG, value))
|
|
|
{
|
|
{
|
|
|
- if (!reader.parse(LOCAL_ENDPOINTS_CONFIG, value))
|
|
|
|
|
- {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- auto regions = value["regions"];
|
|
|
|
|
- for (const auto ®ion : regions)
|
|
|
|
|
- {
|
|
|
|
|
- allRegions.push_back(region.asString());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- auto products = value["products"];
|
|
|
|
|
- for (const auto &product : products)
|
|
|
|
|
- {
|
|
|
|
|
- allProductsInLocalEndpoints.push_back(product.asString());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ auto regions = value["regions"];
|
|
|
|
|
+ for (const auto ®ion : regions)
|
|
|
|
|
+ {
|
|
|
|
|
+ allRegions.push_back(region.asString());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- auto endpoints = value["endpoints"];
|
|
|
|
|
- for (auto &product : allProductsInLocalEndpoints)
|
|
|
|
|
- {
|
|
|
|
|
- auto endpoint_per_product = endpoints[product];
|
|
|
|
|
- productInfoType p;
|
|
|
|
|
-
|
|
|
|
|
- auto regions = endpoint_per_product["regions"];
|
|
|
|
|
- auto regional = endpoint_per_product["regional"];
|
|
|
|
|
-
|
|
|
|
|
- for (auto &r : regions)
|
|
|
|
|
- {
|
|
|
|
|
- const std::string region = r.asString();
|
|
|
|
|
- p.regions.push_back(region);
|
|
|
|
|
- p.regional[region] =
|
|
|
|
|
- endpoint_per_product["regional"][region].asString();
|
|
|
|
|
- }
|
|
|
|
|
- allLocalEndpoints[product] = p;
|
|
|
|
|
- }
|
|
|
|
|
- local_endpoints_loaded = true;
|
|
|
|
|
|
|
+ auto products = value["products"];
|
|
|
|
|
+ for (const auto &product : products)
|
|
|
|
|
+ {
|
|
|
|
|
+ allProductsInLocalEndpoints.push_back(product.asString());
|
|
|
}
|
|
}
|
|
|
- catch (JSONCPP_STRING errs)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ auto endpoints = value["endpoints"];
|
|
|
|
|
+ for (auto &product : allProductsInLocalEndpoints)
|
|
|
{
|
|
{
|
|
|
- return;
|
|
|
|
|
|
|
+ auto endpoint_per_product = endpoints[product];
|
|
|
|
|
+ productInfoType p;
|
|
|
|
|
+
|
|
|
|
|
+ auto regions = endpoint_per_product["regions"];
|
|
|
|
|
+ auto regional = endpoint_per_product["regional"];
|
|
|
|
|
+
|
|
|
|
|
+ for (auto &r : regions)
|
|
|
|
|
+ {
|
|
|
|
|
+ const std::string region = r.asString();
|
|
|
|
|
+ p.regions.push_back(region);
|
|
|
|
|
+ p.regional[region] =
|
|
|
|
|
+ endpoint_per_product["regional"][region].asString();
|
|
|
|
|
+ }
|
|
|
|
|
+ allLocalEndpoints[product] = p;
|
|
|
}
|
|
}
|
|
|
|
|
+ local_endpoints_loaded = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
} // namespace
|