projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
curl plugin: Allow custom plugin name for each Page block
[collectd.git]
/
src
/
openldap.c
diff --git
a/src/openldap.c
b/src/openldap.c
index
50757db
..
8053929
100644
(file)
--- a/
src/openldap.c
+++ b/
src/openldap.c
@@
-85,7
+85,7
@@
static int cldap_init_host(cldap_t *st) /* {{{ */
if (st->state && st->ld) {
DEBUG("openldap plugin: Already connected to %s", st->url);
if (st->state && st->ld) {
DEBUG("openldap plugin: Already connected to %s", st->url);
- return
(0)
;
+ return
0
;
}
rc = ldap_initialize(&ld, st->url);
}
rc = ldap_initialize(&ld, st->url);
@@
-147,7
+147,7
@@
static int cldap_init_host(cldap_t *st) /* {{{ */
} else {
DEBUG("openldap plugin: Successfully connected to %s", st->url);
st->state = 1;
} else {
DEBUG("openldap plugin: Successfully connected to %s", st->url);
st->state = 1;
- return
(0)
;
+ return
0
;
}
} /* }}} static cldap_init_host */
}
} /* }}} static cldap_init_host */
@@
-200,14
+200,14
@@
static int cldap_read_host(user_data_t *ud) /* {{{ */
if ((ud == NULL) || (ud->data == NULL)) {
ERROR("openldap plugin: cldap_read_host: Invalid user data.");
if ((ud == NULL) || (ud->data == NULL)) {
ERROR("openldap plugin: cldap_read_host: Invalid user data.");
- return
(-1)
;
+ return
-1
;
}
st = (cldap_t *)ud->data;
status = cldap_init_host(st);
if (status != 0)
}
st = (cldap_t *)ud->data;
status = cldap_init_host(st);
if (status != 0)
- return
(-1)
;
+ return
-1
;
rc = ldap_search_ext_s(st->ld, "cn=Monitor", LDAP_SCOPE_SUBTREE,
"(|(!(cn=* *))(cn=Database*))", attrs, 0, NULL, NULL,
rc = ldap_search_ext_s(st->ld, "cn=Monitor", LDAP_SCOPE_SUBTREE,
"(|(!(cn=* *))(cn=Database*))", attrs, 0, NULL, NULL,
@@
-376,7
+376,7
@@
static int cldap_read_host(user_data_t *ud) /* {{{ */
}
ldap_msgfree(result);
}
ldap_msgfree(result);
- return
(0)
;
+ return
0
;
} /* }}} int cldap_read_host */
/* Configuration handling functions {{{
} /* }}} int cldap_read_host */
/* Configuration handling functions {{{
@@
-397,13
+397,13
@@
static int cldap_config_add(oconfig_item_t *ci) /* {{{ */
st = calloc(1, sizeof(*st));
if (st == NULL) {
ERROR("openldap plugin: calloc failed.");
st = calloc(1, sizeof(*st));
if (st == NULL) {
ERROR("openldap plugin: calloc failed.");
- return
(-1)
;
+ return
-1
;
}
status = cf_util_get_string(ci, &st->name);
if (status != 0) {
sfree(st);
}
status = cf_util_get_string(ci, &st->name);
if (status != 0) {
sfree(st);
- return
(status)
;
+ return
status
;
}
st->starttls = 0;
}
st->starttls = 0;
@@
-495,10
+495,10
@@
static int cldap_config_add(oconfig_item_t *ci) /* {{{ */
if (status != 0) {
cldap_free(st);
if (status != 0) {
cldap_free(st);
- return
(-1)
;
+ return
-1
;
}
}
- return
(0)
;
+ return
0
;
} /* }}} int cldap_config_add */
static int cldap_config(oconfig_item_t *ci) /* {{{ */
} /* }}} int cldap_config_add */
static int cldap_config(oconfig_item_t *ci) /* {{{ */
@@
-518,7
+518,7
@@
static int cldap_config(oconfig_item_t *ci) /* {{{ */
child->key);
} /* for (ci->children) */
child->key);
} /* for (ci->children) */
- return
(status)
;
+ return
status
;
} /* }}} int cldap_config */
/* }}} End of configuration handling functions */
} /* }}} int cldap_config */
/* }}} End of configuration handling functions */
@@
-529,7
+529,7
@@
static int cldap_init(void) /* {{{ */
* ldap_initialize(3) */
int debug_level;
ldap_get_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug_level);
* ldap_initialize(3) */
int debug_level;
ldap_get_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug_level);
- return
(0)
;
+ return
0
;
} /* }}} int cldap_init */
static int cldap_shutdown(void) /* {{{ */
} /* }}} int cldap_init */
static int cldap_shutdown(void) /* {{{ */
@@
-540,7
+540,7
@@
static int cldap_shutdown(void) /* {{{ */
sfree(databases);
databases_num = 0;
sfree(databases);
databases_num = 0;
- return
(0)
;
+ return
0
;
} /* }}} int cldap_shutdown */
void module_register(void) /* {{{ */
} /* }}} int cldap_shutdown */
void module_register(void) /* {{{ */