Skip to content

Commit

Permalink
fix dbLoadGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Nov 3, 2022
1 parent 5c75fd7 commit db5af06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions iocBoot/iocimagedemo/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ dbLoadRecords("image.db","N=TST:image1")
dbLoadRecords("table.db","N=TST:table1")
dbLoadRecords("ntenum.db","P=TST:enum1")

dbLoadGroup("image.json")

iocInit()
2 changes: 1 addition & 1 deletion pdbApp/pdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ struct PDBProcessor

#ifdef USE_MULTILOCK
try {
GroupConfig::parse(json, "", conf);
GroupConfig::parse(json, NULL, conf);
if(!conf.warning.empty())
fprintf(stderr, "warning(s) from dbGroup file \"%s\"\n%s", it->c_str(), conf.warning.c_str());
}catch(std::exception& e){
Expand Down
6 changes: 5 additions & 1 deletion pdbApp/pvif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,23 @@ namespace pva = epics::pvAccess;

DBCH::DBCH(dbChannel *ch) :chan(ch)
{
if(!chan)
throw std::invalid_argument("NULL channel");
prepare();
}

DBCH::DBCH(const std::string& name)
:chan(dbChannelCreate(name.c_str()))
{
if(!chan)
throw std::invalid_argument(SB()<<"invalid channel: "<<name);
prepare();
}

void DBCH::prepare()
{
if(!chan)
throw std::invalid_argument("NULL channel");
throw std::invalid_argument(SB()<<"NULL channel");
if(dbChannelOpen(chan)) {
dbChannelDelete(chan);
throw std::invalid_argument(SB()<<"Failed to open channel "<<dbChannelName(chan));
Expand Down

0 comments on commit db5af06

Please sign in to comment.