summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxsysinfo/common/system.c
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-27 14:53:50 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-27 14:53:50 +0000
commit6428289e52e3d49d04f46440334becdb4dd50eb7 (patch)
tree76c5bd74e671b0951fac6850cebbd67da6866e6c /src/libs/zbxsysinfo/common/system.c
parentbf1417f0196f1ada1616e1e53e04a55117dc06d4 (diff)
downloadzabbix-6428289e52e3d49d04f46440334becdb4dd50eb7.tar.gz
zabbix-6428289e52e3d49d04f46440334becdb4dd50eb7.tar.xz
zabbix-6428289e52e3d49d04f46440334becdb4dd50eb7.zip
- developed new interface for test functions. Result returns with srtuct. (Eugene)
- recreated process() function. (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2227 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxsysinfo/common/system.c')
-rw-r--r--src/libs/zbxsysinfo/common/system.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/zbxsysinfo/common/system.c b/src/libs/zbxsysinfo/common/system.c
index dc821f1f..552fbee6 100644
--- a/src/libs/zbxsysinfo/common/system.c
+++ b/src/libs/zbxsysinfo/common/system.c
@@ -19,16 +19,19 @@
#include "config.h"
-#include <time.h>
-
#include "common.h"
#include "sysinfo.h"
-int SYSTEM_LOCALTIME(const char *cmd, const char *parameter,double *value, const char *msg, int mlen_max)
+int SYSTEM_LOCALTIME(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
{
int ret = SYSINFO_RET_OK;
- *value=(double)time(NULL);
+ assert(result);
+
+ memset(result, 0, sizeof(AGENT_RESULT));
+
+ result->type |= AR_DOUBLE;
+ result->dbl = (double)time(NULL);
return ret;
}