/*
connection.c -- connection list management
- Copyright (C) 2000 Guus Sliepen <guus@sliepen.warande.net>,
- 2000 Ivo Timmermans <itimmermans@bigfoot.com>
+ Copyright (C) 2000,2001 Guus Sliepen <guus@sliepen.warande.net>,
+ 2000,2001 Ivo Timmermans <itimmermans@bigfoot.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: connection.c,v 1.1.2.7 2001/01/05 23:53:49 guus Exp $
+ $Id: connection.c,v 1.1.2.9 2001/01/07 17:08:56 guus Exp $
*/
#include "config.h"
#include <syslog.h>
#include <avl_tree.h>
+#include <list.h>
#include "net.h" /* Don't ask. */
#include "netutl.h"
connection_t *p = (connection_t *)xmalloc_and_zero(sizeof(*p));
cp
p->subnet_tree = avl_alloc_tree((avl_compare_t)subnet_compare, NULL);
+ p->queue = list_alloc((list_action_t)free);
cp
return p;
}
void free_connection(connection_t *p)
{
cp
- if(p->sq)
- destroy_queue(p->sq);
- if(p->rq)
- destroy_queue(p->rq);
+ if(p->queue)
+ list_delete_list(p->queue);
if(p->name && p->name!=unknown)
free(p->name);
if(p->hostname)