projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/utils_avltree.[ch]: Rename all types and functions to use the prefix `c_avl_'.
[collectd.git]
/
src
/
ntpd.c
diff --git
a/src/ntpd.c
b/src/ntpd.c
index
6905fb2
..
9e09f81
100644
(file)
--- a/
src/ntpd.c
+++ b/
src/ntpd.c
@@
-24,12
+24,6
@@
#include "plugin.h"
#include "configfile.h"
#include "plugin.h"
#include "configfile.h"
-#if HAVE_SYS_SOCKET_H
-# define NTPD_HAVE_READ 1
-#else
-# define NTPD_HAVE_READ 0
-#endif
-
#if HAVE_STDINT_H
# include <stdint.h>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
@@
-60,7
+54,6
@@
static const char *config_keys[] =
};
static int config_keys_num = 2;
};
static int config_keys_num = 2;
-#if NTPD_HAVE_READ
# define NTPD_DEFAULT_HOST "localhost"
# define NTPD_DEFAULT_PORT "123"
static int sock_descr = -1;
# define NTPD_DEFAULT_HOST "localhost"
# define NTPD_DEFAULT_PORT "123"
static int sock_descr = -1;
@@
-500,7
+493,7
@@
static int ntpd_receive_response (int req_code, int *res_items, int *res_size,
if (status < 0)
{
char errbuf[1024];
if (status < 0)
{
char errbuf[1024];
-
DEBUG
("recv(2) failed: %s",
+
INFO
("recv(2) failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
DEBUG ("Closing socket #%i", sd);
close (sd);
sstrerror (errno, errbuf, sizeof (errbuf)));
DEBUG ("Closing socket #%i", sd);
close (sd);
@@
-958,13
+951,10
@@
static int ntpd_read (void)
return (0);
} /* int ntpd_read */
return (0);
} /* int ntpd_read */
-#endif /* NTPD_HAVE_READ */
void module_register (void)
{
void module_register (void)
{
-#if NTPD_HAVE_READ
plugin_register_config ("ntpd", ntpd_config,
config_keys, config_keys_num);
plugin_register_read ("ntpd", ntpd_read);
plugin_register_config ("ntpd", ntpd_config,
config_keys, config_keys_num);
plugin_register_read ("ntpd", ntpd_read);
-#endif /* NTPD_HAVE_READ */
} /* void module_register */
} /* void module_register */