mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
make update data api return an result
This commit is contained in:
parent
670110b171
commit
b78887c7c8
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user