summaryrefslogtreecommitdiff
path: root/net-mgmt/cacti-spine
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2005-12-01 19:03:07 +0000
committerClement Laforet <clement@FreeBSD.org>2005-12-01 19:03:07 +0000
commit7d9c6e053485f27b686f8a53f5dd5ee174b86ccb (patch)
treed1665bd6b4ae8a643bc215c9856e72cd67fd51fd /net-mgmt/cacti-spine
parentUpdate to 0.04 (diff)
- 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]
Notes
Notes: svn path=/head/; revision=150163
Diffstat (limited to 'net-mgmt/cacti-spine')
-rw-r--r--net-mgmt/cacti-spine/Makefile2
-rw-r--r--net-mgmt/cacti-spine/distinfo1
-rw-r--r--net-mgmt/cacti-spine/files/patch-fix-4.x75
3 files changed, 77 insertions, 1 deletions
diff --git a/net-mgmt/cacti-spine/Makefile b/net-mgmt/cacti-spine/Makefile
index a67b4efcd3c3..76aef98db697 100644
--- a/net-mgmt/cacti-spine/Makefile
+++ b/net-mgmt/cacti-spine/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-mgmt/cacti-spine/distinfo b/net-mgmt/cacti-spine/distinfo
index 316273fd4101..18db9b49944f 100644
--- a/net-mgmt/cacti-spine/distinfo
+++ b/net-mgmt/cacti-spine/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-mgmt/cacti-spine/files/patch-fix-4.x b/net-mgmt/cacti-spine/files/patch-fix-4.x
new file mode 100644
index 000000000000..faec4010d4d9
--- /dev/null
+++ b/net-mgmt/cacti-spine/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++) {