projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5'
[collectd.git]
/
src
/
mbmon.c
diff --git
a/src/mbmon.c
b/src/mbmon.c
index
22a26da
..
2d6d77e
100644
(file)
--- a/
src/mbmon.c
+++ b/
src/mbmon.c
@@
-1,6
+1,7
@@
/**
* collectd - src/mbmon.c
/**
* collectd - src/mbmon.c
- * Copyright (C) 2006 Flavio Stanchina
+ * Copyright (C) 2006 Flavio Stanchina
+ * Copyright (C) 2006-2007 Florian octo Forster
* Based on the hddtemp plugin.
*
* This program is free software; you can redistribute it and/or modify it
* Based on the hddtemp plugin.
*
* This program is free software; you can redistribute it and/or modify it
@@
-19,6
+20,7
@@
*
* Authors:
* Flavio Stanchina <flavio at stanchina.net>
*
* Authors:
* Flavio Stanchina <flavio at stanchina.net>
+ * Florian Forster <octo at collectd.org>
**/
#include "collectd.h"
**/
#include "collectd.h"
@@
-27,7
+29,6
@@
#include "configfile.h"
#include <netdb.h>
#include "configfile.h"
#include <netdb.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@
-227,12
+228,12
@@
static void mbmon_submit (const char *type, const char *type_instance,
vl.values = values;
vl.values_len = 1;
vl.values = values;
vl.values_len = 1;
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "mbmon", sizeof (vl.plugin));
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "mbmon", sizeof (vl.plugin));
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
- plugin_dispatch_values (
type,
&vl);
+ plugin_dispatch_values (&vl);
} /* void mbmon_submit */
/* Trim trailing whitespace from a string. */
} /* void mbmon_submit */
/* Trim trailing whitespace from a string. */
@@
-259,8
+260,8
@@
static int mbmon_read (void)
double value;
char *nextc;
double value;
char *nextc;
- char *type;
- char *inst;
+ c
onst c
har *type;
+ c
onst c
har *inst;
*t++ = '\0';
trim_spaces (s);
*t++ = '\0';
trim_spaces (s);