summaryrefslogtreecommitdiffstats
path: root/net/cactid
diff options
context:
space:
mode:
authorclement <clement@FreeBSD.org>2005-12-01 19:03:07 +0000
committerclement <clement@FreeBSD.org>2005-12-01 19:03:07 +0000
commitc20269eedfad05ad57f34ece78d133eef88e8032 (patch)
tree9c4d193f6df8dbaf05ef4777aa113847420bd950 /net/cactid
parentf700823839de333cedc709b0f5317ed4223d3bec (diff)
downloadFreeBSD-ports-c20269eedfad05ad57f34ece78d133eef88e8032.zip
FreeBSD-ports-c20269eedfad05ad57f34ece78d133eef88e8032.tar.gz
- 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/cactid')
-rw-r--r--net/cactid/Makefile2
-rw-r--r--net/cactid/distinfo1
-rw-r--r--net/cactid/files/patch-fix-4.x75
3 files changed, 77 insertions, 1 deletions
diff --git a/net/cactid/Makefile b/net/cactid/Makefile
index a67b4ef..76aef98 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 316273f..18db9b4 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 0000000..faec401
--- /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++) {
OpenPOWER on IntegriCloud