Revision: 14420
Author: adrian.chadd
Date: Fri Feb 19 05:45:55 2010
Log: Rename client_tree to client_v4_tree in preparation for some IPv4
client-db work.
http://code.google.com/p/lusca-cache/source/detail?r=14420
Modified:
/branches/LUSCA_HEAD/src/client_db.c
=======================================
--- /branches/LUSCA_HEAD/src/client_db.c Fri Nov 13 00:29:46 2009
+++ /branches/LUSCA_HEAD/src/client_db.c Fri Feb 19 05:45:55 2010
@@ -61,7 +61,7 @@
typedef struct _ClientInfo ClientInfo;
-static radix_tree_t *client_tree = NULL;
+static radix_tree_t *client_v4_tree = NULL;
dlink_list client_list;
static ClientInfo *clientdbAdd(struct in_addr addr);
@@ -85,7 +85,7 @@
Init_Prefix(&p, AF_INET, &addr, 32);
c = memPoolAlloc(pool_client_info);
c->addr = addr;
- rn = radix_lookup(client_tree, &p);
+ rn = radix_lookup(client_v4_tree, &p);
rn->data = c;
dlinkAddTail(c, &c->node, &client_list);
statCounter.client_http.clients++;
@@ -106,9 +106,9 @@
void
clientdbInit(void)
{
- if (client_tree)
+ if (client_v4_tree)
return;
- client_tree = New_Radix();
+ client_v4_tree = New_Radix();
cachemgrRegister("client_list", "Cache Client List", clientdbDump, 0,
1);
}
@@ -123,7 +123,7 @@
return;
Init_Prefix(&pr, AF_INET, &addr, 32);
- rn = radix_search_exact(client_tree, &pr);
+ rn = radix_search_exact(client_v4_tree, &pr);
if (rn)
c = rn->data;
@@ -164,7 +164,7 @@
if (!Config.onoff.client_db)
return 0;
Init_Prefix(&p, AF_INET, &addr, 32);
- rn = radix_search_exact(client_tree, &p);
+ rn = radix_search_exact(client_v4_tree, &p);
if (rn)
c = rn->data;
if (c == NULL)
@@ -190,7 +190,7 @@
return 0;
Init_Prefix(&pr, AF_INET, &addr, 32);
- rn = radix_search_exact(client_tree, &pr);
+ rn = radix_search_exact(client_v4_tree, &pr);
if (rn)
c = rn->data;
@@ -280,7 +280,7 @@
bzero(&ci, sizeof(ci));
storeAppendPrintf(sentry, "Cache Clients:\n");
- RADIX_WALK(client_tree->head, rn) {
+ RADIX_WALK(client_v4_tree->head, rn) {
c = rn->data;
clientdbDumpEntry(sentry, c, &ci);
} RADIX_WALK_END;
@@ -311,8 +311,8 @@
void
clientdbFreeMemory(void)
{
- Destroy_Radix(client_tree, clientdbFreeItemRadix, NULL);
- client_tree = NULL;
+ Destroy_Radix(client_v4_tree, clientdbFreeItemRadix, NULL);
+ client_v4_tree = NULL;
}
static void
@@ -345,9 +345,9 @@
continue;
Init_Prefix(&p, AF_INET, &c->addr, 32);
- rn = radix_search_exact(client_tree, &p);
+ rn = radix_search_exact(client_v4_tree, &p);
rn->data = NULL;
- radix_remove(client_tree, rn);
+ radix_remove(client_v4_tree, rn);
clientdbFreeItem(c);
cleanup_removed++;
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.