Skip to content

Commit

Permalink
Correct the handling of the --unix option
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Apr 3, 2015
1 parent 94c6601 commit f7c20c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/pcp-cpp/pmda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ class pmda {
* \c false.
*
* @throw pcp::exception On error.
* @throw boost::program_options::error On parse error.
*/
virtual bool parse_command_line(const int argc, const char * const argv[],
pmdaInterface& interface)
Expand All @@ -464,6 +465,7 @@ class pmda {
* \c false.
*
* @throw pcp::exception On error.
* @throw boost::program_options::error On parse error.
*/
virtual bool parse_command_line(const int argc, const char * const argv[],
pmdaInterface& interface,
Expand Down Expand Up @@ -575,7 +577,7 @@ class pmda {
if (options.count("unix") > 0) {
interface.version.two.ext->e_io = pmdaUnix;
free_on_destruction.push(interface.version.two.ext->e_sockname =
strdup(options.at("pipe").as<std::string>().c_str()));
strdup(options.at("unix").as<std::string>().c_str()));
}
if (options.count("inet6") > 0) {
// The pmdaIPv6 value was added to PCP in version 3.8.1. There is
Expand Down

0 comments on commit f7c20c5

Please sign in to comment.