projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4eeb598
)
openvpn plugin: constify
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Mar 2016 11:45:57 +0000
(12:45 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Mar 2016 11:45:57 +0000
(12:45 +0100)
src/openvpn.c
patch
|
blob
|
history
diff --git
a/src/openvpn.c
b/src/openvpn.c
index
93c8f1b
..
8bccce3
100644
(file)
--- a/
src/openvpn.c
+++ b/
src/openvpn.c
@@
-95,7
+95,8
@@
static int openvpn_strsplit (char *string, char **fields, size_t size)
} /* int openvpn_strsplit */
/* dispatches number of users */
} /* int openvpn_strsplit */
/* dispatches number of users */
-static void numusers_submit (char *pinst, char *tinst, gauge_t value)
+static void numusers_submit (const char *pinst, const char *tinst,
+ gauge_t value)
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
@@
-115,8
+116,10
@@
static void numusers_submit (char *pinst, char *tinst, gauge_t value)
plugin_dispatch_values (&vl);
} /* void numusers_submit */
plugin_dispatch_values (&vl);
} /* void numusers_submit */
-/* dispatches stats about traffic (TCP or UDP) generated by the tunnel per single endpoint */
-static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx)
+/* dispatches stats about traffic (TCP or UDP) generated by the tunnel
+ * per single endpoint */
+static void iostats_submit (const char *pinst, const char *tinst,
+ derive_t rx, derive_t tx)
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
@@
-145,7
+148,7
@@
static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx)
} /* void traffic_submit */
/* dispatches stats about data compression shown when in single mode */
} /* void traffic_submit */
/* dispatches stats about data compression shown when in single mode */
-static void compression_submit (c
har *pinst,
char *tinst,
+static void compression_submit (c
onst char *pinst, const
char *tinst,
derive_t uncompressed, derive_t compressed)
{
value_t values[2];
derive_t uncompressed, derive_t compressed)
{
value_t values[2];
@@
-168,7
+171,7
@@
static void compression_submit (char *pinst, char *tinst,
plugin_dispatch_values (&vl);
} /* void compression_submit */
plugin_dispatch_values (&vl);
} /* void compression_submit */
-static int single_read (char *name, FILE *fh)
+static int single_read (c
onst c
har *name, FILE *fh)
{
char buffer[1024];
char *fields[4];
{
char buffer[1024];
char *fields[4];
@@
-261,7
+264,7
@@
static int single_read (char *name, FILE *fh)
} /* int single_read */
/* for reading status version 1 */
} /* int single_read */
/* for reading status version 1 */
-static int multi1_read (char *name, FILE *fh)
+static int multi1_read (c
onst c
har *name, FILE *fh)
{
char buffer[1024];
char *fields[10];
{
char buffer[1024];
char *fields[10];
@@
-324,7
+327,7
@@
static int multi1_read (char *name, FILE *fh)
} /* int multi1_read */
/* for reading status version 2 */
} /* int multi1_read */
/* for reading status version 2 */
-static int multi2_read (char *name, FILE *fh)
+static int multi2_read (c
onst c
har *name, FILE *fh)
{
char buffer[1024];
char *fields[10];
{
char buffer[1024];
char *fields[10];
@@
-386,7
+389,7
@@
static int multi2_read (char *name, FILE *fh)
} /* int multi2_read */
/* for reading status version 3 */
} /* int multi2_read */
/* for reading status version 3 */
-static int multi3_read (char *name, FILE *fh)
+static int multi3_read (c
onst c
har *name, FILE *fh)
{
char buffer[1024];
char *fields[15];
{
char buffer[1024];
char *fields[15];
@@
-451,7
+454,7
@@
static int multi3_read (char *name, FILE *fh)
} /* int multi3_read */
/* for reading status version 4 */
} /* int multi3_read */
/* for reading status version 4 */
-static int multi4_read (char *name, FILE *fh)
+static int multi4_read (c
onst c
har *name, FILE *fh)
{
char buffer[1024];
char *fields[11];
{
char buffer[1024];
char *fields[11];