diff options
author | clement <clement@FreeBSD.org> | 2005-12-02 03:03:07 +0800 |
---|---|---|
committer | clement <clement@FreeBSD.org> | 2005-12-02 03:03:07 +0800 |
commit | c20269eedfad05ad57f34ece78d133eef88e8032 (patch) | |
tree | 9c4d193f6df8dbaf05ef4777aa113847420bd950 /net | |
parent | f700823839de333cedc709b0f5317ed4223d3bec (diff) | |
download | freebsd-ports-gnome-c20269eedfad05ad57f34ece78d133eef88e8032.tar.gz freebsd-ports-gnome-c20269eedfad05ad57f34ece78d133eef88e8032.tar.zst freebsd-ports-gnome-c20269eedfad05ad57f34ece78d133eef88e8032.zip |
- Fix build on 4.x [1]
- Fix fetch [2]
PR: ports/89798 [2]
Submitted by: many, Dmitry Simakov <basilio@j-vista.ru> [1],
Andrew Pantyukhin [2]
Diffstat (limited to 'net')
-rw-r--r-- | net/cactid/Makefile | 2 | ||||
-rw-r--r-- | net/cactid/distinfo | 1 | ||||
-rw-r--r-- | net/cactid/files/patch-fix-4.x | 75 |
3 files changed, 77 insertions, 1 deletions
diff --git a/net/cactid/Makefile b/net/cactid/Makefile index a67b4efcd3c3..76aef98db697 100644 --- a/net/cactid/Makefile +++ b/net/cactid/Makefile @@ -10,7 +10,7 @@ PORTVERSION= 0.8.6.f PORTREVISION= 2 CATEGORIES= net MASTER_SITES= http://www.cacti.net/downloads/cactid/ -DISTNAME= cacti-${PORTNAME}-0.8.6f-${PORTREVISION} +DISTNAME= cacti-${PORTNAME}-0.8.6f-1 MAINTAINER= clement@FreeBSD.org COMMENT= A multithreaded poller for Cacti written in C diff --git a/net/cactid/distinfo b/net/cactid/distinfo index 316273fd4101..18db9b49944f 100644 --- a/net/cactid/distinfo +++ b/net/cactid/distinfo @@ -1,2 +1,3 @@ MD5 (cacti-cactid-0.8.6f-1.tar.gz) = 95fe2d67c630dca9fe64a27c6ab2aff1 +SHA256 (cacti-cactid-0.8.6f-1.tar.gz) = 5ecc9c5d605b7daa18380fdc3ff951e42dd0652db4c5f1718c7607dfd0310e61 SIZE (cacti-cactid-0.8.6f-1.tar.gz) = 136217 diff --git a/net/cactid/files/patch-fix-4.x b/net/cactid/files/patch-fix-4.x new file mode 100644 index 000000000000..faec4010d4d9 --- /dev/null +++ b/net/cactid/files/patch-fix-4.x @@ -0,0 +1,75 @@ +--- poller.c.orig Wed Oct 12 03:13:48 2005 ++++ poller.c Thu Nov 10 11:30:49 2005 +@@ -455,9 +455,9 @@ + (strcmp(last_snmp_password, poller_items[i].snmp_password) != 0)) { + + if (num_oids > 0) { ++ int j; + snmp_get_multi(host, snmp_oids, num_oids); + +- int j; + for (j = 0; j < num_oids; j++) { + if (host->ignore_host) { + snprintf(logmessage, LOGSIZE-1, "Host[%i] DS[%i] WARNING: SNMP timeout detected [%i ms], ignoring host '%s'\n", host_id, poller_items[snmp_oids[j].array_position].local_data_id, host->snmp_timeout, host->hostname); +@@ -500,9 +500,9 @@ + } + + if (num_oids > set.max_get_size) { ++ int j; + snmp_get_multi(host, snmp_oids, num_oids); + +- int j; + for (j = 0; j < num_oids; j++) { + if (host->ignore_host) { + snprintf(logmessage, LOGSIZE-1, "Host[%i] DS[%i] WARNING: SNMP timeout detected [%i ms], ignoring host '%s'\n", host_id, poller_items[snmp_oids[j].array_position].local_data_id, host->snmp_timeout, host->hostname); +@@ -617,9 +617,9 @@ + + /* process last bulk request if applicable */ + if (num_oids > 0) { ++ int j; + snmp_get_multi(host, snmp_oids, num_oids); + +- int j; + for (j = 0; j < num_oids; j++) { + if (host->ignore_host) { + snprintf(logmessage, LOGSIZE-1, "Host[%i] DS[%i] WARNING: SNMP timeout detected [%i ms], ignoring host '%s'\n", host_id, poller_items[snmp_oids[j].array_position].local_data_id, host->snmp_timeout, host->hostname); +@@ -648,9 +648,12 @@ + } + } + ++ { + /* format database insert */ + int buffer; + char result_string[BUFSIZE]; ++ char delim = ' '; ++ + buffer = 600*rows_processed+100; + + if (!(query3 = (char *)malloc(buffer))) { +@@ -662,12 +665,12 @@ + snprintf(query3, buffer-1, "INSERT INTO poller_output (local_data_id,rrd_name,time,output) VALUES"); + + i=0; +- char delim = ' '; + while (i < rows_processed) { + snprintf(result_string, sizeof(result_string)-1, "%c(%i,'%s','%s','%s')", delim, poller_items[i].local_data_id, poller_items[i].rrd_name, start_datetime, poller_items[i].result); + strncat(query3, result_string, strlen(result_string)); + delim = ','; + i++; ++ } + } + + /* only perform and insert if there is something to insert */ +--- snmp.c.orig Wed Oct 12 03:13:48 2005 ++++ snmp.c Thu Nov 10 11:25:26 2005 +@@ -306,9 +306,9 @@ + } + }else { + if (response->errindex != 0) { ++ int count; + /* removed errored OID and then retry */ + snprintf(snmp_oids[response->errindex].result, sizeof(snmp_oids[response->errindex].result)-1, "U"); +- int count; + for (count = 1, vars = response->variables; + vars && count != response->errindex; + vars = vars->next_variable, count++) { |