fixed bug for setValue in refreshAccessToken
authorJaewook Jung <jw0213.jung@samsung.com>
Wed, 17 Aug 2016 08:00:43 +0000 (17:00 +0900)
committerJee Hyeok Kim <jihyeok13.kim@samsung.com>
Mon, 22 Aug 2016 07:24:02 +0000 (07:24 +0000)
Since OCRepresentation doesn't perceive a const string as std::string value,
need to clarify a type of parameter.
Otherwise, it is passed as a true boolean value whatever it is.

Change-Id: I3db677f6bdf59bf23036dc678781b35af95025e6
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10539
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
resource/src/OCAccountManager.cpp

index ca73282..9ac03df 100644 (file)
@@ -139,7 +139,7 @@ OCStackResult OCAccountManager::refreshAccessToken(const std::string& userUuid,
     OCRepresentation rep;
     rep.setValue(OC_RSRVD_USER_UUID, userUuid);
     rep.setValue(OC_RSRVD_DEVICE_ID, m_deviceID);
-    rep.setValue(OC_RSRVD_GRANT_TYPE, OC_RSRVD_GRANT_TYPE_REFRESH_TOKEN);
+    rep.setValue(OC_RSRVD_GRANT_TYPE, std::string(OC_RSRVD_GRANT_TYPE_REFRESH_TOKEN));
     rep.setValue(OC_RSRVD_REFRESH_TOKEN, refreshToken);
 
     return checked_guard(m_clientWrapper.lock(), &IClientWrapper::PostResourceRepresentation,