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.4' into collectd-5.5
[collectd.git]
/
src
/
pinba.c
diff --git
a/src/pinba.c
b/src/pinba.c
index
26aa539
..
e94ad8f
100644
(file)
--- a/
src/pinba.c
+++ b/
src/pinba.c
@@
-20,7
+20,7
@@
* Authors:
* Antony Dovgal <tony at daylessday.org>
* Phoenix Kayo <kayo.k11.4 at gmail.com>
* Authors:
* Antony Dovgal <tony at daylessday.org>
* Phoenix Kayo <kayo.k11.4 at gmail.com>
- * Florian Forster <octo at
verplant
.org>
+ * Florian Forster <octo at
collectd
.org>
**/
#include "collectd.h"
**/
#include "collectd.h"
@@
-35,6
+35,11
@@
#include "pinba.pb-c.h"
#include "pinba.pb-c.h"
+/* AIX doesn't have MSG_DONTWAIT */
+#ifndef MSG_DONTWAIT
+# define MSG_DONTWAIT MSG_NONBLOCK
+#endif
+
/*
* Defines
*/
/*
* Defines
*/
@@
-331,6
+336,7
@@
static int pb_add_socket (pinba_socket_t *s, /* {{{ */
char errbuf[1024];
ERROR ("pinba plugin: bind(2) failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
char errbuf[1024];
ERROR ("pinba plugin: bind(2) failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
+ close (fd);
return (0);
}
return (0);
}
@@
-645,7
+651,7
@@
static int plugin_init (void) /* {{{ */
if (collector_thread_running)
return (0);
if (collector_thread_running)
return (0);
- status = pthread_create (&collector_thread_id,
+ status = p
lugin_
thread_create (&collector_thread_id,
/* attrs = */ NULL,
collector_thread,
/* args = */ NULL);
/* attrs = */ NULL,
collector_thread,
/* args = */ NULL);