pdb group minor

This commit is contained in:
Michael Davidsaver
2017-09-14 15:41:17 -05:00
parent 2f9f760748
commit 44c8cd95e6

View File

@@ -149,9 +149,11 @@ struct PDBProcessor
const char *json = rec.info("Q:group");
if(!json) continue;
GroupConfig conf;
try {
GroupConfig conf;
GroupConfig::parse(json, conf);
if(!conf.warning.empty())
fprintf(stderr, "%s: warning(s) from info(Q:group, ...\n%s", rec.record()->name, conf.warning.c_str());
recbase = rec.record()->name;
recbase += ".";
@@ -162,6 +164,11 @@ struct PDBProcessor
const std::string& grpname = git->first;
const GroupConfig::Group& grp = git->second;
if(dbChannelTest(grpname.c_str())==0) {
fprintf(stderr, "%s : Group name conflicts with record name. Ignoring...\n", grpname.c_str());
continue;
}
groups_t::iterator it = groups.find(grpname);
if(it==groups.end()) {
// lazy creation of group