diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-16 16:10:43 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-16 16:10:43 +0000 |
commit | 92949389760ddbc13d4f5b75ea77bba0003cf21a (patch) | |
tree | d56fcad0b4d3c172e3a9b80bfd9fc92f09827205 /content | |
parent | 7f75f866616443a9842a285b503253b253cda533 (diff) | |
download | netsurf-92949389760ddbc13d4f5b75ea77bba0003cf21a.tar.gz netsurf-92949389760ddbc13d4f5b75ea77bba0003cf21a.tar.bz2 |
Extent cookie_update API to allow notification of deleted domains. Fix nodes not being re-calculated.
svn path=/trunk/netsurf/; revision=2765
Diffstat (limited to 'content')
-rw-r--r-- | content/urldb.c | 14 | ||||
-rw-r--r-- | content/urldb.h | 3 |
2 files changed, 9 insertions, 8 deletions
diff --git a/content/urldb.c b/content/urldb.c index 6d51c932d..11cfe2ca8 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -188,10 +188,10 @@ static bool urldb_iterate_partial_path(const struct path_data *parent, const struct url_data *data)); static bool urldb_iterate_entries_host(struct search_node *parent, bool (*url_callback)(const char *url, const struct url_data *data), - bool (*cookie_callback)(const struct cookie_data *data)); + bool (*cookie_callback)(const char *domain, const struct cookie_data *data)); static bool urldb_iterate_entries_path(const struct path_data *parent, bool (*url_callback)(const char *url, const struct url_data *data), - bool (*cookie_callback)(const struct cookie_data *data)); + bool (*cookie_callback)(const char *domain, const struct cookie_data *data)); /* Insertion */ static struct host_part *urldb_add_host_node(const char *part, @@ -1309,7 +1309,7 @@ void urldb_iterate_entries(bool (*callback)(const char *url, * * \param callback Function to callback for each entry */ -void urldb_iterate_cookies(bool (*callback)(const struct cookie_data *data)) +void urldb_iterate_cookies(bool (*callback)(const char *domain, const struct cookie_data *data)) { int i; @@ -1332,7 +1332,7 @@ void urldb_iterate_cookies(bool (*callback)(const struct cookie_data *data)) */ bool urldb_iterate_entries_host(struct search_node *parent, bool (*url_callback)(const char *url, const struct url_data *data), - bool (*cookie_callback)(const struct cookie_data *data)) + bool (*cookie_callback)(const char *domain, const struct cookie_data *data)) { if (parent == &empty) return true; @@ -1364,7 +1364,7 @@ bool urldb_iterate_entries_host(struct search_node *parent, */ bool urldb_iterate_entries_path(const struct path_data *parent, bool (*url_callback)(const char *url, const struct url_data *data), - bool (*cookie_callback)(const struct cookie_data *data)) + bool (*cookie_callback)(const char *domain, const struct cookie_data *data)) { const struct path_data *p; @@ -1384,7 +1384,7 @@ bool urldb_iterate_entries_path(const struct path_data *parent, (const struct url_data *) &parent->urld)) return false; } else { - if (parent->cookies && !cookie_callback( + if (parent->cookies && !cookie_callback(parent->cookies->domain, (const struct cookie_data *) parent->cookies)) return false; } @@ -2619,7 +2619,7 @@ bool urldb_set_cookie(const char *header, const char *url) /* Now insert into database */ if (!urldb_insert_cookie(c, scheme, urlt)) goto error; - cookies_update((struct cookie_data *)c); + cookies_update(c->domain, (struct cookie_data *)c); } while (cur < end); free(host); diff --git a/content/urldb.h b/content/urldb.h index ec08bb2b1..699c89674 100644 --- a/content/urldb.h +++ b/content/urldb.h @@ -87,7 +87,8 @@ void urldb_iterate_partial(const char *prefix, /* Iteration */ void urldb_iterate_entries(bool (*callback)(const char *url, const struct url_data *data)); -void urldb_iterate_cookies(bool (*callback)(const struct cookie_data *cookie)); +void urldb_iterate_cookies(bool (*callback)(const char *domain, + const struct cookie_data *cookie)); /* Debug */ void urldb_dump(void); |