mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 01:09:24 -04:00
- 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]
This commit is contained in:
parent
f43839424b
commit
7d9c6e0534
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=150163
6 changed files with 154 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
75
net-mgmt/cacti-spine/files/patch-fix-4.x
Normal file
75
net-mgmt/cacti-spine/files/patch-fix-4.x
Normal file
|
@ -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++) {
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
75
net/cactid/files/patch-fix-4.x
Normal file
75
net/cactid/files/patch-fix-4.x
Normal file
|
@ -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++) {
|
Loading…
Add table
Reference in a new issue