diff options
author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-03 09:58:06 +0000 |
---|---|---|
committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-03 09:58:06 +0000 |
commit | c78202c579c9b7059e5eb81d1989f672fb24ac62 (patch) | |
tree | 63124b7512e950fe7203bd3e3eb5ae8833679687 /src/libs/zbxdbhigh/db.c | |
parent | 28a15437e99943fe4f87a3992342cf89714fa090 (diff) | |
download | zabbix-c78202c579c9b7059e5eb81d1989f672fb24ac62.tar.gz zabbix-c78202c579c9b7059e5eb81d1989f672fb24ac62.tar.xz zabbix-c78202c579c9b7059e5eb81d1989f672fb24ac62.zip |
- [DEV-42] Synchronisation of log files (Sasha)
[svn merge svn://svn.zabbix.com/branches/1.4 -r4821:4822]
git-svn-id: svn://svn.zabbix.com/trunk@4825 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxdbhigh/db.c')
-rw-r--r-- | src/libs/zbxdbhigh/db.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index b95f2936..e08943e3 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -1143,17 +1143,17 @@ lbl_exit: } -int DBadd_history_log(zbx_uint64_t itemid, char *value, int clock, int timestamp,char *source, int severity) +int DBadd_history_log(zbx_uint64_t id, zbx_uint64_t itemid, char *value, int clock, int timestamp,char *source, int severity) { char value_esc[MAX_STRING_LEN]; char source_esc[MAX_STRING_LEN]; - zbx_uint64_t id; zabbix_log(LOG_LEVEL_DEBUG,"In add_history_log()"); DBescape_string(value,value_esc,MAX_STRING_LEN); DBescape_string(source,source_esc,MAX_STRING_LEN); - id = DBget_maxid("history_log", "id"); + if(id == 0) + id = DBget_maxid("history_log", "id"); DBexecute("insert into history_log (id,clock,itemid,timestamp,value,source,severity) values (" ZBX_FS_UI64 ",%d," ZBX_FS_UI64 ",%d,'%s','%s',%d)", id, clock, |