summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-09-02 18:14:32 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-09-03 12:17:28 +0200
commit5fdf8b176b59bdaef7fe36b6f6e02d863d261261 (patch)
tree0999a1cbb16cd983200b39aa4f0b9fb9b37da851
parente36c4e0b9931167e3fb41abb994e19d18ed01ad7 (diff)
lastfm: Fix function setting regression
Since commit c66b6d, RestProxyCall::url is regenerated after calling the RestProxyCall::prepare virtual method. This breaks the lastfm code as it needs to reset RestProxyCall::url in order to remove the function from it. It used to do that by directly accessing RestProxyCall private data. Since c66b6d, this can be solved using only public methods as if the function is reset on the RestProxyCall in ::prepare, ::url will be regenerated to reflect that after ::prepare and ::serialize_params have been called. https://bugzilla.gnome.org/show_bug.cgi?id=708359 (cherry picked from commit 1d71e83ac3ff7baaee43e0e66daaeeecb4ba96b4)
-rw-r--r--rest-extras/lastfm-proxy-call.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rest-extras/lastfm-proxy-call.c b/rest-extras/lastfm-proxy-call.c
index 5e04038..f4bba60 100644
--- a/rest-extras/lastfm-proxy-call.c
+++ b/rest-extras/lastfm-proxy-call.c
@@ -44,14 +44,15 @@ _prepare (RestProxyCall *call, GError **error)
priv = LASTFM_PROXY_GET_PRIVATE (proxy);
call_priv = call->priv;
- /* First reset the URL because Lastfm puts the function in the parameters */
- call_priv->url = g_strdup (_rest_proxy_get_bound_url (REST_PROXY (proxy)));
rest_proxy_call_add_params (call,
"method", call_priv->function,
"api_key", priv->api_key,
NULL);
+ /* Reset function because Lastfm puts the function in the parameters */
+ rest_proxy_call_set_function (call, NULL);
+
if (priv->session_key)
rest_proxy_call_add_param (call, "sk", priv->session_key);