summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f34b8c9)
raw | patch | inline | side by side (parent: f34b8c9)
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/trunk@2030 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@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 f6313f869dc0cc725e39e9107283a275571b8a8b..1fabe705a5a8d46d4fef7e64cd44b3b9a96d8165 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(