summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 471314c)
raw | patch | inline | side by side (parent: 471314c)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 21 May 2015 22:16:04 +0000 (00:16 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 21 May 2015 22:16:04 +0000 (00:16 +0200) |
That is, the return values now mean the same as for the sdb_store_* functions.
src/core/plugin.c | patch | blob | history |
diff --git a/src/core/plugin.c b/src/core/plugin.c
index f581eb1629fbe3f043c02e13f6a4f3799de9b6d4..96df9fe6b77fdc89377da0efee47cd159ad6cccb 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
iter = sdb_llist_get_iter(writer_list);
while (sdb_llist_iter_has_next(iter)) {
sdb_plugin_writer_t *writer;
+ int s;
writer = SDB_PLUGIN_WRITER(sdb_llist_iter_get_next(iter));
assert(writer);
- if (writer->impl.store_host(name, last_update, writer->w_user_data))
- status = -1;
+ s = writer->impl.store_host(name, last_update, writer->w_user_data);
+ if (((s > 0) && (status >= 0)) || (s < 0))
+ status = s;
}
sdb_llist_iter_destroy(iter);
return status;
iter = sdb_llist_get_iter(writer_list);
while (sdb_llist_iter_has_next(iter)) {
sdb_plugin_writer_t *writer;
+ int s;
writer = SDB_PLUGIN_WRITER(sdb_llist_iter_get_next(iter));
assert(writer);
- if (writer->impl.store_service(hostname, name, last_update,
- writer->w_user_data))
- status = -1;
+ s = writer->impl.store_service(hostname, name, last_update,
+ writer->w_user_data);
+ if (((s > 0) && (status >= 0)) || (s < 0))
+ status = s;
}
sdb_llist_iter_destroy(iter);
return status;
iter = sdb_llist_get_iter(writer_list);
while (sdb_llist_iter_has_next(iter)) {
sdb_plugin_writer_t *writer;
+ int s;
writer = SDB_PLUGIN_WRITER(sdb_llist_iter_get_next(iter));
assert(writer);
- if (writer->impl.store_metric(hostname, name, store, last_update,
- writer->w_user_data))
- status = -1;
+ s = writer->impl.store_metric(hostname, name, store, last_update,
+ writer->w_user_data);
+ if (((s > 0) && (status >= 0)) || (s < 0))
+ status = s;
}
sdb_llist_iter_destroy(iter);
return status;
iter = sdb_llist_get_iter(writer_list);
while (sdb_llist_iter_has_next(iter)) {
sdb_plugin_writer_t *writer;
+ int s;
writer = SDB_PLUGIN_WRITER(sdb_llist_iter_get_next(iter));
assert(writer);
- if (writer->impl.store_attribute(hostname, key, value, last_update,
- writer->w_user_data))
- status = -1;
+ s = writer->impl.store_attribute(hostname, key, value, last_update,
+ writer->w_user_data);
+ if (((s > 0) && (status >= 0)) || (s < 0))
+ status = s;
}
sdb_llist_iter_destroy(iter);
return status;
@@ -1438,11 +1446,13 @@ sdb_plugin_store_service_attribute(const char *hostname, const char *service,
iter = sdb_llist_get_iter(writer_list);
while (sdb_llist_iter_has_next(iter)) {
sdb_plugin_writer_t *writer;
+ int s;
writer = SDB_PLUGIN_WRITER(sdb_llist_iter_get_next(iter));
assert(writer);
- if (writer->impl.store_service_attr(hostname, service,
- key, value, last_update, writer->w_user_data))
- status = -1;
+ s = writer->impl.store_service_attr(hostname, service,
+ key, value, last_update, writer->w_user_data);
+ if (((s > 0) && (status >= 0)) || (s < 0))
+ status = s;
}
sdb_llist_iter_destroy(iter);
return status;
iter = sdb_llist_get_iter(writer_list);
while (sdb_llist_iter_has_next(iter)) {
sdb_plugin_writer_t *writer;
+ int s;
writer = SDB_PLUGIN_WRITER(sdb_llist_iter_get_next(iter));
assert(writer);
- if (writer->impl.store_metric_attr(hostname, metric,
- key, value, last_update, writer->w_user_data))
- status = -1;
+ s = writer->impl.store_metric_attr(hostname, metric,
+ key, value, last_update, writer->w_user_data);
+ if (((s > 0) && (status >= 0)) || (s < 0))
+ status = s;
}
sdb_llist_iter_destroy(iter);
return status;