diff options
Diffstat (limited to 'src/ot_config.c')
| -rw-r--r-- | src/ot_config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ot_config.c b/src/ot_config.c index 95136b5..4064d1b 100644 --- a/src/ot_config.c +++ b/src/ot_config.c | |||
| @@ -208,6 +208,7 @@ typedef enum { | |||
| 208 | CONFIG_TRACKER_REDIRECT_URL, | 208 | CONFIG_TRACKER_REDIRECT_URL, |
| 209 | CONFIG_LIVESYNC_CLUSTER_NODE_IP, | 209 | CONFIG_LIVESYNC_CLUSTER_NODE_IP, |
| 210 | CONFIG_LIVESYNC_CLUSTER_LISTEN, | 210 | CONFIG_LIVESYNC_CLUSTER_LISTEN, |
| 211 | CONFIG_LIVESYNC_CLUSTER_GROUP, | ||
| 211 | } config_kind; | 212 | } config_kind; |
| 212 | 213 | ||
| 213 | typedef struct { | 214 | typedef struct { |
| @@ -247,6 +248,7 @@ static const config_key config_keys[] = { | |||
| 247 | #ifdef WANT_SYNC_LIVE | 248 | #ifdef WANT_SYNC_LIVE |
| 248 | CONFIG_KEY("livesync.cluster.node_ip", CONFIG_LIVESYNC_CLUSTER_NODE_IP), | 249 | CONFIG_KEY("livesync.cluster.node_ip", CONFIG_LIVESYNC_CLUSTER_NODE_IP), |
| 249 | CONFIG_KEY("livesync.cluster.listen", CONFIG_LIVESYNC_CLUSTER_LISTEN), | 250 | CONFIG_KEY("livesync.cluster.listen", CONFIG_LIVESYNC_CLUSTER_LISTEN), |
| 251 | CONFIG_KEY("livesync.cluster.group", CONFIG_LIVESYNC_CLUSTER_GROUP), | ||
| 250 | #endif | 252 | #endif |
| 251 | }; | 253 | }; |
| 252 | static const size_t config_entry_count = sizeof(config_keys) / sizeof(config_keys[0]); | 254 | static const size_t config_entry_count = sizeof(config_keys) / sizeof(config_keys[0]); |
| @@ -378,6 +380,10 @@ static int parse_configfile(char *config_filename) { | |||
| 378 | set_config_option(&g_redirecturl, p); | 380 | set_config_option(&g_redirecturl, p); |
| 379 | break; | 381 | break; |
| 380 | #ifdef WANT_SYNC_LIVE | 382 | #ifdef WANT_SYNC_LIVE |
| 383 | case CONFIG_LIVESYNC_CLUSTER_GROUP: | ||
| 384 | if (!ip_parse(p, tmpip) || livesync_set_group(tmpip) == -1) | ||
| 385 | goto parse_error; | ||
| 386 | break; | ||
| 381 | case CONFIG_LIVESYNC_CLUSTER_NODE_IP: | 387 | case CONFIG_LIVESYNC_CLUSTER_NODE_IP: |
| 382 | if (!scan_ip6_net(p, &tmpnet)) | 388 | if (!scan_ip6_net(p, &tmpnet)) |
| 383 | goto parse_error; | 389 | goto parse_error; |
