Commit 7f325c2f authored by Claudio Valerio's avatar Claudio Valerio

the new version check response is now parsed to find the two values version...

the new version check response is now parsed to find the two values version and url independently of the response id
parent dbaafbc9
......@@ -514,20 +514,16 @@ void UBApplicationController::checkUpdate()
void UBApplicationController::ftpCommandFinished(int id, bool error)
{
qDebug() << id;
if (error){
qWarning() << "ftp command id" << id << "return the error: " << mFtp->errorString();
mFtp->close();
}
else{
// 3 stand for the third command we have sent
// in our case
// 1->connect
// 2->login
// 3->get
if (id == 3){
QString updateString = QString(mFtp->readAll());
QString responseString = QString(mFtp->readAll());
if (!responseString.isEmpty() && responseString.contains("version:") && responseString.contains("url:")){
mFtp->close();
downloadJsonFinished(updateString);
downloadJsonFinished(responseString);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment