--syslog and --logfile are mutually exclusive.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 14 Mar 2015 12:02:29 +0000 (12:02 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 14 Mar 2015 12:02:29 +0000 (12:02 +0000)
src/tincd.c

index c4806bace75a288d9c9e1179c58923b93334c8d6..d497bccc063132bb10b3f03070f4b2a615ae1207 100644 (file)
@@ -187,6 +187,7 @@ static bool parse_options(int argc, char **argv) {
                                break;
 
                        case 's': /* syslog */
+                               use_logfile = false;
                                use_syslog = true;
                                break;
 
@@ -225,6 +226,7 @@ static bool parse_options(int argc, char **argv) {
                                break;
 
                        case 4:   /* write log entries to a file */
+                               use_syslog = false;
                                use_logfile = true;
                                if(!optarg && optind < argc && *argv[optind] != '-')
                                        optarg = argv[optind++];