changeset 1630:00e22d98bce8

my testcases aren't smart enough for remove_fast on a domain's cookies Nothing wrong with it in principle, but...
author corvid <corvid@lavabit.com>
date Mon, 22 Mar 2010 01:11:39 +0000
parents c6f07a1455bc
children ec05ef8ca40c
files dpi/cookies.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/cookies.c	Mon Mar 22 01:01:44 2010 +0000
+++ b/dpi/cookies.c	Mon Mar 22 01:11:39 2010 +0000
@@ -572,7 +572,7 @@
       if (difftime(c->expires_at, now) < 0) {
          DomainNode *currnode = node ? node :
               dList_find_sorted(domains, c->domain, Domain_node_by_domain_cmp);
-         dList_remove_fast(currnode->cookies, c);
+         dList_remove(currnode->cookies, c);
          if (dList_length(currnode->cookies) == 0)
             Cookies_delete_node(currnode);
          dList_remove_fast(all_cookies, c);
@@ -600,7 +600,7 @@
    if (!node)
       node = dList_find_sorted(domains, lru->domain,Domain_node_by_domain_cmp);
 
-   dList_remove_fast(node->cookies, lru);
+   dList_remove(node->cookies, lru);
    dList_remove_fast(all_cookies, lru);
    Cookies_free_cookie(lru);
    if (dList_length(node->cookies) == 0)
@@ -619,7 +619,7 @@
    if (domain_cookies) {
       /* Remove any cookies with the same name and path */
       while ((c = dList_find_custom(domain_cookies, cookie, Cookies_cmp))) {
-         dList_remove_fast(domain_cookies, c);
+         dList_remove(domain_cookies, c);
          dList_remove_fast(all_cookies, c);
          Cookies_free_cookie(c);
       }
@@ -1171,7 +1171,7 @@
          if (difftime(cookie->expires_at, time(NULL)) < 0) {
             _MSG("Goodbye, expired cookie %s=%s d:%s p:%s\n", cookie->name,
                  cookie->value, cookie->domain, cookie->path);
-            dList_remove_fast(domain_cookies, cookie);
+            dList_remove(domain_cookies, cookie);
             dList_remove_fast(all_cookies, cookie);
             Cookies_free_cookie(cookie);
             --i; continue;