diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-02-04 15:25:39 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-02-04 15:25:39 +0000 |
commit | 2262f9ba9db7d6a54c411488d7fd44a0755c7c0b (patch) | |
tree | 28e0dbc672e9683024f6d8bd741de03bb1ef0cc4 /src/zabbix_agent | |
parent | b3d63c610dc6857f2cd6ebb73a5775601dbfac70 (diff) | |
download | zabbix-2262f9ba9db7d6a54c411488d7fd44a0755c7c0b.tar.gz zabbix-2262f9ba9db7d6a54c411488d7fd44a0755c7c0b.tar.xz zabbix-2262f9ba9db7d6a54c411488d7fd44a0755c7c0b.zip |
Fix for handling user parameters.
git-svn-id: svn://svn.zabbix.com/trunk@1650 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_agent')
-rw-r--r-- | src/zabbix_agent/sysinfo.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |