From: APTX Date: Tue, 23 Apr 2013 23:26:00 +0000 (+0200) Subject: Fix VoteReply. X-Git-Url: https://gitweb.aptx.org/?a=commitdiff_plain;h=761d04a33e1100e17fa18180e788954746a324eb;p=anidbudpclient.git Fix VoteReply. Handle VOTE_REVOKED reply correctly, return success if a revoked vote does not exist. --- diff --git a/votecommand.cpp b/votecommand.cpp index 9921524..ae2fbb1 100644 --- a/votecommand.cpp +++ b/votecommand.cpp @@ -212,11 +212,19 @@ void VoteReply::setRawReply(ReplyCode replyCode, const QString &reply) case VOTED: case VOTE_FOUND: case VOTE_UPDATED: - // True as well because the vote is 0 - case NO_SUCH_VOTE: + case VOTE_REVOKED: if (readReplyData(reply)) signalReplyReady(true); break; + case NO_SUCH_VOTE: + if (!readReplyData(reply)) + break; + + if (command().value() < 0) + signalReplyReady(true); + else + signalReplyReady(false); + break; case PERMVOTE_NOT_ALLOWED: case ALREADY_PERMVOTED: default: