Revision: 14888
Author: adrian.chadd
Date: Sun Jul 10 02:23:22 2011
Log: Try to init/free all the relevant peer setup stuff.
http://code.google.com/p/lusca-cache/source/detail?r=14888
Modified:
/playpen/LUSCA_HEAD_ipv6/src/cache_cf.c
/playpen/LUSCA_HEAD_ipv6/src/neighbors.c
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/cache_cf.c Sat Jul 9 19:10:58 2011
+++ /playpen/LUSCA_HEAD_ipv6/src/cache_cf.c Sun Jul 10 02:23:22 2011
@@ -1923,6 +1923,7 @@
p->sslContext = sslCreateClientContext(p->sslcert, p->sslkey,
p->sslversion, p->sslcipher, p->ssloptions, p->sslflags, p->sslcafile,
p->sslcapath, p->sslcrlfile);
}
#endif
+ sqinet_init(&p->addr);
while (*head != NULL)
head = &(*head)->next;
*head = p;
@@ -1935,6 +1936,8 @@
static void
free_peer(peer ** P)
{
+ int i;
+
peer *p;
while ((p = *P) != NULL) {
*P = p->next;
@@ -1946,6 +1949,9 @@
cbdataUnlock(pd);
}
#endif
+ sqinet_done(&p->addr);
+ for (i = 0; i < p->n_addresses; i++)
+ sqinet_done(&p->addresses[i]);
cbdataFree(p);
}
Config.npeers = 0;
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/neighbors.c Sun Jul 10 02:19:03 2011
+++ /playpen/LUSCA_HEAD_ipv6/src/neighbors.c Sun Jul 10 02:23:22 2011
@@ -985,6 +985,7 @@
peerDestroy(void *data)
{
peer *p = data;
+ int i;
struct _domain_ping *l = NULL;
struct _domain_ping *nl = NULL;
if (p == NULL)
@@ -996,6 +997,9 @@
}
aclDestroyAccessList(&p->access);
sqinet_done(&p->addr);
+ for (i = 0; i < p->n_addresses; i++)
+ sqinet_done(&p->addresses[i]);
+
safe_free(p->host);
safe_free(p->name);
safe_free(p->domain);
--
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.