+ /* Okay, before we active the connection, we check if there is another entry
+ in the connection list with the same vpn_ip. If so, it presumably is an
+ old connection that has timed out but we don't know it yet.
+ */
+
+ while(old = lookup_conn(cl->vpn_ip))
+ {
+ syslog(LOG_NOTICE, _("Removing old entry for %s at %s in favour of new connection from %s"),
+ cl->vpn_hostname, old->real_hostname, cl->real_hostname);
+ old->status.active = 0;
+ terminate_connection(old);
+ }
+
+ cl->status.active = 1;
+
+ if(debug_lvl > 0)
+ syslog(LOG_NOTICE, _("Connection with %s (%s) activated"),
+ cl->vpn_hostname, cl->real_hostname);
+
+ notify_others(cl, NULL, send_add_host);
+ notify_one(cl);
+ }