projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright notices.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
fda20c4
..
205d099
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-1,7
+1,7
@@
/*
tincd.c -- the main file for tincd
Copyright (C) 1998-2005 Ivo Timmermans
/*
tincd.c -- the main file for tincd
Copyright (C) 1998-2005 Ivo Timmermans
- 2000-201
4
Guus Sliepen <guus@tinc-vpn.org>
+ 2000-201
6
Guus Sliepen <guus@tinc-vpn.org>
2008 Max Rijevski <maksuf@gmail.com>
2009 Michael Tokarev <mjt@tls.msk.ru>
2010 Julien Muchembled <jm@jmuchemb.eu>
2008 Max Rijevski <maksuf@gmail.com>
2009 Michael Tokarev <mjt@tls.msk.ru>
2010 Julien Muchembled <jm@jmuchemb.eu>
@@
-49,7
+49,12
@@
#include <time.h>
#endif
#include <time.h>
#endif
+#ifdef HAVE_GETOPT_LONG
#include <getopt.h>
#include <getopt.h>
+#else
+#include "getopt.h"
+#endif
+
#include "pidfile.h"
#include "conf.h"
#include "pidfile.h"
#include "conf.h"
@@
-97,7
+102,7
@@
char *pidfilename = NULL; /* pid file location */
char *logfilename = NULL; /* log file location */
char **g_argv; /* a copy of the cmdline arguments */
char *logfilename = NULL; /* log file location */
char **g_argv; /* a copy of the cmdline arguments */
-static int status;
+static int status
= 1
;
static struct option const long_options[] = {
{"config", required_argument, NULL, 'c'},
static struct option const long_options[] = {
{"config", required_argument, NULL, 'c'},
@@
-239,7
+244,8
@@
static bool parse_options(int argc, char **argv) {
usage(true);
return false;
}
usage(true);
return false;
}
- netname = strcmp(optarg, ".") != 0 ? xstrdup(optarg) : NULL;
+ if(optarg && strcmp(optarg, "."))
+ netname = xstrdup(optarg);
break;
case 'o': /* option */
break;
case 'o': /* option */
@@
-549,7
+555,7
@@
int main(int argc, char **argv) {
if(show_version) {
printf("%s version %s (built %s %s, protocol %d)\n", PACKAGE,
VERSION, __DATE__, __TIME__, PROT_CURRENT);
if(show_version) {
printf("%s version %s (built %s %s, protocol %d)\n", PACKAGE,
VERSION, __DATE__, __TIME__, PROT_CURRENT);
- printf("Copyright (C) 1998-201
4
Ivo Timmermans, Guus Sliepen and others.\n"
+ printf("Copyright (C) 1998-201
6
Ivo Timmermans, Guus Sliepen and others.\n"
"See the AUTHORS file for a complete list.\n\n"
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to redistribute it under certain conditions;\n"
"See the AUTHORS file for a complete list.\n\n"
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to redistribute it under certain conditions;\n"