summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 37ec8f7)
raw | patch | inline | side by side (parent: 37ec8f7)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 23 Nov 2011 16:54:17 +0000 (16:54 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 23 Nov 2011 16:54:17 +0000 (16:54 +0000) |
program/src/rrd_rpncalc.c | patch | blob | history | |
program/src/rrd_rpncalc.h | patch | blob | history |
index 25f528414f62217b356f3dc66319d06eef48d6c4..7a9a2d12d141f4f3ab2bd0d25f5885641e26e73b 100644 (file)
while (rpnp[*count].op != OP_END)
(*count)++;
if (++(*count) > DS_CDEF_MAX_RPN_NODES) {
- rrd_set_error("Maximum %d RPN nodes permitted",
- DS_CDEF_MAX_RPN_NODES);
+ rrd_set_error("Maximum %d RPN nodes permitted. Got %d RPN nodes at present.",
+ DS_CDEF_MAX_RPN_NODES-1,(*count)-1);
return -1;
}
* occur too often. */
for (i = 0; rpnp[i].op != OP_END; i++) {
if (rpnp[i].op == OP_TIME || rpnp[i].op == OP_LTIME ||
- rpnp[i].op == OP_PREV || rpnp[i].op == OP_COUNT) {
+ rpnp[i].op == OP_PREV || rpnp[i].op == OP_COUNT ||
+ rpnp[i].op == OP_TREND || rpnp[i].op == OP_TRENDNAN ||
+ rpnp[i].op == OP_PREDICT || rpnp[i].op == OP_PREDICTSIGMA ) {
rrd_set_error
- ("operators time, ltime, prev and count not supported with DS COMPUTE");
+ ("operators TIME, LTIME, PREV COUNT TREND TRENDNAN PREDICT PREDICTSIGMA are not supported with DS COMPUTE");
free(rpnp);
return;
}
index d104b8e8774839702f89a6cbab6ef86c6a36a99b..1ddf2af1f93fec025b4598dc200686b6627a32cd 100644 (file)
#define DEF_NAM_FMT "%255[-_A-Za-z0-9]"
/* limit imposed by sizeof(rpn_cdefs_t) and rrd.ds_def.par */
-#define DS_CDEF_MAX_RPN_NODES 26
+#define DS_CDEF_MAX_RPN_NODES (int)(sizeof(unival)*10 / sizeof(rpn_cdefds_t))
typedef struct rpnstack_t {
double *s;