Commit 999736ef authored by Stephen Morris's avatar Stephen Morris

[trac1034] Modify message IDs to words separated by underscores

parent 85d5708e
......@@ -14,32 +14,32 @@
$NAMESPACE isc::asiodns
% ASIODNS_FETCHCOMP upstream fetch to %1(%2) has now completed
% ASIODNS_FETCH_COMPLETED upstream fetch to %1(%2) has now completed
A debug message, this records that the upstream fetch (a query made by the
resolver on behalf of its client) to the specified address has completed.
% ASIODNS_FETCHSTOP upstream fetch to %1(%2) has been stopped
% ASIODNS_FETCH_STOPPED upstream fetch to %1(%2) has been stopped
An external component has requested the halting of an upstream fetch. This
is an allowed operation, and the message should only appear if debug is
enabled.
% ASIODNS_OPENSOCK error %1 opening %2 socket to %3(%4)
% ASIODNS_OPEN_SOCKET error %1 opening %2 socket to %3(%4)
The asynchronous I/O code encountered an error when trying to open a socket
of the specified protocol in order to send a message to the target address.
The number of the system error that cause the problem is given in the
message.
% ASIODNS_RECVSOCK error %1 reading %2 data from %3(%4)
% ASIODNS_READ_DATA error %1 reading %2 data from %3(%4)
The asynchronous I/O code encountered an error when trying to read data from
the specified address on the given protocol. The number of the system
error that cause the problem is given in the message.
% ASIODNS_SENDSOCK error %1 sending data using %2 to %3(%4)
% ASIODNS_SEND_DATA error %1 sending data using %2 to %3(%4)
The asynchronous I/O code encountered an error when trying send data to
the specified address on the given protocol. The the number of the system
error that cause the problem is given in the message.
% ASIODNS_RECVTMO receive timeout while waiting for data from %1(%2)
% ASIODNS_READ_TIMEOUT receive timeout while waiting for data from %1(%2)
An upstream fetch from the specified address timed out. This may happen for
any number of reasons and is most probably a problem at the remote server
or a problem on the network. The message will only appear if debug is
......@@ -49,7 +49,7 @@ enabled.
This message should not appear and indicates an internal error if it does.
Please enter a bug report.
% ASIODNS_UNKRESULT unknown result (%1) when IOFetch::stop() was executed for I/O to %2(%3)
% ASIODNS_UNKNOWN_RESULT unknown result (%1) when IOFetch::stop() was executed for I/O to %2(%3)
The termination method of the resolver's upstream fetch class was called with
an unknown result code (which is given in the message). This message should
not appear and may indicate an internal error. Please enter a bug report.
......@@ -280,7 +280,7 @@ IOFetch::operator()(asio::error_code ec, size_t length) {
// Open a connection to the target system. For speed, if the operation
// is synchronous (i.e. UDP operation) we bypass the yield.
data_->origin = ASIODNS_OPENSOCK;
data_->origin = ASIODNS_OPEN_SOCKET;
if (data_->socket->isOpenSynchronous()) {
data_->socket->open(data_->remote_snd.get(), *this);
} else {
......@@ -290,7 +290,7 @@ IOFetch::operator()(asio::error_code ec, size_t length) {
do {
// Begin an asynchronous send, and then yield. When the send completes,
// we will resume immediately after this point.
data_->origin = ASIODNS_SENDSOCK;
data_->origin = ASIODNS_SEND_DATA;
CORO_YIELD data_->socket->asyncSend(data_->msgbuf->getData(),
data_->msgbuf->getLength(), data_->remote_snd.get(), *this);
......@@ -313,7 +313,7 @@ IOFetch::operator()(asio::error_code ec, size_t length) {
// received all the data before copying it back to the user's buffer.
// And we want to minimise the amount of copying...
data_->origin = ASIODNS_RECVSOCK;
data_->origin = ASIODNS_READ_DATA;
data_->cumulative = 0; // No data yet received
data_->offset = 0; // First data into start of buffer
data_->received->clear(); // Clear the receive buffer
......@@ -367,13 +367,13 @@ IOFetch::stop(Result result) {
data_->stopped = true;
switch (result) {
case TIME_OUT:
LOG_DEBUG(logger, DBG_COMMON, ASIODNS_RECVTMO).
LOG_DEBUG(logger, DBG_COMMON, ASIODNS_READ_TIMEOUT).
arg(data_->remote_snd->getAddress().toText()).
arg(data_->remote_snd->getPort());
break;
case SUCCESS:
LOG_DEBUG(logger, DBG_ALL, ASIODNS_FETCHCOMP).
LOG_DEBUG(logger, DBG_ALL, ASIODNS_FETCH_COMPLETED).
arg(data_->remote_rcv->getAddress().toText()).
arg(data_->remote_rcv->getPort());
break;
......@@ -382,13 +382,13 @@ IOFetch::stop(Result result) {
// Fetch has been stopped for some other reason. This is
// allowed but as it is unusual it is logged, but with a lower
// debug level than a timeout (which is totally normal).
LOG_DEBUG(logger, DBG_IMPORTANT, ASIODNS_FETCHSTOP).
LOG_DEBUG(logger, DBG_IMPORTANT, ASIODNS_FETCH_STOPPED).
arg(data_->remote_snd->getAddress().toText()).
arg(data_->remote_snd->getPort());
break;
default:
LOG_ERROR(logger, ASIODNS_UNKRESULT).
LOG_ERROR(logger, ASIODNS_UNKNOWN_RESULT).
arg(data_->remote_snd->getAddress().toText()).
arg(data_->remote_snd->getPort());
}
......@@ -412,9 +412,9 @@ IOFetch::stop(Result result) {
void IOFetch::logIOFailure(asio::error_code ec) {
// Should only get here with a known error code.
assert((data_->origin == ASIODNS_OPENSOCK) ||
(data_->origin == ASIODNS_SENDSOCK) ||
(data_->origin == ASIODNS_RECVSOCK) ||
assert((data_->origin == ASIODNS_OPEN_SOCKET) ||
(data_->origin == ASIODNS_SEND_DATA) ||
(data_->origin == ASIODNS_READ_DATA) ||
(data_->origin == ASIODNS_UNKORIGIN));
static const char* PROTOCOL[2] = {"TCP", "UDP"};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment