Skip to content
Snippets Groups Projects

Missing ScopeLock in SCPIPs.

Merged Karol Krizka requested to merge kk_scopelock into devel
1 file
+ 2
4
Compare changes
  • Side-by-side
  • Inline
+ 2
4
@@ -106,11 +106,10 @@ void SCPIPs::send(const std::string& cmd, unsigned channel) {
std::to_string(channel));
}
m_com->lock();
ScopeLock lock(m_com);
if (m_maxChannels != 1) m_com->send("INST:NSEL " + std::to_string(channel));
send(cmd);
m_com->unlock();
}
std::string SCPIPs::sendreceive(const std::string& cmd) {
@@ -124,10 +123,9 @@ std::string SCPIPs::sendreceive(const std::string& cmd, unsigned channel) {
std::to_string(channel));
}
m_com->lock();
ScopeLock lock(m_com);
if (m_maxChannels != 1) m_com->send("INST:NSEL " + std::to_string(channel));
std::string ret = sendreceive(cmd);
m_com->unlock();
return ret;
}
Loading