BIND 10 trac598_new, updated. d1fdfd86c9b8e0120e557e2c7baaab542f9c2719 [trac598_new] Generate correct answer message for the callback.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 12 02:49:26 UTC 2011
The branch, trac598_new has been updated
via d1fdfd86c9b8e0120e557e2c7baaab542f9c2719 (commit)
from 744fe91ac965c576cbe916ca39a0bef54afdcd3f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d1fdfd86c9b8e0120e557e2c7baaab542f9c2719
Author: zhanglikun <zhanglikun at cnnic.cn>
Date: Thu May 12 10:49:21 2011 +0800
[trac598_new] Generate correct answer message for the callback.
-----------------------------------------------------------------------
Summary of changes:
src/lib/resolve/recursive_query.cc | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/resolve/recursive_query.cc b/src/lib/resolve/recursive_query.cc
index 3adc45e..b753cc9 100644
--- a/src/lib/resolve/recursive_query.cc
+++ b/src/lib/resolve/recursive_query.cc
@@ -847,14 +847,20 @@ public:
}
virtual void lookupTimeout() {
- callCallback(false);
+ if (!callback_called_) {
+ makeSERVFAIL();
+ callCallback(false);
+ }
assert(outstanding_events_ > 0);
--outstanding_events_;
stop();
}
virtual void clientTimeout() {
- callCallback(false);
+ if (!callback_called_) {
+ makeSERVFAIL();
+ callCallback(false);
+ }
assert(outstanding_events_ > 0);
--outstanding_events_;
stop();
@@ -866,7 +872,6 @@ public:
void callCallback(bool success) {
if (!callback_called_) {
callback_called_ = true;
- isc::resolve::makeErrorMessage(answer_message_, Rcode::SERVFAIL());
if (success) {
resolvercallback_->success(answer_message_);
} else {
@@ -908,6 +913,12 @@ public:
stop();
}
+
+ // Clear the answer parts of answer_message, and set the rcode
+ // to servfail
+ void makeSERVFAIL() {
+ isc::resolve::makeErrorMessage(answer_message_, Rcode::SERVFAIL());
+ }
};
}
More information about the bind10-changes
mailing list