2022-08-15 Fred Gleason <fredg@paravelsystems.com>

* Added explicit processing for 201, 230, 401, 402, 403, 409, 431,
	432, 433, 434, 501, 502, 503 and 530 returns in the CDDB parser.

Signed-off-by: Fred Gleason <fredg@paraelsystems.com>
This commit is contained in:
Fred Gleason 2022-08-15 14:55:59 -04:00
parent a19798d35e
commit 8c83662891
2 changed files with 46 additions and 0 deletions

View File

@ -20894,3 +20894,6 @@
2022-08-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the CDDB parser that caused it to emit an error
message when processing a 202 response.
2022-08-15 Fred Gleason <fredg@paravelsystems.com>
* Added explicit processing for 201, 230, 401, 402, 403, 409, 431,
432, 433, 434, 501, 502, 503 and 530 returns in the CDDB parser.

View File

@ -144,6 +144,7 @@ void RDCddbLookup::readyReadData()
case 3: // Query Response
switch(code) {
case 200: // Exact Match
case 201: // Exact Match,read-only
f0=line.split(" ");
if(f0.size()>=4) {
discRecord()->setDiscId(f0[2].toUInt(&ok,16));
@ -176,9 +177,51 @@ void RDCddbLookup::readyReadData()
case 202: // No Match
case 211: // Inexact Match
case 230:
FinishCddbLookup(RDCddbLookup::NoMatch,"OK");
break;
case 401:
case 402:
FinishCddbLookup(RDCddbLookup::NoMatch,"Server failure");
break;
case 403:
FinishCddbLookup(RDCddbLookup::NoMatch,
"CDDB database entry is corrupt");
break;
case 409:
FinishCddbLookup(RDCddbLookup::NoMatch,"No handshake");
break;
case 431:
FinishCddbLookup(RDCddbLookup::NoMatch,
"Handshake not successful, closing connection");
break;
case 432:
FinishCddbLookup(RDCddbLookup::NoMatch,
"No connections allowed: permission denied");
break;
case 433:
FinishCddbLookup(RDCddbLookup::NoMatch,
"No connections allowed: too many users");
break;
case 434:
FinishCddbLookup(RDCddbLookup::NoMatch,
"No connections allowed: system load too high");
break;
case 501:
case 502:
case 503:
case 530:
FinishCddbLookup(RDCddbLookup::NoMatch,"Server error");
break;
default:
FinishCddbLookup(RDCddbLookup::LookupError,
"Unexpected response from CDDB server");