projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove checkpoint tracing.
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
8af464b
..
da5be4e
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-46,15
+46,12
@@
time_t now = 0;
/* Purge edges and subnets of unreachable nodes. Use carefully. */
/* Purge edges and subnets of unreachable nodes. Use carefully. */
-static void purge(void)
-{
+static void purge(void) {
avl_node_t *nnode, *nnext, *enode, *enext, *snode, *snext;
node_t *n;
edge_t *e;
subnet_t *s;
avl_node_t *nnode, *nnext, *enode, *enext, *snode, *snext;
node_t *n;
edge_t *e;
subnet_t *s;
- cp();
-
ifdebug(PROTOCOL) logger(LOG_DEBUG, _("Purging unreachable nodes"));
/* Remove all edges and subnets owned by unreachable nodes. */
ifdebug(PROTOCOL) logger(LOG_DEBUG, _("Purging unreachable nodes"));
/* Remove all edges and subnets owned by unreachable nodes. */
@@
-110,14
+107,11
@@
static void purge(void)
put all file descriptors in an fd_set array
While we're at it, purge stuff that needs to be removed.
*/
put all file descriptors in an fd_set array
While we're at it, purge stuff that needs to be removed.
*/
-static int build_fdset(fd_set *readset, fd_set *writeset)
-{
+static int build_fdset(fd_set *readset, fd_set *writeset) {
avl_node_t *node, *next;
connection_t *c;
int i, max = 0;
avl_node_t *node, *next;
connection_t *c;
int i, max = 0;
- cp();
-
FD_ZERO(readset);
FD_ZERO(writeset);
FD_ZERO(readset);
FD_ZERO(writeset);
@@
-162,10
+156,7
@@
static int build_fdset(fd_set *readset, fd_set *writeset)
- Check if we need to retry making an outgoing connection
- Deactivate the host
*/
- Check if we need to retry making an outgoing connection
- Deactivate the host
*/
-void terminate_connection(connection_t *c, bool report)
-{
- cp();
-
+void terminate_connection(connection_t *c, bool report) {
if(c->status.remove)
return;
if(c->status.remove)
return;
@@
-226,13
+217,10
@@
void terminate_connection(connection_t *c, bool report)
end does not reply in time, we consider them dead
and close the connection.
*/
end does not reply in time, we consider them dead
and close the connection.
*/
-static void check_dead_connections(void)
-{
+static void check_dead_connections(void) {
avl_node_t *node, *next;
connection_t *c;
avl_node_t *node, *next;
connection_t *c;
- cp();
-
for(node = connection_tree->head; node; node = next) {
next = node->next;
c = node->data;
for(node = connection_tree->head; node; node = next) {
next = node->next;
c = node->data;
@@
-282,16
+270,13
@@
static void check_dead_connections(void)
check all connections to see if anything
happened on their sockets
*/
check all connections to see if anything
happened on their sockets
*/
-static void check_network_activity(fd_set * readset, fd_set * writeset)
-{
+static void check_network_activity(fd_set * readset, fd_set * writeset) {
connection_t *c;
avl_node_t *node;
int result, i;
socklen_t len = sizeof(result);
vpn_packet_t packet;
connection_t *c;
avl_node_t *node;
int result, i;
socklen_t len = sizeof(result);
vpn_packet_t packet;
- cp();
-
/* check input from kernel */
if(device_fd >= 0 && FD_ISSET(device_fd, readset)) {
if(read_packet(&packet)) {
/* check input from kernel */
if(device_fd >= 0 && FD_ISSET(device_fd, readset)) {
if(read_packet(&packet)) {
@@
-350,16
+335,13
@@
static void check_network_activity(fd_set * readset, fd_set * writeset)
/*
this is where it all happens...
*/
/*
this is where it all happens...
*/
-int main_loop(void)
-{
+int main_loop(void) {
fd_set readset, writeset;
struct timeval tv;
int r, maxfd;
time_t last_ping_check, last_config_check, last_graph_dump;
event_t *event;
fd_set readset, writeset;
struct timeval tv;
int r, maxfd;
time_t last_ping_check, last_config_check, last_graph_dump;
event_t *event;
- cp();
-
last_ping_check = now;
last_config_check = now;
last_graph_dump = now;
last_ping_check = now;
last_config_check = now;
last_graph_dump = now;
@@
-389,7
+371,6
@@
int main_loop(void)
if(errno != EINTR && errno != EAGAIN) {
logger(LOG_ERR, _("Error while waiting for input: %s"),
strerror(errno));
if(errno != EINTR && errno != EAGAIN) {
logger(LOG_ERR, _("Error while waiting for input: %s"),
strerror(errno));
- cp_trace();
dump_connections();
return 1;
}
dump_connections();
return 1;
}