make update data api return an result

This commit is contained in:
Vincent Sanders 2017-03-08 13:13:21 +00:00
parent 670110b171
commit b78887c7c8
2 changed files with 8 additions and 4 deletions

View File

@ -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;
}

View File

@ -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);
/**