summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/urldb.c9
-rw-r--r--content/urldb.h11
2 files changed, 12 insertions, 8 deletions
diff --git a/content/urldb.c b/content/urldb.c
index 2c2ba151c..b795ac3f4 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -3070,17 +3070,20 @@ nserror urldb_save(const char *filename)
/* exported interface documented in content/urldb.h */
-void urldb_set_url_persistence(nsurl *url, bool persist)
+nserror urldb_set_url_persistence(nsurl *url, bool persist)
{
struct path_data *p;
assert(url);
p = urldb_find_url(url);
- if (!p)
- return;
+ if (!p) {
+ return NSERROR_NOT_FOUND;
+ }
p->persistent = persist;
+
+ return NSERROR_OK;
}
diff --git a/content/urldb.h b/content/urldb.h
index 734b94a0e..e3162916d 100644
--- a/content/urldb.h
+++ b/content/urldb.h
@@ -21,8 +21,8 @@
* Unified URL information database internal interface.
*/
-#ifndef _NETSURF_CONTENT_URLDB_H_
-#define _NETSURF_CONTENT_URLDB_H_
+#ifndef NETSURF_CONTENT_URLDB_H
+#define NETSURF_CONTENT_URLDB_H
#include <libwapcaplet/libwapcaplet.h>
@@ -40,8 +40,9 @@ void urldb_destroy(void);
*
* \param url Absolute URL to persist
* \param persist True to persist, false otherwise
+ * \return NSERROR_OK on success or NSERROR_NOT_FOUND if url not in database
*/
-void urldb_set_url_persistence(struct nsurl *url, bool persist);
+nserror urldb_set_url_persistence(struct nsurl *url, bool persist);
/**
@@ -113,7 +114,7 @@ bool urldb_get_cert_permissions(struct nsurl *url);
*
* \param url Absolute URL to consider
* \param bitmap Opaque pointer to thumbnail data, or NULL to invalidate
- * \return true on sucessful setting else false
+ * \return true on successful setting else false
*/
bool urldb_set_thumbnail(struct nsurl *url, struct bitmap *bitmap);
@@ -123,7 +124,7 @@ bool urldb_set_thumbnail(struct nsurl *url, struct bitmap *bitmap);
*
* \param header Header to parse, with Set-Cookie: stripped
* \param url URL being fetched
- * \param referer Referring resource, or 0 for verifiable transaction
+ * \param referrer Referring resource, or 0 for verifiable transaction
* \return true on success, false otherwise
*/
bool urldb_set_cookie(const char *header, struct nsurl *url, struct nsurl *referer);