Fix backend config (#7538)
Vladimir Kobal committed
Dec 16, 2019 at 15:22 UTC
c4bb3d2642ab34e6aca912b22e55aed52f84e974
1 file changed
-14
libnetdata/config/appconfig.c
-14
@@ -525,8 +525,6 @@ int appconfig_load(struct config *root, char *filename, int overwrite_used)
525
int line = 0;
526
struct section *co = NULL;
527
int is_exporter_config = 0;
528
- int is_backend_config = 0;
529
- int have_backend_config = 0;
528
int _backends = 0; // number of backend sections we have
529
char working_instance[CONFIG_MAX_NAME + 1];
530
char working_connector[CONFIG_MAX_NAME + 1];
@@ -591,18 +589,6 @@ int appconfig_load(struct config *root, char *filename, int overwrite_used)
589
}
590
}
591
594
- is_backend_config = !(strcmp(s, CONFIG_SECTION_BACKEND));
595
- if (!have_backend_config)
596
- have_backend_config = is_backend_config;
597
-
598
- if (is_backend_config) {
599
- if (_backends) {
600
- sprintf(buffer, CONFIG_SECTION_BACKEND "/%d", _backends);
601
- s = buffer;
602
- }
603
- _backends++;
604
- }
605
-
592
co = appconfig_section_find(root, s);
593
if(!co) co = appconfig_section_create(root, s);
594