diff --git a/src/bin/d2/nc_add.cc b/src/bin/d2/nc_add.cc index 2d47d57b8b..0d517cb4d5 100644 --- a/src/bin/d2/nc_add.cc +++ b/src/bin/d2/nc_add.cc @@ -175,12 +175,11 @@ NameAddTransaction::addingFwdAddrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildAddFwdAddressRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid @@ -288,13 +287,12 @@ NameAddTransaction::replacingFwdAddrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case FQDN_IN_USE_EVT: case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildReplaceFwdAddressRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid @@ -438,12 +436,11 @@ NameAddTransaction::replacingRevPtrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildReplaceRevPtrsRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid diff --git a/src/bin/d2/nc_remove.cc b/src/bin/d2/nc_remove.cc index 6cc468fe69..cd9c6794bf 100644 --- a/src/bin/d2/nc_remove.cc +++ b/src/bin/d2/nc_remove.cc @@ -179,12 +179,11 @@ NameRemoveTransaction::removingFwdAddrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildRemoveFwdAddressRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid @@ -287,13 +286,12 @@ NameRemoveTransaction::removingFwdRRsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case UPDATE_OK_EVT: case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildRemoveFwdRRsRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid @@ -445,12 +443,11 @@ NameRemoveTransaction::removingRevPtrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildRemoveRevPtrsRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid diff --git a/src/bin/d2/simple_add.cc b/src/bin/d2/simple_add.cc index dcf0415c4b..c1814c77b4 100644 --- a/src/bin/d2/simple_add.cc +++ b/src/bin/d2/simple_add.cc @@ -170,12 +170,11 @@ SimpleAddTransaction::replacingFwdAddrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildReplaceFwdAddressRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid @@ -307,12 +306,11 @@ SimpleAddTransaction::replacingRevPtrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildReplaceRevPtrsRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid diff --git a/src/bin/d2/simple_remove.cc b/src/bin/d2/simple_remove.cc index 823628e478..457afe7125 100644 --- a/src/bin/d2/simple_remove.cc +++ b/src/bin/d2/simple_remove.cc @@ -173,13 +173,12 @@ SimpleRemoveTransaction::removingFwdRRsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case UPDATE_OK_EVT: case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildRemoveFwdRRsRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid @@ -320,12 +319,11 @@ SimpleRemoveTransaction::removingRevPtrsHandler() { // Clear the update attempts count on initial transition. clearUpdateAttempts(); } - // No reuse of the request on retries. - clearDnsUpdateRequest(); switch(getNextEvent()) { case SERVER_SELECTED_EVT: try { + clearDnsUpdateRequest(); buildRemoveRevPtrsRequest(); } catch (const std::exception& ex) { // While unlikely, the build might fail if we have invalid