summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61541f6)
raw | patch | inline | side by side (parent: 61541f6)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 15 Nov 2012 09:04:46 +0000 (10:04 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 15 Nov 2012 09:06:45 +0000 (10:06 +0100) |
Rather than unregistering some callback for each writer for each database,
unregister the single callback for each database only.
unregister the single callback for each database only.
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index 4d2436056fd76cac09f2b6a92a2304125ddab715..ef7a5ec1ddd58fd9f1a22a38b23cc55121048e2b 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
for (i = 0; i < databases_num; ++i) {
c_psql_database_t *db = databases + i;
- size_t j = 0;
- for (j = 0; j < db->writers_num; ++j) {
+ if (db->writers_num > 0) {
char cb_name[DATA_MAX_NAME_LEN];
-
ssnprintf (cb_name, sizeof (cb_name), "postgresql-%s",
db->database);
plugin_unregister_write (cb_name);