along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: edge.c,v 1.1.2.18 2002/09/10 22:12:33 guus Exp $
+ $Id: edge.c,v 1.1.2.20 2003/07/06 23:16:28 guus Exp $
*/
#include "config.h"
#include <stdio.h>
-#include <syslog.h>
#include <string.h>
#include <avl_tree.h>
#include "subnet.h"
#include "edge.h"
#include "node.h"
+#include "logger.h"
#include "xalloc.h"
#include "system.h"
avl_tree_t *edge_weight_tree; /* Tree with all edges, sorted on weight */
-int edge_compare(edge_t *a, edge_t *b)
+static int edge_compare(edge_t *a, edge_t *b)
{
return strcmp(a->to->name, b->to->name);
}
-int edge_weight_compare(edge_t *a, edge_t *b)
+static int edge_weight_compare(edge_t *a, edge_t *b)
{
int result;
cp();
- syslog(LOG_DEBUG, _("Edges:"));
+ logger(DEBUG_ALWAYS, LOG_DEBUG, _("Edges:"));
for(node = node_tree->head; node; node = node->next) {
n = (node_t *) node->data;
for(node2 = n->edge_tree->head; node2; node2 = node2->next) {
e = (edge_t *) node2->data;
address = sockaddr2hostname(&e->address);
- syslog(LOG_DEBUG, _(" %s to %s at %s options %lx weight %d"),
+ logger(DEBUG_ALWAYS, LOG_DEBUG, _(" %s to %s at %s options %lx weight %d"),
e->from->name, e->to->name, address, e->options, e->weight);
free(address);
}
}
- syslog(LOG_DEBUG, _("End of edges."));
+ logger(DEBUG_ALWAYS, LOG_DEBUG, _("End of edges."));
}