Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Proposal fix for large "MaxPacketSize" use. #24

Closed
wants to merge 1 commit into from

2 participants

Feraudet Cyril Florian Forster
Feraudet Cyril

When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.

Cyril Feraudet Proposal fix for large "MaxPacketSize" use.
When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.
a8ee9cc
Feraudet Cyril

In addition, to pass huge notification message, I've updated NOTIF_MAX_MSG_LEN to 64k.

Florian Forster
Owner
octo commented

Hi Cyril,

thank you very much for finding and fixing this issue!

I've rebased this to the collectd-4.10 branch and submitted as 12213f8.

Best regards,
—octo

Florian Forster octo closed this
Mark Wong mwongatemma referenced this pull request from a commit in mwongatemma/collectd
Florian Forster df plugin: Fix a compiler issue with Mac OS X 10.7.
Xcode Version 4.1 (11C74), GitHub issue #24

Change-Id: Ic6f49a95868c7f77bfb19f9c8afc87a97a1bf670
ead8b24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 19, 2012
Cyril Feraudet Proposal fix for large "MaxPacketSize" use.
When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.
a8ee9cc
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  src/network.c
2  src/network.c
@@ -2735,7 +2735,7 @@ static int network_write (const data_set_t *ds, const value_list_t *vl,
2735 2735 ERROR ("network plugin: Unable to append to the "
2736 2736 "buffer for some weird reason");
2737 2737 }
2738   - else if ((network_config_packet_size - send_buffer_fill) < 15)
  2738 + else if (send_buffer_fill >= 1452 - 15)
2739 2739 {
2740 2740 flush_buffer ();
2741 2741 }

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.