/*
- * $Id: client_db.cc,v 1.28 1998/03/27 04:15:37 wessels Exp $
+ * $Id: client_db.cc,v 1.29 1998/03/27 05:36:55 wessels Exp $
*
* DEBUG: section 0 Client Database
* AUTHOR: Duane Wessels
else {
snprintf(key, 15, "%d.%d.%d.%d", Oid[0], Oid[1], Oid[2], Oid[3]);
c = (ClientInfo *) hash_lookup(client_table, key);
- if (!c)
- return 0;
- c = (ClientInfo *) hash_next(client_table);
+ if (NULL != c)
+ c = c->next;
}
if (!c)
return 0;
/*
- * $Id: net_db.cc,v 1.79 1998/03/27 04:15:38 wessels Exp $
+ * $Id: net_db.cc,v 1.80 1998/03/27 05:36:56 wessels Exp $
*
* DEBUG: section 37 Network Measurement Database
* AUTHOR: Duane Wessels
} else {
snprintf(key, 15, "%d.%d.%d.%d", Oid[0], Oid[1], Oid[2], Oid[3]);
c = (netdbEntry *) hash_lookup(addr_table, key);
- if (!c)
- return 0;
- debug(49, 8) ("netdbGetRowFn: [%s] found\n", key);
- c = (netdbEntry *) hash_next(addr_table);
+ if (NULL != c) {
+ debug(49, 8) ("netdbGetRowFn: [%s] found\n", key);
+ c = c->next;
+ }
if (!c)
debug(49, 8) ("netdbGetRowFn: next does not exist!\n");
}
};
struct _netdbEntry {
+ /* first two items must be equivalent to hash_link in hash.h */
char *key;
netdbEntry *next;
char network[16];
};
struct _ClientInfo {
+ /* first two items must be equivalent to hash_link in hash.h */
char *key;
struct client_info *next;
struct in_addr addr;