Skip to content

Commit

Permalink
Revert "Zabbix vPoller module: The 'vpoller.echo' method echoes the s…
Browse files Browse the repository at this point in the history
…econd"

This reverts commit d772a54.
  • Loading branch information
dnaeon committed Feb 17, 2015
1 parent c85b755 commit f61e12a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions extra/zabbix/vpoller-module/vpoller.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,25 +333,22 @@ zbx_module_vpoller(AGENT_REQUEST *request, AGENT_RESULT *result)
* zbx_module_vpoller_echo()
*
* Purpose:
* Will echo back the second parameter you provide to it
* First parameter should be a key that uniquely identifies an item
* in Zabbix, e.g. as returned by a LLD discovery rule.
* Will echo back the first parameter you provide to it
*
* Return value:
* The second value it was called with
* The value it was invoked with
*/
int
zbx_module_vpoller_echo(AGENT_REQUEST *request, AGENT_RESULT *result)
{
const char *param;

if (request->nparam != 2) {
if (request->nparam != 1) {
SET_MSG_RESULT(result, strdup("Invalid number of key parameters"));
return (SYSINFO_RET_FAIL);
}

key = get_rparam(request, 0);
param = get_rparam(request, 1)
param = get_rparam(request, 0);

SET_STR_RESULT(result, strdup(param));

Expand Down

0 comments on commit f61e12a

Please sign in to comment.