static struct option const long_options[] = {
{"config", required_argument, NULL, 'c'},
static struct option const long_options[] = {
{"config", required_argument, NULL, 'c'},
- fprintf(stdout, "Please enter a file to save %s to [%s]: ", what, filename);
- fflush(stdout);
+ fprintf(stderr, "Please enter a file to save %s to [%s]: ", what, filename);
if(fgets(buf, sizeof buf, stdin) == NULL) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
if(fgets(buf, sizeof buf, stdin) == NULL) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
-#ifdef HAVE_MINGW
- if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) {
- if(verbose)
- fprintf(stderr, "System call `%s' failed: %s", "WSAStartup", winerror(GetLastError()));
- return false;
- }
-#endif
-
{"IffOneQueue", VAR_SERVER},
{"Interface", VAR_SERVER},
{"KeyExpire", VAR_SERVER},
{"IffOneQueue", VAR_SERVER},
{"Interface", VAR_SERVER},
{"KeyExpire", VAR_SERVER},
{"LocalDiscovery", VAR_SERVER},
{"MACExpire", VAR_SERVER},
{"MaxConnectionBurst", VAR_SERVER},
{"LocalDiscovery", VAR_SERVER},
{"MACExpire", VAR_SERVER},
{"MaxConnectionBurst", VAR_SERVER},
if(action < 0 && !removed) {
remove(tmpfile);
fprintf(stderr, "No configuration variables deleted.\n");
if(action < 0 && !removed) {
remove(tmpfile);
fprintf(stderr, "No configuration variables deleted.\n");
if(!fgets(buf, sizeof buf, stdin)) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
return 1;
if(!fgets(buf, sizeof buf, stdin)) {
fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno));
return 1;
fprintf(stderr, "Could not create directory %s: %s\n", confdir, strerror(errno));
return 1;
}
fprintf(stderr, "Could not create directory %s: %s\n", confdir, strerror(errno));
return 1;
}
fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
return 1;
}
fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
return 1;
}
- fprintf(f, "#!/bin/sh\n\necho 'Unconfigured tinc-up script, please edit!'\n\n#ifconfig $INTERFACE <your vpn IP address> netmask <netmask of whole VPN>\n");
+ fprintf(f, "#!/bin/sh\n\necho 'Unconfigured tinc-up script, please edit '$0'!'\n\n#ifconfig $INTERFACE <your vpn IP address> netmask <netmask of whole VPN>\n");
+#ifdef HAVE_MINGW
+ static struct WSAData wsa_state;
+
+ if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) {
+ fprintf(stderr, "System call `%s' failed: %s", "WSAStartup", winerror(GetLastError()));
+ return false;
+ }
+#endif
+