make the urldb content type setting API return an error

This commit is contained in:
Vincent Sanders 2017-03-13 21:55:39 +00:00
parent d55d7f3e1e
commit 27aa56cbf6
2 changed files with 8 additions and 4 deletions

View File

@ -3204,17 +3204,20 @@ nserror urldb_set_url_title(nsurl *url, const char *title)
/* exported interface documented in content/urldb.h */
void urldb_set_url_content_type(nsurl *url, content_type type)
nserror urldb_set_url_content_type(nsurl *url, content_type type)
{
struct path_data *p;
assert(url);
p = urldb_find_url(url);
if (!p)
return;
if (!p) {
return NSERROR_NOT_FOUND;
}
p->urld.type = type;
return NSERROR_OK;
}

View File

@ -69,8 +69,9 @@ nserror urldb_set_url_title(struct nsurl *url, const char *title);
*
* \param url The URL to look for
* \param type The type to set
* \return NSERROR_OK on success or NSERROR_NOT_FOUND if url not in database
*/
void urldb_set_url_content_type(struct nsurl *url, content_type type);
nserror urldb_set_url_content_type(struct nsurl *url, content_type type);
/**