/*
connection.c -- connection list management
- Copyright (C) 2000-2003 Guus Sliepen <guus@sliepen.eu.org>,
- 2000-2003 Ivo Timmermans <ivo@o2w.nl>
+ Copyright (C) 2000-2004 Guus Sliepen <guus@tinc-vpn.org>,
+ 2000-2004 Ivo Timmermans <ivo@tinc-vpn.org>
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.42 2003/07/24 12:08:15 guus Exp $
+ $Id$
*/
#include "system.h"
cp();
- c = (connection_t *) xmalloc_and_zero(sizeof(connection_t));
+ c = xmalloc_and_zero(sizeof(connection_t));
if(!c)
return NULL;
logger(LOG_DEBUG, _("Connections:"));
for(node = connection_tree->head; node; node = node->next) {
- c = (connection_t *) node->data;
+ c = node->data;
logger(LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x"),
- c->name, c->hostname, c->options, c->socket, c->status);
+ c->name, c->hostname, c->options, c->socket, *(uint32_t *)&c->status);
}
logger(LOG_DEBUG, _("End of connections."));