diff options
Diffstat (limited to 'cmds/incident_helper/IncidentHelper.cpp')
-rw-r--r-- | cmds/incident_helper/IncidentHelper.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/cmds/incident_helper/IncidentHelper.cpp b/cmds/incident_helper/IncidentHelper.cpp index fba5e662b7c1..787d3a1557d6 100644 --- a/cmds/incident_helper/IncidentHelper.cpp +++ b/cmds/incident_helper/IncidentHelper.cpp @@ -61,6 +61,21 @@ SetTableField(::google::protobuf::Message* message, string field_name, string fi } // ================================================================================ +status_t NoopParser::Parse(const int in, const int out) const +{ + string content; + if (!ReadFdToString(in, &content)) { + fprintf(stderr, "[%s]Failed to read data from incidentd\n", this->name.string()); + return -1; + } + if (!WriteStringToFd(content, out)) { + fprintf(stderr, "[%s]Failed to write data to incidentd\n", this->name.string()); + return -1; + } + return NO_ERROR; +} + +// ================================================================================ status_t ReverseParser::Parse(const int in, const int out) const { string content; @@ -189,4 +204,4 @@ status_t ProcrankParser::Parse(const int in, const int out) const { } fprintf(stderr, "[%s]Proto size: %d bytes\n", this->name.string(), proto.ByteSize()); return NO_ERROR; -}
\ No newline at end of file +} |