summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxdbhigh/db.c
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-06 14:15:12 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-06 14:15:12 +0000
commit9711b46feca5338a3fdad0c0af75a16940507552 (patch)
treef444eb613277eca1ee5c0fa7c3d8938106316d78 /src/libs/zbxdbhigh/db.c
parent48abc572054dbefdb59d2b1524844d0b88cf99b3 (diff)
downloadzabbix-9711b46feca5338a3fdad0c0af75a16940507552.tar.gz
zabbix-9711b46feca5338a3fdad0c0af75a16940507552.tar.xz
zabbix-9711b46feca5338a3fdad0c0af75a16940507552.zip
- [DEV-109] Server changes
git-svn-id: svn://svn.zabbix.com/trunk@5329 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxdbhigh/db.c')
-rw-r--r--src/libs/zbxdbhigh/db.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c
index 4487d3b8..ed284cfb 100644
--- a/src/libs/zbxdbhigh/db.c
+++ b/src/libs/zbxdbhigh/db.c
@@ -38,6 +38,21 @@
#include "threads.h"
#include "dbcache.h"
+const char *DBnode(const char *fieldid, const int nodeid)
+{
+ static char dbnode[256];
+
+ if (nodeid == -1)
+ *dbnode = '\0';
+ else
+ zbx_snprintf(dbnode, sizeof(dbnode), " and %s between %d00000000000000 and %d99999999999999",
+ fieldid,
+ nodeid,
+ nodeid);
+
+ return dbnode;
+}
+
void DBclose(void)
{
zbx_db_close();