collectd-mod-ipstatistics: fix handling of long `/proc` lines
[feed/packages.git] / utils / collectd / patches / 932-add-ipstatistics.patch
index e8dd6c5e0eb6eb6d1fcb8d63f7cba435dca39614..a51a1cb28a9fc514884a33e343859ead44569fc8 100644 (file)
@@ -41,7 +41,7 @@
 +
 +int ipstatistics_read() {
 +  FILE *fh;
-+  char buffer[1024];
++  char buffer[4096];
 +  char *fields[19];
 +  int numfields;
 +
@@ -56,7 +56,7 @@
 +    return -1;
 +  }
 +
-+  while (fgets(buffer, 1024, fh) != NULL) {
++  while (fgets(buffer, 4096, fh) != NULL) {
 +    numfields = strsplit(buffer, fields, 2);
 +
 +    if (numfields < 2)
@@ -80,7 +80,7 @@
 +  }
 +
 +  int count_ipext = 0;
-+  while (fgets(buffer, 1024, fh) != NULL) {
++  while (fgets(buffer, 4096, fh) != NULL) {
 +    numfields = strsplit(buffer, fields, 19);
 +
 +    if (numfields < 8)