fs newcell mostly-broken
Nickolai Zeldovich
kolya at mit.edu
Sat Jul 7 22:15:07 CEST 2001
At the moment, "fs newcell" in arla sets the "name" field of the
cell_db_entry's to NULL. This causes updatehosts() to crash when
trying to strcmp the host fields in host_sort().
The patch below changes host_sort() to compare based on IP address
rather than hostname -- the actual ordering doesn't really matter,
as far as I can tell.
-- kolya
--- lib/ko/kocell.c 2001/05/06 22:40:50 1.47.2.2
+++ lib/ko/kocell.c 2001/07/07 20:05:50
@@ -221,7 +221,7 @@
return -1;
if (b->timeout == CELL_INVALID_HOST)
return 1;
- return strcmp(a->name, b->name);
+ return htonl(a->addr.s_addr) - htonl(a->addr.s_addr);
}
/*
More information about the Arla-drinkers
mailing list