summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/urldb.c9
-rw-r--r--content/urldb.h3
2 files changed, 8 insertions, 4 deletions
diff --git a/content/urldb.c b/content/urldb.c
index b578f2c13..af761837c 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -3033,18 +3033,21 @@ void urldb_set_url_content_type(nsurl *url, content_type type)
/* exported interface documented in content/urldb.h */
-void urldb_update_url_visit_data(nsurl *url)
+nserror urldb_update_url_visit_data(nsurl *url)
{
struct path_data *p;
assert(url);
p = urldb_find_url(url);
- if (!p)
- return;
+ if (!p) {
+ return NSERROR_NOT_FOUND;
+ }
p->urld.last_visit = time(NULL);
p->urld.visits++;
+
+ return NSERROR_OK;
}
diff --git a/content/urldb.h b/content/urldb.h
index 9ff3a8d37..daa54d6cd 100644
--- a/content/urldb.h
+++ b/content/urldb.h
@@ -75,8 +75,9 @@ void urldb_set_url_content_type(struct nsurl *url, content_type type);
* Update an URL's visit data
*
* \param url The URL to update
+ * \return NSERROR_OK on success or NSERROR_NOT_FOUND if url not in database
*/
-void urldb_update_url_visit_data(struct nsurl *url);
+nserror urldb_update_url_visit_data(struct nsurl *url);
/**