Manos Chorianopoulos

fix refreshToken crash

......@@ -1058,17 +1058,20 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
{
if ([_db tableExists:@"requestVariables"] == YES) {
FMResultSet *refreshTokenSet = [_db executeQuery:@"SELECT refresh_token FROM requestVariables WHERE id = 1;"];
NSString *refreshToken = [NSString alloc];
// NSString *refreshToken = [NSString alloc];
NSString *refreshToken = @"";
while ([refreshTokenSet next]) {
refreshToken = [[refreshTokenSet resultDictionary][@"refresh_token"] stringValue];
}
FMResultSet *clientIdSet = [_db executeQuery:@"SELECT client_id FROM requestVariables WHERE id = 1;"];
NSString *clientId = [NSString alloc];
// NSString *clientId = [NSString alloc];
NSString *clientId = @"";
while ([clientIdSet next]) {
clientId = [[clientIdSet resultDictionary][@"client_id"] stringValue];
}
FMResultSet *clientSecretSet = [_db executeQuery:@"SELECT client_secret FROM requestVariables WHERE id = 1;"];
NSString *clientSecret = [NSString alloc];
// NSString *clientSecret = [NSString alloc];
NSString *clientSecret = @"";
while ([clientSecretSet next]) {
clientSecret = [[clientSecretSet resultDictionary][@"client_secret"] stringValue];
}
......@@ -1109,17 +1112,20 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
{
if ([_db tableExists:@"requestVariables"] == YES) {
FMResultSet *refreshTokenSet = [_db executeQuery:@"SELECT refresh_token FROM requestVariables WHERE id = 1;"];
NSString *refreshToken = [NSString alloc];
// NSString *refreshToken = [NSString alloc];
NSString *refreshToken = @"";
while ([refreshTokenSet next]) {
refreshToken = [[refreshTokenSet resultDictionary][@"refresh_token"] stringValue];
}
FMResultSet *clientIdSet = [_db executeQuery:@"SELECT client_id FROM requestVariables WHERE id = 1;"];
NSString *clientId = [NSString alloc];
// NSString *clientId = [NSString alloc];
NSString *clientId = @"";
while ([clientIdSet next]) {
clientId = [[clientIdSet resultDictionary][@"client_id"] stringValue];
}
FMResultSet *clientSecretSet = [_db executeQuery:@"SELECT client_secret FROM requestVariables WHERE id = 1;"];
NSString *clientSecret = [NSString alloc];
// NSString *clientSecret = [NSString alloc];
NSString *clientSecret = @"";
while ([clientSecretSet next]) {
clientSecret = [[clientSecretSet resultDictionary][@"client_secret"] stringValue];
}
......@@ -1160,17 +1166,20 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
{
if ([_db tableExists:@"requestVariables"] == YES) {
FMResultSet *refreshTokenSet = [_db executeQuery:@"SELECT refresh_token FROM requestVariables WHERE id = 1;"];
NSString *refreshToken = [NSString alloc];
// NSString *refreshToken = [NSString alloc];
NSString *refreshToken = @"";
while ([refreshTokenSet next]) {
refreshToken = [[refreshTokenSet resultDictionary][@"refresh_token"] stringValue];
}
FMResultSet *clientIdSet = [_db executeQuery:@"SELECT client_id FROM requestVariables WHERE id = 1;"];
NSString *clientId = [NSString alloc];
// NSString *clientId = [NSString alloc];
NSString *clientId = @"";
while ([clientIdSet next]) {
clientId = [[clientIdSet resultDictionary][@"client_id"] stringValue];
}
FMResultSet *clientSecretSet = [_db executeQuery:@"SELECT client_secret FROM requestVariables WHERE id = 1;"];
NSString *clientSecret = [NSString alloc];
// NSString *clientSecret = [NSString alloc];
NSString *clientSecret = @"";
while ([clientSecretSet next]) {
clientSecret = [[clientSecretSet resultDictionary][@"client_secret"] stringValue];
}
......