projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Added daemon() replacement.
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
f1593b6
..
5e8cfaf
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net.c,v 1.35.4.
79 2000/11/20 22:13:03
guus Exp $
+ $Id: net.c,v 1.35.4.
81 2000/11/24 23:13:02
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-806,8
+806,6
@@
cp
myself->status.active = 1;
syslog(LOG_NOTICE, _("Ready: listening on port %hd"), myself->port);
myself->status.active = 1;
syslog(LOG_NOTICE, _("Ready: listening on port %hd"), myself->port);
-
- child_pids = list_new();
cp
return 0;
}
cp
return 0;
}
@@
-869,12
+867,12
@@
cp
if(setup_tap_fd() < 0)
return -1;
if(setup_tap_fd() < 0)
return -1;
- if(setup_myself() < 0)
- return -1;
-
/* Run tinc-up script to further initialize the tap interface */
execute_script("tinc-up");
/* Run tinc-up script to further initialize the tap interface */
execute_script("tinc-up");
+ if(setup_myself() < 0)
+ return -1;
+
if(!(cfg = get_config_val(config, config_connectto)))
/* No upstream IP given, we're listen only. */
return 0;
if(!(cfg = get_config_val(config, config_connectto)))
/* No upstream IP given, we're listen only. */
return 0;
@@
-925,8
+923,6
@@
cp
execute_script("tinc-down");
destroy_connection_tree();
execute_script("tinc-down");
destroy_connection_tree();
-
- syslog(LOG_NOTICE, _("Terminating"));
cp
return;
}
cp
return;
}
@@
-1115,7
+1111,6
@@
void terminate_connection(connection_t *cl)
connection_t *p;
subnet_t *subnet;
rbl_t *rbl;
connection_t *p;
subnet_t *subnet;
rbl_t *rbl;
-
cp
if(cl->status.remove)
return;
cp
if(cl->status.remove)
return;
@@
-1131,7
+1126,6
@@
cp
if(cl->status.meta)
close(cl->meta_socket);
if(cl->status.meta)
close(cl->meta_socket);
-cp
/* Find all connections that were lost because they were behind cl
(the connection that was dropped). */
/* Find all connections that were lost because they were behind cl
(the connection that was dropped). */
@@
-1419,8
+1413,6
@@
cp
if(FD_ISSET(tap_fd, &fset))
handle_tap_input();
}
if(FD_ISSET(tap_fd, &fset))
handle_tap_input();
}
-
- check_children();
}
cp
}
}
cp
}