Skip to content

Commit

Permalink
Fixed #831: Arithmetics counter fails if only one parameter is given
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Sep 3, 2013
1 parent d6388d2 commit 85ebf89
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/performance_counters/server/arithmetics_counter.cpp
Expand Up @@ -359,12 +359,24 @@ namespace hpx { namespace performance_counters { namespace detail
}
}

if (names.size() < 2)
if (paths.countername_ == "divide")
{
if (names.size() < 1)
{
HPX_THROWS_IF(ec, bad_parameter,
"arithmetics_counter_creator",
"the parameter specification for an arithmetic counter "
"has to expand to more than one counter name: " +
paths.parameters_);
return naming::invalid_gid;
}
}
else if (names.empty())
{
HPX_THROWS_IF(ec, bad_parameter,
"arithmetics_counter_creator",
"the parameter specification for an arithmetic counter "
"has to expand to more than one counter name: " +
"has to expand to at least one counter name: " +
paths.parameters_);
return naming::invalid_gid;
}
Expand Down

0 comments on commit 85ebf89

Please sign in to comment.