summaryrefslogtreecommitdiff
path: root/content/urldb.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-07-13 19:48:45 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-07-13 19:48:45 +0000
commit1fcceb72f680eb9963b519c4b27f89a0977247d5 (patch)
treef9eed2b367c5297cd769ed72b40dbcbbe250e447 /content/urldb.c
parente7747de2e15727331aff6b433bfd11d85ed4fb5a (diff)
downloadnetsurf-1fcceb72f680eb9963b519c4b27f89a0977247d5.tar.gz
netsurf-1fcceb72f680eb9963b519c4b27f89a0977247d5.tar.bz2
Fix url completion
svn path=/trunk/netsurf/; revision=2743
Diffstat (limited to 'content/urldb.c')
-rw-r--r--content/urldb.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/content/urldb.c b/content/urldb.c
index 5cc56d26c..05c97c6ac 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -1375,15 +1375,19 @@ bool urldb_iterate_entries_path(const struct path_data *parent,
* attached to them. If this is not the case, it indicates
* that there's a bug in the file loader/URL insertion code.
* Therefore, assert this here. */
- assert(parent->url || parent->cookies);
+ assert(url_callback || cookie_callback);
/** \todo handle fragments? */
- if (url_callback && parent->url && !url_callback(parent->url,
- (const struct url_data *) &parent->urld))
- return false;
- if (cookie_callback && parent->cookies && !cookie_callback(
- (const struct cookie_data *) parent->cookies))
- return false;
+ if (url_callback) {
+ assert(parent->url);
+ if (!url_callback(parent->url,
+ (const struct url_data *) &parent->urld))
+ return false;
+ } else {
+ if (parent->cookies && !cookie_callback(
+ (const struct cookie_data *) parent->cookies))
+ return false;
+ }
}
for (p = parent->children; p; p = p->next) {