summaryrefslogtreecommitdiff
path: root/libyelp/yelp-uri.h
diff options
context:
space:
mode:
authorRupert Swarbrick <rswarbrick@gmail.com>2010-06-10 00:34:22 +0100
committerShaun McCance <shaunm@gnome.org>2010-06-10 08:57:37 -0500
commit78f0d500bae2d95e29d09a1571aff7adf4a830be (patch)
tree4a6c9ec9e84cc09bd668180ef69f2be76fe64acd /libyelp/yelp-uri.h
parent8c60d0b4a158668202b4fde5c559d654c1afb7aa (diff)
downloadyelp-78f0d500bae2d95e29d09a1571aff7adf4a830be.tar.gz
Don't segfault on http:// uri's.
This was caused by uri's that came out as YELP_URI_DOCUMENT_TYPE_EXTERNAL getting a document_uri of NULL. Then this got inserted into several hashtables, whose hash function required (non-null) strings. A fix is to use the canonical uri if document_uri is NULL.
Diffstat (limited to 'libyelp/yelp-uri.h')
-rw-r--r--libyelp/yelp-uri.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libyelp/yelp-uri.h b/libyelp/yelp-uri.h
index 81612619..13aa73bb 100644
--- a/libyelp/yelp-uri.h
+++ b/libyelp/yelp-uri.h
@@ -73,6 +73,8 @@ void yelp_uri_resolve (YelpUri *uri);
gboolean yelp_uri_is_resolved (YelpUri *uri);
YelpUriDocumentType yelp_uri_get_document_type (YelpUri *uri);
+/* Both of these functions return a non-null answer, provided that
+ * the uri has been resolved. */
gchar * yelp_uri_get_canonical_uri (YelpUri *uri);
gchar * yelp_uri_get_document_uri (YelpUri *uri);