summaryrefslogtreecommitdiff
path: root/libpurple/protocols/facebook/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpurple/protocols/facebook/http.c')
-rw-r--r--libpurple/protocols/facebook/http.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/libpurple/protocols/facebook/http.c b/libpurple/protocols/facebook/http.c
index 473f434b8b..86ff94c304 100644
--- a/libpurple/protocols/facebook/http.c
+++ b/libpurple/protocols/facebook/http.c
@@ -233,11 +233,7 @@ gboolean
fb_http_urlcmp(const gchar *url1, const gchar *url2, gboolean protocol)
{
gboolean ret = TRUE;
-#if SOUP_MAJOR_VERSION >= 3
GUri *uri1, *uri2;
-#else
- SoupURI *uri1, *uri2;
-#endif
if ((url1 == NULL) || (url2 == NULL)) {
return url1 == url2;
@@ -247,7 +243,6 @@ fb_http_urlcmp(const gchar *url1, const gchar *url2, gboolean protocol)
return TRUE;
}
-#if SOUP_MAJOR_VERSION >= 3
uri1 = g_uri_parse(url1, SOUP_HTTP_URI_FLAGS, NULL);
if (uri1 == NULL) {
return g_ascii_strcasecmp(url1, url2) == 0;
@@ -277,33 +272,11 @@ fb_http_urlcmp(const gchar *url1, const gchar *url2, gboolean protocol)
g_uri_unref(uri2);
uri2 = tmp;
}
-#else
- uri1 = soup_uri_new(url1);
- if (uri1 == NULL) {
- return g_ascii_strcasecmp(url1, url2) == 0;
- }
-
- uri2 = soup_uri_new(url2);
- if (uri2 == NULL) {
- soup_uri_free(uri1);
- return g_ascii_strcasecmp(url1, url2) == 0;
- }
-
- if (!protocol) {
- /* Force the same scheme (and same port). */
- soup_uri_set_scheme(uri1, SOUP_URI_SCHEME_HTTPS);
- soup_uri_set_scheme(uri2, SOUP_URI_SCHEME_HTTPS);
- }
-#endif
ret = soup_uri_equal(uri1, uri2);
-#if SOUP_MAJOR_VERSION >= 3
g_uri_unref(uri1);
g_uri_unref(uri2);
-#else
- soup_uri_free(uri1);
- soup_uri_free(uri2);
-#endif
+
return ret;
}