rrdd.git
15 years agosrc/rrdd.[ch]: Implemented flushing of dead values once in a while. master
Florian Forster [Sun, 22 Jun 2008 13:51:11 +0000 (15:51 +0200)]
src/rrdd.[ch]: Implemented flushing of dead values once in a while.

15 years agosrc/rrdd.c: Remove unused variables and functions.
Florian Forster [Sun, 22 Jun 2008 13:10:19 +0000 (15:10 +0200)]
src/rrdd.c: Remove unused variables and functions.

15 years agosrc/rrdd.c et al.: Use the tree implementation from GLib 2.0.
Florian Forster [Sun, 22 Jun 2008 12:50:46 +0000 (14:50 +0200)]
src/rrdd.c et al.: Use the tree implementation from GLib 2.0.

15 years agosrc/librrdc.c: rrdd_connect: Allow connecting to arbitrary addresses.
Florian Forster [Sun, 22 Jun 2008 12:20:32 +0000 (14:20 +0200)]
src/librrdc.c: rrdd_connect: Allow connecting to arbitrary addresses.

UNIX domain sockets are handled specially, because getaddrinfo(3) doesn't
now how to handle them.

15 years agosrc/rrdd.c: Remove an unused variable.
Florian Forster [Sun, 22 Jun 2008 12:19:06 +0000 (14:19 +0200)]
src/rrdd.c: Remove an unused variable.

15 years agosrc/rrdd.c: Try the default address if no other address is specified.
Florian Forster [Sun, 22 Jun 2008 12:18:51 +0000 (14:18 +0200)]
src/rrdd.c: Try the default address if no other address is specified.

15 years agosrc/rrdd.[ch]: Move DEFAULT_PORT to rrdd.h.
Florian Forster [Sun, 22 Jun 2008 12:18:20 +0000 (14:18 +0200)]
src/rrdd.[ch]: Move DEFAULT_PORT to rrdd.h.

15 years agosrc/rrdd.c: Implement listening on multiple sockets.
Florian Forster [Sun, 22 Jun 2008 11:28:52 +0000 (13:28 +0200)]
src/rrdd.c: Implement listening on multiple sockets.

15 years agosrc/rrdd.c: Only unlink UNIX domain sockets.
Florian Forster [Sun, 22 Jun 2008 11:28:29 +0000 (13:28 +0200)]
src/rrdd.c: Only unlink UNIX domain sockets.

15 years agosrc/rrdd.[ch]: Implement listening to arbitrary addresses.
Florian Forster [Sun, 22 Jun 2008 11:00:48 +0000 (13:00 +0200)]
src/rrdd.[ch]: Implement listening to arbitrary addresses.

15 years agosrc/rrdd.c: Implement option parsing.
Florian Forster [Sun, 22 Jun 2008 09:57:08 +0000 (11:57 +0200)]
src/rrdd.c: Implement option parsing.

The write interval is no longer hard coded. The other options are not
yet implemented.

15 years agosrc/rrdd.c: Add a debug message for disconnecting sockets.
Florian Forster [Sun, 22 Jun 2008 09:01:55 +0000 (11:01 +0200)]
src/rrdd.c: Add a debug message for disconnecting sockets.

15 years agosrc/rrdd.c: Complain if write(2) fails.
Florian Forster [Sun, 22 Jun 2008 09:01:18 +0000 (11:01 +0200)]
src/rrdd.c: Complain if write(2) fails.

15 years agosrc/rrdd.c: Ignore SIGPIPE.
Florian Forster [Sun, 22 Jun 2008 08:48:15 +0000 (10:48 +0200)]
src/rrdd.c: Ignore SIGPIPE.

This signal may be sent if a client closes the connection before reading
the reply. We don't want to die in this case.. ;)

15 years agosrc/rrdd.pod: Add a simple manpage stub for rrdd(1).
Florian Forster [Sun, 22 Jun 2008 08:34:24 +0000 (10:34 +0200)]
src/rrdd.pod: Add a simple manpage stub for rrdd(1).

15 years agosrc/{lib,}rrdc.c: Make `rrdd_connect' use the default path if path == NULL.
Florian Forster [Sun, 22 Jun 2008 08:17:10 +0000 (10:17 +0200)]
src/{lib,}rrdc.c: Make `rrdd_connect' use the default path if path == NULL.

15 years agosrc/rrdd.c: Actually pass the values to rrd_update_r.
Florian Forster [Sat, 21 Jun 2008 16:35:17 +0000 (18:35 +0200)]
src/rrdd.c: Actually pass the values to rrd_update_r.

15 years agosrc/rrdc.c: Use PACHAGE_VERSION rather than hard coding the version.
Florian Forster [Sat, 21 Jun 2008 16:23:46 +0000 (18:23 +0200)]
src/rrdc.c: Use PACHAGE_VERSION rather than hard coding the version.

15 years agosrc/rrdd.c: Signal the queue thread then shutting down.
Florian Forster [Sat, 21 Jun 2008 16:23:22 +0000 (18:23 +0200)]
src/rrdd.c: Signal the queue thread then shutting down.

Prevents a deadlock when shutting down.

15 years agosrc/rrdd.c: Let the connection thread add itself to the list of threads.
Florian Forster [Sat, 21 Jun 2008 16:22:44 +0000 (18:22 +0200)]
src/rrdd.c: Let the connection thread add itself to the list of threads.

This avoids an ugly race condition.

15 years agosrc/librrdc.c: When sending an `update', wait for the reply before closing the socket.
Florian Forster [Sat, 21 Jun 2008 16:17:07 +0000 (18:17 +0200)]
src/librrdc.c: When sending an `update', wait for the reply before closing the socket.

Not doing so will (still!) crash rrdd, but it's not nice either hence this fix.

15 years agosrc/rrdc.c: According to C99 argv is NULL terminated, so don't copy the array.
Florian Forster [Sat, 21 Jun 2008 15:43:07 +0000 (17:43 +0200)]
src/rrdc.c: According to C99 argv is NULL terminated, so don't copy the array.

15 years agosrc/rrdd.c: A first take at implementing a cache.
Florian Forster [Sat, 21 Jun 2008 13:44:43 +0000 (15:44 +0200)]
src/rrdd.c: A first take at implementing a cache.

This is WORK IN PROGRESS and not working correctly yet! Also in this commit:
Many other unstructured changes, since this we're still in the big bang phase
of this project ;)

15 years agosrc/rrdd.h: Include more neccessary files.
Florian Forster [Sat, 21 Jun 2008 13:44:27 +0000 (15:44 +0200)]
src/rrdd.h: Include more neccessary files.

15 years agosrc/librrdc.c: Send the `command' ("update" right now) to the daemon, too.
Florian Forster [Sat, 21 Jun 2008 13:43:46 +0000 (15:43 +0200)]
src/librrdc.c: Send the `command' ("update" right now) to the daemon, too.

15 years agobuild system: Search for <avl.h> and link with `avl'.
Florian Forster [Sat, 21 Jun 2008 13:43:19 +0000 (15:43 +0200)]
build system: Search for <avl.h> and link with `avl'.

15 years agosrc/librrdc.c: Sending to the daemon has been added.
Florian Forster [Sat, 21 Jun 2008 02:09:59 +0000 (04:09 +0200)]
src/librrdc.c: Sending to the daemon has been added.

Handling by the daemon is still missing.

15 years agosrc/rrdd.[ch]: Use package name and version from config.h.
Florian Forster [Sat, 21 Jun 2008 02:04:54 +0000 (04:04 +0200)]
src/rrdd.[ch]: Use package name and version from config.h.

15 years agoconfigure.ac: Add the forgotten configure.ac.
Florian Forster [Fri, 20 Jun 2008 17:58:55 +0000 (19:58 +0200)]
configure.ac: Add the forgotten configure.ac.

15 years agoInitial commit: rrdd, rrdc, librrdc.so
Florian Forster [Fri, 20 Jun 2008 17:55:05 +0000 (19:55 +0200)]
Initial commit: rrdd, rrdc, librrdc.so

Deamonization, socket opening and build system work, but the protocol is not
implemented yet. The protocol will be implemented in librrdc.so, so that
external programs can easily use the daemon.