summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9e69ac)
raw | patch | inline | side by side (parent: a9e69ac)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 4 May 2006 20:41:51 +0000 (20:41 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 4 May 2006 20:41:51 +0000 (20:41 +0000) |
plus some other small cleanups in this context
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@815 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@815 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/Makefile.am | patch | blob | history | |
src/rrd_error.c | patch | blob | history | |
src/rrd_restore.c | patch | blob | history | |
src/rrd_rpncalc.c | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index dedab624cc30969268008113f11f8b341c41038e..d6b3122dd879d5e143e721772787cc3689b5f7d8 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
librrd_th_la_SOURCES = $(RRD_C_FILES) rrd_thread_safe.c
librrd_th_la_CFLAGS = $(MULTITHREAD_CFLAGS)
-librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info 2:1:0
+librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info 2:7:0
include_HEADERS = rrd.h
diff --git a/src/rrd_error.c b/src/rrd_error.c
index df675a2fbe278a636f6c3f48823d7f9289437f58..ced26b5bac6bd5dc73b6ba84b65fdee547aa84b7 100644 (file)
--- a/src/rrd_error.c
+++ b/src/rrd_error.c
if (rrd_ctx) {
rrd_ctx->len = 0;
- rrd_ctx->rrd_error = malloc(MAXLEN);
- rrd_ctx->lib_errstr = malloc(ERRBUFLEN);
+ rrd_ctx->rrd_error = malloc(MAXLEN+10);
+ rrd_ctx->lib_errstr = malloc(ERRBUFLEN+10);
if (rrd_ctx->rrd_error && rrd_ctx->lib_errstr) {
*rrd_ctx->rrd_error = 0;
*rrd_ctx->lib_errstr = 0;
diff --git a/src/rrd_restore.c b/src/rrd_restore.c
index 51def7e465e2c16736c66310ae271c4f78d7aa63..29a97b3bf67260a946bd9ac9e950b11ebf9cd458 100644 (file)
--- a/src/rrd_restore.c
+++ b/src/rrd_restore.c
read_tag(&ptr2,"max","%lf",&(rrd->ds_def[rrd->stat_head->ds_cnt-1].par[DS_max_val].u_val));
} else { /* DST_CDEF */
char buffer[1024];
- read_tag(&ptr2,"cdef","%s",buffer);
+ read_tag(&ptr2,"cdef","%1000s",buffer);
parseCDEF_DS(buffer,rrd,rrd -> stat_head -> ds_cnt - 1);
+ if (rrd_test_error()) return -1;
}
read_tag(&ptr2,"last_ds","%30s",rrd->pdp_prep[rrd->stat_head->ds_cnt-1].last_ds);
diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c
index 6a903f53974987233c2139775d4611925e9597e0..3c6510f913d1a81418b07e6e8119b5c896b2b6b3 100644 (file)
--- a/src/rrd_rpncalc.c
+++ b/src/rrd_rpncalc.c
rpnp = rpn_parse((void*) rrd, def, &lookup_DS);
if (rpnp == NULL) {
- rrd_set_error("failed to parse computed data source %s", def);
+ rrd_set_error("failed to parse computed data source");
return;
}
/* Check for OP nodes not permitted in COMPUTE DS.