From: Yoshitaka Aharen Date: Thu, 6 Jun 2013 05:16:30 +0000 (+0900) Subject: [2796] compare with Opcode object instead of a numeric code X-Git-Tag: bind10-1.2.0beta1-release~409^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb08c0bcb4791c3c39f68ae8cefc2e9402ae9b92;p=thirdparty%2Fkea.git [2796] compare with Opcode object instead of a numeric code --- diff --git a/src/bin/auth/statistics.cc.pre b/src/bin/auth/statistics.cc.pre index ec39db6a4a..14341fe5f5 100644 --- a/src/bin/auth/statistics.cc.pre +++ b/src/bin/auth/statistics.cc.pre @@ -138,11 +138,9 @@ Counters::incRequest(const MessageAttributes& msgattrs) { // if a short message which does not contain DNS header is received, or // a response message (i.e. QR bit is set) is received. if (opcode) { - const int code = opcode.get().getCode(); - server_msg_counter_.inc(opcode_to_msgcounter[code]); + server_msg_counter_.inc(opcode_to_msgcounter[opcode->getCode()]); - // Opcode = 0: Query - if (code == Opcode::QUERY_CODE) { + if (opcode.get() == Opcode::QUERY()) { // Recursion Desired bit if (msgattrs.requestHasRD()) { server_msg_counter_.inc(MSG_QRYRECURSION);