Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
d1fdfd86
Commit
d1fdfd86
authored
May 12, 2011
by
zhanglikun
Browse files
[trac598_new] Generate correct answer message for the callback.
parent
744fe91a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/resolve/recursive_query.cc
View file @
d1fdfd86
...
...
@@ -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
());
}
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment