summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f38e0a7)
raw | patch | inline | side by side (parent: f38e0a7)
author | Tim Laszlo <Tim.Laszlo@magnetar.com> | |
Tue, 29 Jul 2014 13:11:30 +0000 (08:11 -0500) | ||
committer | Tim Laszlo <Tim.Laszlo@magnetar.com> | |
Tue, 29 Jul 2014 13:11:30 +0000 (08:11 -0500) |
src/drbd.c | patch | blob | history |
diff --git a/src/drbd.c b/src/drbd.c
index 2c80ca2f6fe92b4ef0181c8c12bbf550fce8841d..f4105579efa5321aca7f226abb69b8871aa826dc 100644 (file)
--- a/src/drbd.c
+++ b/src/drbd.c
fields_num = strsplit (buffer,
fields, STATIC_ARRAY_SIZE (fields));
- /* ignore headers */
+ /* ignore headers (first two iterations) */
if (fields_num < 4)
continue;
if (isdigit(fields[0][0]))
{
- /* parse the resource line */
+ /* parse the resource line, next loop iteration
+ will submit values for this resource */
resource = strtol(fields[0], NULL, 10);
}
else
{
- /* handle stats data */
+ /* handle stats data for the resource defined in the
+ previous iteration */
drbd_submit_fields(resource, fields, fields_num);
}
} /* while (fgets) */