summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ca8563)
raw | patch | inline | side by side (parent: 4ca8563)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 15 Mar 2010 08:43:22 +0000 (08:43 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 15 Mar 2010 08:43:22 +0000 (08:43 +0000) |
is provided is already in the count but does not get passed to rrd_last. Thanks to Robert Luberda (fixing Debian Bug #573638.)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@2030 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@2030 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_cgi.c | patch | blob | history |
diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c
index d9a0e9693cda0f3b08117951f1c507ac807130a0..22567024a7c538941041718cbd511b0a19407e36 100644 (file)
--- a/program/src/rrd_cgi.c
+++ b/program/src/rrd_cgi.c
if (buf == NULL) {
return stralloc("[ERROR: allocating strftime buffer]");
};
- last = rrd_last(argc + 1, (char **) args - 1);
+ /* not raising argc in step with args - 1 since the last argument
+ will be used below for strftime */
+
+ last = rrd_last(argc, (char **) args - 1);
if (rrd_test_error()) {
char *err =
malloc((strlen(rrd_get_error()) +
strftime(buf, 254, args[1], &tm_last);
return buf;
}
- if (argc < 2) {
- return stralloc("[ERROR: too few arguments for RRD::TIME::LAST]");
- }
- return stralloc("[ERROR: not enough arguments for RRD::TIME::LAST]");
+ return stralloc("[ERROR: expected <RRD::TIME::LAST file.rrd strftime-format>]");
}
char *printtimenow(