diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-06 16:54:39 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-06 16:54:39 +0000 |
| commit | 4cf7e13aaa8d02583f9feb2b1b3425f4193fc653 (patch) | |
| tree | 7971b08dbf0d084b4617d467743015f67d3ff722 /src/libs | |
| parent | 34fda3975b9f9117991c15ab225b1586c1e44d37 (diff) | |
Changes for Oracle support.
git-svn-id: svn://svn.zabbix.com/trunk@2805 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs')
| -rw-r--r-- | src/libs/zbxdbhigh/action.c | 2 | ||||
| -rw-r--r-- | src/libs/zbxdbhigh/db.c | 46 | ||||
| -rw-r--r-- | src/libs/zbxdbhigh/graph.c | 7 | ||||
| -rw-r--r-- | src/libs/zbxdbhigh/host.c | 10 | ||||
| -rw-r--r-- | src/libs/zbxdbhigh/item.c | 6 | ||||
| -rw-r--r-- | src/libs/zbxdbhigh/trigger.c | 6 |
6 files changed, 41 insertions, 36 deletions
diff --git a/src/libs/zbxdbhigh/action.c b/src/libs/zbxdbhigh/action.c index 98d1bec8..0b523103 100644 --- a/src/libs/zbxdbhigh/action.c +++ b/src/libs/zbxdbhigh/action.c @@ -62,7 +62,7 @@ int DBadd_action(int triggerid, int userid, int delay, char *subject, char *mess int DBget_action_by_actionid(int actionid,DB_ACTION *action) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index 1af93b79..87f0e26b 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -234,7 +234,7 @@ DB_RESULT DBselect(char *query) /* * Get value for given row and field. Must be called after DBselect. */ -char *DBget_field(DB_RESULT *result, int rownum, int fieldnum) +char *DBget_field(DB_RESULT result, int rownum, int fieldnum) { #ifdef HAVE_MYSQL MYSQL_ROW row; @@ -317,7 +317,7 @@ long DBaffected_rows() /* * Get number of selected records. */ -int DBnum_rows(DB_RESULT *result) +int DBnum_rows(DB_RESULT result) { #ifdef HAVE_MYSQL int rows; @@ -356,7 +356,7 @@ int DBnum_rows(DB_RESULT *result) */ int DBget_function_result(double *result,char *functionid) { - DB_RESULT *dbresult; + DB_RESULT dbresult; int res = SUCCEED; char sql[MAX_STRING_LEN]; @@ -392,7 +392,7 @@ int DBget_prev_trigger_value(int triggerid) int clock; int value; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_prev_trigger_value[%d]", triggerid); @@ -447,7 +447,7 @@ static int latest_alarm(int triggerid, int status) { char sql[MAX_STRING_LEN]; int clock; - DB_RESULT *result; + DB_RESULT result; int ret = FAIL; @@ -490,7 +490,7 @@ int latest_service_alarm(int serviceid, int status) { char sql[MAX_STRING_LEN]; int clock; - DB_RESULT *result; + DB_RESULT result; int ret = FAIL; @@ -677,7 +677,7 @@ void update_triggers_status_to_unknown(int hostid,int clock,char *reason) int i; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; DB_TRIGGER trigger; zabbix_log(LOG_LEVEL_DEBUG,"In update_triggers_status_to_unknown()"); @@ -714,7 +714,7 @@ void DBdelete_services_by_triggerid(int triggerid) { int i, serviceid; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBdelete_services_by_triggerid(%d)", triggerid); snprintf(sql,sizeof(sql)-1,"select serviceid from services where triggerid=%d", triggerid); @@ -755,7 +755,7 @@ void DBdelete_triggers_by_itemid(int itemid) { int i, triggerid; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBdelete_triggers_by_itemid(%d)", itemid); snprintf(sql,sizeof(sql)-1,"select triggerid from functions where itemid=%d", itemid); @@ -804,7 +804,7 @@ void DBdelete_sysmaps_hosts_by_hostid(int hostid) { int i, shostid; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBdelete_sysmaps_hosts(%d)", hostid); snprintf(sql,sizeof(sql)-1,"select shostid from sysmaps_hosts where hostid=%d", hostid); @@ -838,8 +838,8 @@ void DBupdate_triggers_status_after_restart(void) int lastchange; int now; - DB_RESULT *result; - DB_RESULT *result2; + DB_RESULT result; + DB_RESULT result2; DB_TRIGGER trigger; zabbix_log(LOG_LEVEL_DEBUG,"In DBupdate_triggers_after_restart()"); @@ -879,7 +879,7 @@ void DBupdate_triggers_status_after_restart(void) void DBupdate_host_availability(int hostid,int available,int clock, char *error) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; char error_esc[MAX_STRING_LEN]; int disable_until; @@ -983,7 +983,7 @@ int DBupdate_item_status_to_notsupported(int itemid, char *error) int DBadd_trend(int itemid, double value, int clock) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int hour; int num; @@ -1085,7 +1085,7 @@ int DBget_items_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_items_count()"); @@ -1112,7 +1112,7 @@ int DBget_triggers_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_triggers_count()"); @@ -1139,7 +1139,7 @@ int DBget_items_unsupported_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_items_unsupported_count()"); @@ -1166,7 +1166,7 @@ int DBget_history_str_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_history_str_count()"); @@ -1193,7 +1193,7 @@ int DBget_history_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_history_count()"); @@ -1220,7 +1220,7 @@ int DBget_trends_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_trends_count()"); @@ -1247,7 +1247,7 @@ int DBget_queue_count(void) { int res; char sql[MAX_STRING_LEN]; - DB_RESULT *result; + DB_RESULT result; int now; zabbix_log(LOG_LEVEL_DEBUG,"In DBget_queue_count()"); @@ -1374,7 +1374,7 @@ void DBescape_string(char *from, char *to, int maxlen) to[ptr]=0; } -void DBget_item_from_db(DB_ITEM *item,DB_RESULT *result, int row) +void DBget_item_from_db(DB_ITEM *item,DB_RESULT result, int row) { char *s; int i; @@ -1461,7 +1461,7 @@ void DBget_item_from_db(DB_ITEM *item,DB_RESULT *result, int row) int DBget_default_escalation_id() { - DB_RESULT *dbresult; + DB_RESULT dbresult; int res = SUCCEED; char sql[MAX_STRING_LEN]; diff --git a/src/libs/zbxdbhigh/graph.c b/src/libs/zbxdbhigh/graph.c index e43590bb..a494a05b 100644 --- a/src/libs/zbxdbhigh/graph.c +++ b/src/libs/zbxdbhigh/graph.c @@ -79,7 +79,7 @@ int DBadd_item_to_graph(int graphid,int itemid, char *color,int drawtype, int so int DBget_graph_item_by_gitemid(int gitemid, DB_GRAPH_ITEM *graph_item) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; @@ -109,7 +109,7 @@ int DBget_graph_item_by_gitemid(int gitemid, DB_GRAPH_ITEM *graph_item) int DBget_graph_by_graphid(int graphid, DB_GRAPH *graph) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; @@ -144,7 +144,8 @@ int DBadd_graph_item_to_linked_hosts(int gitemid,int hostid) DB_ITEM item; DB_GRAPH_ITEM graph_item; DB_GRAPH graph; - DB_RESULT *result,*result2; + DB_RESULT result; + DB_RESULT result2; char sql[MAX_STRING_LEN]; char name_esc[GRAPH_NAME_LEN_MAX]; int i,j; diff --git a/src/libs/zbxdbhigh/host.c b/src/libs/zbxdbhigh/host.c index 8a7630a2..2c9fc2b5 100644 --- a/src/libs/zbxdbhigh/host.c +++ b/src/libs/zbxdbhigh/host.c @@ -52,7 +52,7 @@ int DBadd_host(char *server, int port, int status, int useip, char *ip, int disa int DBhost_exists(char *server) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; @@ -70,7 +70,7 @@ int DBhost_exists(char *server) int DBadd_templates_to_host(int hostid,int host_templateid) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int i; @@ -103,7 +103,7 @@ int DBadd_template_linkage(int hostid,int templateid,int items,int triggers,int int DBsync_host_with_templates(int hostid) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int i; @@ -125,7 +125,7 @@ int DBsync_host_with_templates(int hostid) int DBsync_host_with_template(int hostid,int templateid,int items,int triggers,int graphs) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int i; @@ -172,7 +172,7 @@ int DBsync_host_with_template(int hostid,int templateid,int items,int triggers,i int DBget_host_by_hostid(int hostid,DB_HOST *host) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; diff --git a/src/libs/zbxdbhigh/item.c b/src/libs/zbxdbhigh/item.c index bfcf49f4..580f3224 100644 --- a/src/libs/zbxdbhigh/item.c +++ b/src/libs/zbxdbhigh/item.c @@ -31,7 +31,7 @@ int DBget_item_by_itemid(int itemid,DB_ITEM *item) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; @@ -59,7 +59,9 @@ int DBget_item_by_itemid(int itemid,DB_ITEM *item) int DBadd_item_to_linked_hosts(int itemid, int hostid) { DB_ITEM item; - DB_RESULT *result,*result2,*result3; + DB_RESULT result; + DB_RESULT result2; + DB_RESULT result3; char sql[MAX_STRING_LEN]; int i; diff --git a/src/libs/zbxdbhigh/trigger.c b/src/libs/zbxdbhigh/trigger.c index cc08bafb..907c23f1 100644 --- a/src/libs/zbxdbhigh/trigger.c +++ b/src/libs/zbxdbhigh/trigger.c @@ -32,7 +32,9 @@ int DBadd_trigger_to_linked_hosts(int triggerid,int hostid) { DB_TRIGGER trigger; - DB_RESULT *result,*result2,*result3; + DB_RESULT result; + DB_RESULT result2; + DB_RESULT result3; char sql[MAX_STRING_LEN]; char old[MAX_STRING_LEN]; char new[MAX_STRING_LEN]; @@ -169,7 +171,7 @@ int DBadd_trigger_to_linked_hosts(int triggerid,int hostid) ----------------------------------------------------------------------------*/ int DBget_trigger_by_triggerid(int triggerid,DB_TRIGGER *trigger) { - DB_RESULT *result; + DB_RESULT result; char sql[MAX_STRING_LEN]; int ret = SUCCEED; |
