Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Levijev <vladimir.levijev@zabbix.com>2016-01-18 17:42:50 +0300
committerVladimir Levijev <vladimir.levijev@zabbix.com>2016-01-18 17:42:50 +0300
commit058abd3a0e3b57bfc5a57bd115b2e5a85935cf16 (patch)
tree5d42a02d1be8ba51de394ed7715c3ea1fcd58a54 /include/module.h
parent9a653370af797762ced5a9965386f02e2093e2e0 (diff)
...GI..PS. [ZBX-10102] add support for log file meta information update for items with value type other than log (disregard r57741)
By accident, commit r57741 that claims adding this functionality does nothing. Please consider this commit.
Diffstat (limited to 'include/module.h')
-rw-r--r--include/module.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/include/module.h b/include/module.h
index e0117840ee9..f0c5ecd21fc 100644
--- a/include/module.h
+++ b/include/module.h
@@ -60,38 +60,36 @@ typedef struct
{
char *value;
char *source;
- zbx_uint64_t lastlogsize;
int timestamp;
int severity;
int logeventid;
- int mtime;
- unsigned char meta; /* meta information update (log size and mtime) */
}
zbx_log_t;
+/* agent result types */
+#define AR_UINT64 0x01
+#define AR_DOUBLE 0x02
+#define AR_STRING 0x04
+#define AR_TEXT 0x08
+#define AR_LOG 0x10
+#define AR_MESSAGE 0x20
+#define AR_META 0x40
+
/* agent return structure */
typedef struct
{
- int type;
+ zbx_uint64_t lastlogsize; /* meta information */
zbx_uint64_t ui64;
double dbl;
char *str;
char *text;
- char *msg;
-
- /* null-terminated list of pointers */
- zbx_log_t **logs;
+ char *msg; /* possible error message */
+ zbx_log_t *log;
+ int type; /* flags: see AR_* above */
+ int mtime; /* meta information */
}
AGENT_RESULT;
-/* agent result types */
-#define AR_UINT64 0x01
-#define AR_DOUBLE 0x02
-#define AR_STRING 0x04
-#define AR_TEXT 0x08
-#define AR_LOG 0x10
-#define AR_MESSAGE 0x20
-
/* SET RESULT */
#define SET_UI64_RESULT(res, val) \
@@ -124,7 +122,7 @@ AGENT_RESULT;
#define SET_LOG_RESULT(res, val) \
( \
(res)->type |= AR_LOG, \
- (res)->logs = (zbx_log_t **)(val) \
+ (res)->log = (zbx_log_t *)(val) \
)
/* NOTE: always allocate new memory for val! DON'T USE STATIC OR STACK MEMORY!!! */