- conn_list_t *p;
-
-cp
- if(cl->status.remove)
- return;
-
- if(debug_lvl >= DEBUG_CONNECTIONS)
- syslog(LOG_NOTICE, _("Closing connection with %s (%s)"),
- cl->name, cl->hostname);
-
- if(cl->socket)
- close(cl->socket);
- if(cl->status.meta)
- close(cl->meta_socket);
-
- cl->status.remove = 1;
-
- /* If this cl isn't active, don't send any DEL_HOSTs. */
-
-/* FIXME: reprogram this.
- if(cl->status.active)
- notify_others(cl,NULL,send_del_host);
-*/
-
-cp
- /* Find all connections that were lost because they were behind cl
- (the connection that was dropped). */
- if(cl->status.meta)
- for(p = conn_list; p != NULL; p = p->next)
- {
- if((p->nexthop == cl) && (p != cl))
- {
- if(cl->status.active && p->status.active)
-/* FIXME: reprogram this
- notify_others(p,cl,send_del_host);
-*/;
- if(cl->socket)
- close(cl->socket);
- p->status.active = 0;
- p->status.remove = 1;
- }
- }
-
- cl->status.active = 0;
-
- if(cl->status.outgoing)
- {
- signal(SIGALRM, sigalrm_handler);
- seconds_till_retry = 5;
- alarm(seconds_till_retry);
- syslog(LOG_NOTICE, _("Trying to re-establish outgoing connection in 5 seconds"));
- }
-cp