Browse Source

Allow ipv6 to be switched of for APRS-IS

master
Jeroen Vreeken 10 months ago
parent
commit
3cf9ed666c
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      fprs_aprsis.c

+ 9
- 1
fprs_aprsis.c View File

@ -42,6 +42,7 @@
#endif
#include <dml/dml.h>
#include "dml_config.h"
#include "fprs_aprsis.h"
static int fd_is = -1;
@ -83,6 +84,13 @@ static int tcp_connect(char *host, int port)
}
for (entry = result; entry; entry = entry->ai_next) {
if (entry->ai_family == AF_INET6) {
bool ipv6 = atoi(dml_config_value("ipv6", NULL, "1"));
if (!ipv6) {
continue;
}
}
int flags;
sock = socket(entry->ai_family, entry->ai_socktype,
@ -183,7 +191,7 @@ static int aprsis_open(void)
err_write:
close(fd_is);
fd_is = -1;
printf("Writing to APRS-IS failed");
printf("Writing to APRS-IS failed\n");
return -1;
}


Loading…
Cancel
Save