author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 14 Sep 2008 15:28:34 +0000 (15:28 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 14 Sep 2008 15:28:34 +0000 (15:28 +0000) | ||
commit | dca41ee04eef1ecacf75350a5fcc64c7db463618 | |
tree | 89b7e670f78f0f05097cde78c37658592b86b1eb | tree | snapshot |
parent | a186ea0668474b9bc5bb982e523648d70d0778b1 | commit | diff |
The previous code was broken: The response was read using `read(2)'. If
the server wasn't sending fast enough, the client would stop reading
before the entire message had been read.
This patch changes the communication code to use the (line based)
`fgets' function rather than the lower level `read' function. After
reading the first line (which contains the total number of line to be
expected), this precise number of lines is read - blocking if necessary.
Also, the missing four new statistic values have been added to
`rrdc_stats_get'.
--Folorian Forester
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1506 a5681a0c-68f1-0310-ab6d-d61299d08faa
the server wasn't sending fast enough, the client would stop reading
before the entire message had been read.
This patch changes the communication code to use the (line based)
`fgets' function rather than the lower level `read' function. After
reading the first line (which contains the total number of line to be
expected), this precise number of lines is read - blocking if necessary.
Also, the missing four new statistic values have been added to
`rrdc_stats_get'.
--Folorian Forester
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1506 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_client.c | diff | blob | history |