Fixed typos. When terminating a connection, it's status is not only set to

remove=1 but also active=0.
This commit is contained in:
Guus Sliepen 2000-05-27 19:23:20 +00:00
parent e4ff969a98
commit 028659bfbf
3 changed files with 7 additions and 6 deletions

View file

@ -826,6 +826,7 @@ cp
syslog(LOG_NOTICE, "Try to re-establish outgoing connection in 5 seconds."); syslog(LOG_NOTICE, "Try to re-establish outgoing connection in 5 seconds.");
} }
cl->status.active = 0;
cl->status.remove = 1; cl->status.remove = 1;
cp cp
} }

View file

@ -46,10 +46,10 @@ conn_list_t *lookup_conn(ip_t ip)
cp cp
/* Exact match suggested by James B. MacLean */ /* Exact match suggested by James B. MacLean */
for(p = conn_list; p != NULL; p = p->next) for(p = conn_list; p != NULL; p = p->next)
if((ip == p->vpn_ip) && p->active) if((ip == p->vpn_ip) && p->status.active)
return p; return p;
for(p = conn_list; p != NULL; p = p->next) for(p = conn_list; p != NULL; p = p->next)
if(((ip & p->vpn_mask) == (p->vpn_ip & p->vpn_mask)) && p->active) if(((ip & p->vpn_mask) == (p->vpn_ip & p->vpn_mask)) && p->status.active)
return p; return p;
cp cp
return NULL; return NULL;

View file

@ -188,7 +188,7 @@ void send_key_changed_all(void)
conn_list_t *p; conn_list_t *p;
cp cp
for(p = conn_list; p != NULL; p = p->next) for(p = conn_list; p != NULL; p = p->next)
if(p->status.meta && p->active) if(p->status.meta && p->status.active)
send_key_changed(p, myself); send_key_changed(p, myself);
cp cp
} }
@ -332,7 +332,7 @@ int notify_others(conn_list_t *new, conn_list_t *source,
conn_list_t *p; conn_list_t *p;
cp cp
for(p = conn_list; p != NULL; p = p->next) for(p = conn_list; p != NULL; p = p->next)
if(p != new && p != source && p->status.meta && p->active) if(p != new && p != source && p->status.meta && p->status.active)
function(p, new); function(p, new);
cp cp
return 0; return 0;
@ -347,7 +347,7 @@ int notify_one(conn_list_t *new)
conn_list_t *p; conn_list_t *p;
cp cp
for(p = conn_list; p != NULL; p = p->next) for(p = conn_list; p != NULL; p = p->next)
if(p != new && p->active) if(p != new && p->status.active)
send_add_host(new, p); send_add_host(new, p);
cp cp
return 0; return 0;
@ -453,7 +453,7 @@ cp
old connection that has timed out but we don't know it yet. Because our old connection that has timed out but we don't know it yet. Because our
conn_list entry is not active, lookup_conn will skip ourself. */ conn_list entry is not active, lookup_conn will skip ourself. */
if(old=lookup_conn(cl->vpn_ip)) while(old=lookup_conn(cl->vpn_ip))
terminate_connection(old); terminate_connection(old);
cl->status.active = 1; cl->status.active = 1;