Merge branch 'collectd-3.11' into collectd-4.0
[collectd.git] / src / network.c
index 4b50ce2..84e7773 100644 (file)
@@ -385,7 +385,8 @@ static int parse_part_values (void **ret_buffer, int *ret_buffer_len,
 
        if (buffer_len < (15))
        {
-               DEBUG ("packet is too short: buffer_len = %i", buffer_len);
+               DEBUG ("network plugin: packet is too short: buffer_len = %i",
+                               buffer_len);
                return (-1);
        }
 
@@ -1047,7 +1048,7 @@ static void network_send_buffer (const char *buffer, int buffer_len)
        sockent_t *se;
        int status;
 
-       DEBUG ("buffer_len = %i", buffer_len);
+       DEBUG ("network plugin: network_send_buffer: buffer_len = %i", buffer_len);
 
        for (se = sending_sockets; se != NULL; se = se->next)
        {
@@ -1231,7 +1232,11 @@ static int network_config (const char *key, const char *val)
                                && (fields_num != 2))
                        return (1);
                else if (fields_num == 2)
+               {
+                       if ((service = strchr (fields[1], '.')) != NULL)
+                               *service = '\0';
                        service = fields[1];
+               }
                node = fields[0];
 
                if (strcasecmp ("Listen", key) == 0)
@@ -1343,7 +1348,7 @@ static int network_init (void)
        return (0);
 } /* int network_init */
 
-void module_register (modreg_e load)
+void module_register (void)
 {
        plugin_register_config ("network", network_config,
                        config_keys, config_keys_num);