diff --git a/ChangeLog b/ChangeLog index a9d8dc33..8c88e30f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23231,3 +23231,8 @@ * Added support for sorting the event list in rdcatch(1). 2022-08-08 Fred Gleason * Incremented the package version to 4.0.0beta3int3. +2022-08-15 Fred Gleason + * Fixed a bug in the CDDB parser that caused it to emit an error + message when processing a 202 response. + * Added explicit processing for 201, 230, 401, 402, 403, 409, 431, + 432, 433, 434, 501, 502, 503 and 530 returns in the CDDB parser. diff --git a/lib/rdcddblookup.cpp b/lib/rdcddblookup.cpp index fbf5c8f9..93441d5d 100644 --- a/lib/rdcddblookup.cpp +++ b/lib/rdcddblookup.cpp @@ -141,6 +141,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)); @@ -171,10 +172,53 @@ void RDCddbLookup::readyReadData() lookup_state=4; break; + case 202: // No Match case 211: // Inexact Match - FinishCddbLookup(RDCddbLookup::NoMatch,"OK"); + 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");