Use libevent to dump graphs when necessary.
[tinc] / src / net.c
index 8259a36..a1ca9ab 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -301,7 +301,7 @@ int main_loop(void)
 {
        struct timeval tv;
        int r;
-       time_t last_ping_check, last_config_check, last_graph_dump;
+       time_t last_ping_check, last_config_check;
        tevent_t *event;
        struct event timeout;
 
@@ -309,7 +309,6 @@ int main_loop(void)
 
        last_ping_check = now;
        last_config_check = now;
-       last_graph_dump = now;
        
        srand(now);
 
@@ -431,13 +430,6 @@ int main_loop(void)
                        
                        try_outgoing_connections();
                }
-               
-               /* Dump graph if wanted every 60 seconds*/
-
-               if(last_graph_dump + 60 < now) {
-                       dump_graph();
-                       last_graph_dump = now;
-               }
        }
 
        return 0;