summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b9fe8b)
raw | patch | inline | side by side (parent: 3b9fe8b)
author | Stefan Rinkes <stefan.rinkes@gmail.com> | |
Thu, 21 Apr 2011 19:30:04 +0000 (21:30 +0200) | ||
committer | Stefan Rinkes <stefan.rinkes@gmail.com> | |
Thu, 21 Apr 2011 19:30:04 +0000 (21:30 +0200) |
src/pf.c | patch | blob | history |
diff --git a/src/pf.c b/src/pf.c
index 9d99e3a7263c8ee55a1caa262834cd046ee77590..33e2d4b964c0ef8dc5d45058c383a5a7889dfd55 100644 (file)
--- a/src/pf.c
+++ b/src/pf.c
static int pf_read(void);
static void submit_counter(const char *, const char *, counter_t);
-void
-submit_counter(const char *type, const char *inst, counter_t val)
-{
-#ifndef TEST
- value_t values[1];
- value_list_t vl = VALUE_LIST_INIT;
-
- values[0].counter = val;
-
- vl.values = values;
- vl.values_len = 1;
- sstrncpy (vl.host, hostname_g, sizeof (vl.host));
- sstrncpy (vl.plugin, "pf", sizeof (vl.plugin));
- sstrncpy (vl.type, type, sizeof(vl.type));
- sstrncpy (vl.type_instance, inst, sizeof(vl.type_instance));
- plugin_dispatch_values(&vl);
-#else
- printf("%s.%s: %lld\n", type, inst, val);
-#endif
-}
-
-
int
pf_init(void)
{
return (0);
}
+void
+submit_counter(const char *type, const char *inst, counter_t val)
+{
+#ifndef TEST
+ value_t values[1];
+ value_list_t vl = VALUE_LIST_INIT;
+
+ values[0].counter = val;
+
+ vl.values = values;
+ vl.values_len = 1;
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "pf", sizeof (vl.plugin));
+ sstrncpy (vl.type, type, sizeof(vl.type));
+ sstrncpy (vl.type_instance, inst, sizeof(vl.type_instance));
+ plugin_dispatch_values(&vl);
+#else
+ printf("%s.%s: %lld\n", type, inst, val);
+#endif
+}
+
#ifdef TEST
int
main(int argc, char *argv[])