From: octo Date: Thu, 15 Dec 2005 06:58:39 +0000 (+0000) Subject: Changed the term `Module' to `Plugin' in configfile.c. This seemed more consistent. X-Git-Tag: collectd-3.5.0~7^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f92c310c5f07fc735737a31a4db5d8b4765955c7;p=collectd.git Changed the term `Module' to `Plugin' in configfile.c. This seemed more consistent. Added a `break' where it was needed.. --- diff --git a/src/configfile.c b/src/configfile.c index 5cdd7360..cbe2de9f 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -109,7 +109,10 @@ int cf_dispatch (char *type, const char *orig_key, const char *orig_value) for (i = 0; i < cf_cb->keys_num; i++) { if (strcasecmp (cf_cb->keys[i], key) == 0) + { ret = (*cf_cb->callback) (key, value); + break; + } } if (i >= cf_cb->keys_num) @@ -165,7 +168,7 @@ void cf_register (char *type, for (i = 0; i < keys_num; i++) { - if (snprintf (buf, 64, "Module.%s", keys[i]) < 64) + if (snprintf (buf, 64, "Plugin.%s", keys[i]) < 64) { /* This may be called multiple times for the same * `key', but apparently `lc_register_*' can handle @@ -336,7 +339,7 @@ int cf_read (char *filename) lc_register_callback ("Mode", SHORTOPT_NONE, LC_VAR_SECTION, cf_callback_section_mode, NULL); - lc_register_callback ("Module", SHORTOPT_NONE, LC_VAR_SECTION, + lc_register_callback ("Plugin", SHORTOPT_NONE, LC_VAR_SECTION, cf_callback_section_module, NULL); /* @@ -344,7 +347,7 @@ int cf_read (char *filename) * - Add more directives, such as `DefaultMode', `DataDir', `PIDFile', ... */ - lc_register_callback ("Mode.LoadModule", SHORTOPT_NONE, + lc_register_callback ("Mode.LoadPlugin", SHORTOPT_NONE, LC_VAR_STRING, cf_callback_loadmodule, NULL);