The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit e0fe76e4 authored by Alessio Netti's avatar Alessio Netti
Browse files

dcdbpusher: fixes to SNMPConnection entity

- Fixed a memory leak when inspecting error messages
- Relaxed class methods to enable inheritance
parent 8f750bae
......@@ -105,8 +105,8 @@ void SNMPConnection::execOnInit() {
snmp_error(&_snmpSession, &liberr, &syserr, &errstr);
if (liberr || syserr) {
LOG(error) << "SNMP: Error initializing session: " + std::string(errstr);
free(errstr);
}
free(errstr);
_snmpSession.version = _version;
_snmpSession.peername = strdup(_name.c_str());
......@@ -177,7 +177,7 @@ bool SNMPConnection::open() {
free(errstr);
return false;
}
free(errstr);
return true;
}
......
......@@ -155,12 +155,12 @@ class SNMPConnection : public EntityInterface {
}
long int getVersion() const { return _version; }
void printEntityConfig(LOG_LEVEL ll, unsigned int leadingSpaces) final override;
void printEntityConfig(LOG_LEVEL ll, unsigned int leadingSpaces) override;
/**
* Initializes the connection. Must be called once before the connection can be used
*/
void execOnInit() final override;
void execOnInit() override;
/**
* Open SNMP Session. Must be called once before issuing a get() call.
......@@ -182,7 +182,7 @@ class SNMPConnection : public EntityInterface {
*/
int64_t get(const oid *const OID, size_t OIDLen);
private:
protected:
std::string _snmpCommunity;
std::string _oidPrefix;
std::string _username;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment