summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6923454)
raw | patch | inline | side by side (parent: 6923454)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 16 Dec 2006 16:10:58 +0000 (16:10 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 16 Dec 2006 16:10:58 +0000 (16:10 +0000) |
program/src/rrd_not_thread_safe.c | patch | blob | history |
index 7022277064639a2ed84a3df707e462957dbfd5b5..7b6a25658edd2206c8106bf0e64904a511cf2194 100644 (file)
static char rrd_error[MAXLEN+10];
static char rrd_liberror[ERRBUFLEN+10];
+static int rrd_context_init = 0;
/* The global context is very useful in the transition period to even
more thread-safe stuff, it can be used whereever we need a context
and do not need to worry about concurrency. */
/* #include <stdarg.h> */
struct rrd_context *rrd_get_context(void) {
+ if (! rrd_context_init ){
+ rrd_context_init = 1;
+ global_ctx.rrd_error[0]='\0';
+ global_ctx.lib_errstr[0]='\0';
+ }
return &global_ctx;
}