Commit e9f4e722 authored by jan.koester's avatar jan.koester
Browse files

test

parent cc8cb098
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -86,6 +86,26 @@ webedit::Config::Config(const std::string &path) : confplus::Config(path) {
    // Parse AUTHDB sources (parallel arrays, same pattern as blogi server)
    try {
        auto *urlKey = getKey("/WEBEDIT/AUTHDB/URL");
        if (!urlKey) {
            std::cerr << "AUTHDB: key /WEBEDIT/AUTHDB/URL not found, dumping config tree:" << std::endl;
            for (auto *node = first(); node; node = node->next()) {
                std::cerr << "  /" << node->getKey();
                if (node->childs()) {
                    for (auto *c = node->getChild(); c; c = c->next()) {
                        std::cerr << std::endl << "    /" << node->getKey() << "/" << c->getKey();
                        if (c->childs()) {
                            for (auto *cc = c->getChild(); cc; cc = cc->next()) {
                                std::cerr << std::endl << "      /" << node->getKey() << "/" << c->getKey() << "/" << cc->getKey()
                                          << " [" << cc->getElements() << " elements]";
                            }
                        } else {
                            std::cerr << " [" << c->getElements() << " elements]";
                        }
                    }
                }
                std::cerr << std::endl;
            }
        }
        auto *nameKey = getKey("/WEBEDIT/AUTHDB/CLIENTNAME");
        auto *secretKey = getKey("/WEBEDIT/AUTHDB/CLIENTSECRET");
        size_t count = getElements(urlKey);