From 94c1eec169db66bb4ad9d633342aead3b0f35b9f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 1 May 2012 12:12:37 +0200 Subject: Don’t hardcode passwords MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s a bad idea to hardcode these, although playback does not work with non-android login yet. --- src/libpiano/response.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libpiano/response.c') diff --git a/src/libpiano/response.c b/src/libpiano/response.c index 65af76e..4b33248 100644 --- a/src/libpiano/response.c +++ b/src/libpiano/response.c @@ -103,8 +103,9 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) { size_t decryptedSize; ret = PIANO_RET_ERR; - if ((decryptedTimestamp = PianoDecryptString (cryptedTimestamp, - &decryptedSize)) != NULL && decryptedSize > 4) { + if ((decryptedTimestamp = PianoDecryptString (ph->partner.in, + cryptedTimestamp, &decryptedSize)) != NULL && + decryptedSize > 4) { /* skip four bytes garbage(?) at beginning */ timestamp = strtoul (decryptedTimestamp+4, NULL, 0); ph->timeOffset = realTimestamp - timestamp; @@ -112,9 +113,9 @@ PianoReturn_t PianoResponse (PianoHandle_t *ph, PianoRequest_t *req) { } free (decryptedTimestamp); /* get auth token */ - ph->partnerAuthToken = PianoJsonStrdup (result, + ph->partner.authToken = PianoJsonStrdup (result, "partnerAuthToken"); - ph->partnerId = json_object_get_int ( + ph->partner.id = json_object_get_int ( json_object_object_get (result, "partnerId")); ++reqData->step; break; -- cgit v1.2.3