Skip to content

Commit

Permalink
Set MythXMLClient::GetConnectionInfo sMsg for some of the error cases…
Browse files Browse the repository at this point in the history
… so the user knows what is going on, instead of getting OK dialogs with no text.
  • Loading branch information
daniel-kristjansson committed May 4, 2012
1 parent 725264c commit 47fb47c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mythtv/libs/libmythupnp/mythxmlclient.cpp
Expand Up @@ -91,7 +91,17 @@ UPnPResultCode MythXMLClient::GetConnectionInfo( const QString &sPin, DatabasePa
if ((pParams->verProtocol != MYTH_PROTO_VERSION) ||
(pParams->verSchema != MYTH_DATABASE_VERSION))
// incompatible version, we cannot use this backend
{
LOG(VB_GENERAL, LOG_ERR,
QString("MythXMLClient::GetConnectionInfo Failed - "
"Version Mismatch (%1,%2) != (%3,%4)")
.arg(pParams->verProtocol)
.arg(pParams->verSchema)
.arg(MYTH_PROTO_VERSION)
.arg(MYTH_DATABASE_VERSION));
sMsg = QObject::tr("Version Mismatch", "UPNP Errors");
return UPnPResult_ActionFailed;
}

return UPnPResult_Success;
}
Expand All @@ -110,8 +120,10 @@ UPnPResultCode MythXMLClient::GetConnectionInfo( const QString &sPin, DatabasePa
{
// Service calls no longer return UPnPResult codes,
// convert standard 501 to UPnPResult code for now.
sMsg = QObject::tr("Not Authorized", "UPNP Errors");
return UPnPResult_ActionNotAuthorized;
}

sMsg = QObject::tr("Unknown Error", "UPNP Errors");
return UPnPResult_ActionFailed;
}

0 comments on commit 47fb47c

Please sign in to comment.