use snprintf, strdup, ... where possible to make for safer operation -- Martin Pelikan git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2299 a5681a0c-68f1-0310-ab6d-d61299d08faa
openbsd does not know EPROTO it seems git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2298 a5681a0c-68f1-0310-ab6d-d61299d08faa
properly handle the case where RRDCACHED_ADDRESS is an empty string git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2220 a5681a0c-68f1-0310-ab6d-d61299d08faa
handling of ENV_RRDCACHED_ADDRESS: added missing brackets after if, backported fix from trunk to 1.4 while doing it -- patch by x @ zamyteam.org git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2199 a5681a0c-68f1-0310-ab6d-d61299d08faa
bring spaceing around graph back in line with 1.2 goodness ... in connection with no-legend and no title git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2179 a5681a0c-68f1-0310-ab6d-d61299d08faa
The buffer length for command buffers should be controlled by a single #define. Renamed CMD_MAX to RRD_CMD_MAX and put into rrd_client.h so that it is available to clients as well. -- kevin brintnall git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2156 a5681a0c-68f1-0310-ab6d-d61299d08faa
free addrinfo list after use ... -- Christian Magnusson git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2138 a5681a0c-68f1-0310-ab6d-d61299d08faa
Ensure that response_read() always calls fflush() or fclose(). This fixes defect #278 (unknown commands from Solaris client). -- kevin brintnall git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2135 a5681a0c-68f1-0310-ab6d-d61299d08faa
Summary of changes: 1. Add INFO <filename>, FIRST <filename> <index>, LAST <filename> and CREATE <rrdfile> [-b start][-s step][-O] <DSdefs> <RRAdefs> to the rrdcached functions. 2. Add rrd_create_set_no_overwrite as a function in rrd_create.c to allow the overwrite flag to be set from rrd_daemon.c 3. Add rrdc_info, rrdc_first, rrdc_last, rrdc_create functions in rrd_client.c 4. Add rrdcached support to rrd_info(), rrd_first(), rrd_last() and rrd_create() 5. Add --noflush (-F) option to rrd_info(), rrd_last() to prevent cache flushing before function call if required for efficiency 6. Add --daemon option to rrd_info(), rrd_first() for rrdcached support 7. Add buffer_add_ulong function to rrd_client.c (used by new rrdc_* functions) 8. Add rrd_clear_error() call to rrd_create_r () to clean up bug if create called more than once 9. Add -O option to rrdcached to force no-overwrite mode in CREATE function 10. All relevant documentation updated -- Steve Shipway steve steveshipway.org git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2130 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_client.c: Fix a potential segmentation fault in "get_path". The "get_path" function is called at least from "rrdc_update" without checking for a connection first. In that case the "sd_path" pointer may be NULL, so dereferencing it without checking for NULL is not good behavior. This patch checks all arguments of the "get_path" function and returns an error if any pointer is NULL. -- Florian Forster git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2094 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd_client.c: gcc 4.0.1 produced a warning and require same types. Warning shown was: "assignement discards qualifers from pointer target type" -- Antoine MUSSO git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2084 a5681a0c-68f1-0310-ab6d-d61299d08faa
[rrd_client.c] RRD client should resolve all paths when talking to a unix socket. This allows realpath() to resolve symbolic links, "..", etc. reported by: Eduardo Bragatto -- kevin brintnall git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2083 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd_client.c: explicitly close the connection on error in response_read. I've found it to get stuck otherwise. -- Thorsten von Eicken git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2075 a5681a0c-68f1-0310-ab6d-d61299d08faa
Relicense the RRDCacheD client interface under the MIT license. This allows the interface to be used from non-GPL applications by copying the source code files into the projects source tree. -- Florian Forster rrdtool@octo.it git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2070 a5681a0c-68f1-0310-ab6d-d61299d08faa
Add a "FETCH" command to RRDCacheD which behaves like a (simplified version of) rrdfetch(1). This has advantages over calling "FLUSH" from within the "client", especially if the daemon is accessed using a network socket. For one, it makes it easy to separate collecting and storing of data on one side and creating graphs on another, possibly more public server. Without this command this is only possible using networked file systems and similar techniques. When talking to an instance of RRDCacheD via a network socket, only relative pathnames are allowed. If the RRD file is to be accessed afterwards (why else would one call "FLUSH"?), the client has to be in a specific directory so the *same* relative path can be used. If the file is on a share mounted via the network, the required CWD may differ from the CWD of the server, making developing and deploying solutions using separated storing and graphing unnecessarily hard. The data can be accessed using "rrdc_fetch" which should be a drop-in replacement for "rrd_fetch_r". This makes it easy for programs using the RRDtool C API to use this new functionality. -- Florian Forster git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2059 a5681a0c-68f1-0310-ab6d-d61299d08faa
* remove intl from build process ... someone who does actually need it should fix this ... * make the code work on solaris 10 (tested on opencsw server farm. thanks!) git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1955 a5681a0c-68f1-0310-ab6d-d61299d08faa
more solaris 10 portability changes .... git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1954 a5681a0c-68f1-0310-ab6d-d61299d08faa
load rrd_config.h before rrd_client.h since its content is expected to be present -- Florian Forster git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1935 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd_client, rrd_daemon: Do not require hostnames to contain a dot. Non-FQDN (e.g. "localhost") are now supported as well. Anything that does not start with '[' should be (and is now) treated as <name>[:<port>]. -- Sebastian Harl git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1930 a5681a0c-68f1-0310-ab6d-d61299d08faa
rrd_client: Improved error handling / reporting. * Report getaddrinfo() errors using gai_strerror(). * Replaced "Internal error" with a more verbose error message, if available. -- Sebastian Harl git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1929 a5681a0c-68f1-0310-ab6d-d61299d08faa