From 2262f9ba9db7d6a54c411488d7fd44a0755c7c0b Mon Sep 17 00:00:00 2001 From: hugetoad Date: Fri, 4 Feb 2005 15:25:39 +0000 Subject: Fix for handling user parameters. git-svn-id: svn://svn.zabbix.com/trunk@1650 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- src/zabbix_agent/sysinfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/zabbix_agent') diff --git a/src/zabbix_agent/sysinfo.c b/src/zabbix_agent/sysinfo.c index 32e339dc..6903fcdb 100644 --- a/src/zabbix_agent/sysinfo.c +++ b/src/zabbix_agent/sysinfo.c @@ -350,6 +350,7 @@ void process(char *command,char *value) int (*function)(); int (*function_str)(); char *parameter = NULL; + char *cmd_line_param = NULL; char key[MAX_STRING_LEN]; char param[1024]; char cmd[1024]; @@ -373,6 +374,7 @@ void process(char *command,char *value) break; } + cmd_line_param = NULL; strcpy(key, commands[i].key); if( (n = strstr(key,"[*]")) != NULL) @@ -405,6 +407,7 @@ void process(char *command,char *value) #ifdef TEST_PARAMETERS parameter=commands[i].parameter; #else + cmd_line_param = param; parameter=param; #endif break; @@ -445,7 +448,7 @@ void process(char *command,char *value) /* Special processing for EXECUTE_STR, it has more parameters */ if(function_str == EXECUTE_STR) { - i=function_str(command,commands[i].parameter,parameter,&res2); + i=function_str(command,commands[i].parameter,cmd_line_param,&res2); } else { -- cgit