summaryrefslogtreecommitdiff
path: root/rest/rest-proxy-call.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-09-02 16:23:32 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-09-03 10:22:23 +0200
commit55f8e9626a50d81fb893508698205057668bf792 (patch)
treedd48d37dd9a0e06cf281145f749084f17f188295 /rest/rest-proxy-call.c
parent1d71e83ac3ff7baaee43e0e66daaeeecb4ba96b4 (diff)
downloadlibrest-55f8e9626a50d81fb893508698205057668bf792.tar.gz
oauth: Make sure RestProxyCall::url is set before using it
The oauth "prepare" step needs RestProxyCall::url to be set, but since commit c66b6d this is only set after the "prepare" and "serialize_headers" methods have been called. As it's better if OAuthProxyCall do not directly access RestProxyCall private data, this commit adds a getter to RestProxyCall which will be used to make sure RestProxyCall::url is set when OAuthProxyCall::prepare needs it. https://bugzilla.gnome.org/show_bug.cgi?id=708359
Diffstat (limited to 'rest/rest-proxy-call.c')
-rw-r--r--rest/rest-proxy-call.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 22de07d..3339d47 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -1607,3 +1607,14 @@ rest_proxy_call_serialize_params (RestProxyCall *call,
return FALSE;
}
+
+G_GNUC_INTERNAL const char *
+rest_proxy_call_get_url (RestProxyCall *call)
+{
+ /* Ensure priv::url is current before returning it. This method is used
+ * by OAuthProxyCall::_prepare which expects set_url() to have been called,
+ * but this has been changed/broken by c66b6df
+ */
+ set_url(call);
+ return call->priv->url;
+}