Skip to content
Snippets Groups Projects

Handle invalid channel replies

Merged Cyril Danilevski requested to merge invalid_channels into main
2 files
+ 12
2
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
0
@@ -142,6 +142,11 @@ bool MPOD::message(const SNMP::Message *message) {
// that far.
const char *channel = strrchr(varbind->getName(), '.') + 1;
_channel = atoi(channel);
// MPOD SNMP channel 0 does not exist (starts from 1; U0 is 1).
// Mark the channel as 0 if invalid data was received.
// This can be used later to validate a sent request.
_channel = found ? _channel : 0;
}
// Return true if nodes found, that means this is a valid response from MPOD
return found;
Loading