From 5351f657fcc4a03bed54e71f26246e96785e2895 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 12 Jan 2016 11:25:58 +0100 Subject: [PATCH] Fix: refresh_token now gets updated correctly A refresh token in the response incorrectly set the access token with the received value. --- src/matrix-http-api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index f4b9bc3..c3f0a68 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -346,7 +346,7 @@ i_set_refresh_token(MatrixAPI *api, const gchar *refresh_token) MATRIX_HTTP_API(api)); g_free(priv->refresh_token); - priv->token = g_strdup(refresh_token); + priv->refresh_token = g_strdup(refresh_token); } static const gchar * @@ -470,8 +470,7 @@ _response_callback(SoupSession *session, if ((refresh_token = json_node_get_string(node)) != NULL) { g_debug("Got new refresh token: %s", refresh_token); - i_set_refresh_token(MATRIX_API(api), - refresh_token); + i_set_refresh_token(MATRIX_API(api), refresh_token); } }