]> git.meshlink.io Git - meshlink/blobdiff - src/conf.c
Move pinginterval pingtimeout and maxtimeout to mesh
[meshlink] / src / conf.c
index 360053f94b0181fe94ed9f5131df16c0ca75b599..08467e50f983050d848ae3b06b59a7f9b8acd0ef 100644 (file)
@@ -30,9 +30,6 @@
 #include "utils.h"              /* for cp */
 #include "xalloc.h"
 
-int pinginterval = 0;           /* seconds between pings */
-int pingtimeout = 0;            /* seconds to wait for response */
-
 static int config_compare(const config_t *a, const config_t *b) {
        int result;
 
@@ -297,7 +294,7 @@ bool read_server_config(void) {
        char *fname;
        bool x;
 
-       xasprintf(&fname, "%s" SLASH "tinc.conf", confbase);
+       xasprintf(&fname, "%s" SLASH "meshlink.conf", mesh->confbase);
        errno = 0;
        x = read_config_file(mesh->config, fname);
 
@@ -313,7 +310,7 @@ bool read_host_config(splay_tree_t *config_tree, const char *name) {
        char *fname;
        bool x;
 
-       xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, name);
+       xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", mesh->confbase, name);
        x = read_config_file(config_tree, fname);
        free(fname);
 
@@ -322,7 +319,7 @@ bool read_host_config(splay_tree_t *config_tree, const char *name) {
 
 bool append_config_file(const char *name, const char *key, const char *value) {
        char *fname;
-       xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, name);
+       xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", mesh->confbase, name);
 
        FILE *fp = fopen(fname, "a");