namespace {
const char* values[] = {
- "DHCP_ADD_EXTERNAL_SOCKET", "Attempted to register external socket %1 from different thread %2",
- "DHCP_DELETE_ALL_EXTERNAL_SOCKETS", "Attempted to unregister external sockets from different thread %1",
- "DHCP_DELETE_EXTERNAL_SOCKET", "Attempted to unregister external socket %1 from different thread %2",
+ "DHCP_ADD_EXTERNAL_SOCKET", "Attempted to register external socket %1 from different thread %2 than main thread %3",
+ "DHCP_DELETE_ALL_EXTERNAL_SOCKETS", "Attempted to unregister external sockets from different thread %1 than main thread %2",
+ "DHCP_DELETE_EXTERNAL_SOCKET", "Attempted to unregister external socket %1 from different thread %2 than main thread %3",
NULL
};
$NAMESPACE isc::dhcp
-% DHCP_ADD_EXTERNAL_SOCKET Attempted to register external socket %1 from different thread %2
+% DHCP_ADD_EXTERNAL_SOCKET Attempted to register external socket %1 from different thread %2 than main thread %3
This error message indicates that a different thread than the main thread has
registered an external socket. This is a programming error and should be fixed.
Only the main thread is allowed to perform operations on the external sockets.
-The file descritptor and the respective thread id are included in the message.
+The file descritptor and the respective thread ids are included in the message.
-% DHCP_DELETE_ALL_EXTERNAL_SOCKETS Attempted to unregister external sockets from different thread %1
+% DHCP_DELETE_ALL_EXTERNAL_SOCKETS Attempted to unregister external sockets from different thread %1 than main thread %2
This error message indicates that a different thread than the main thread has
deleted all external sockets. This is a programming error and should be fixed.
Only the main thread is allowed to perform operations on the external sockets.
-The respective thread id is included in the message.
+The respective thread ids are included in the message.
-% DHCP_DELETE_EXTERNAL_SOCKET Attempted to unregister external socket %1 from different thread %2
+% DHCP_DELETE_EXTERNAL_SOCKET Attempted to unregister external socket %1 from different thread %2 than main thread %3
This error message indicates that a different thread than the main thread has
unregistered an external socket. This is a programming error and should be fixed.
Only the main thread is allowed to perform operations on the external sockets.
-The file descritptor and the respective thread id are included in the message.
+The file descritptor and the respective thread ids are included in the message.
}
if (check_thread_id_ && std::this_thread::get_id() != id_) {
LOG_ERROR(dhcp_logger, DHCP_ADD_EXTERNAL_SOCKET)
- .arg(socketfd)
- .arg(std::this_thread::get_id());
+ .arg(socketfd)
+ .arg(std::this_thread::get_id())
+ .arg(id_);
}
std::lock_guard<std::mutex> lock(callbacks_mutex_);
for (SocketCallbackInfo& s : callbacks_) {
IfaceMgr::deleteExternalSocketInternal(int socketfd) {
if (check_thread_id_ && std::this_thread::get_id() != id_) {
LOG_ERROR(dhcp_logger, DHCP_DELETE_EXTERNAL_SOCKET)
- .arg(socketfd)
- .arg(std::this_thread::get_id());
+ .arg(socketfd)
+ .arg(std::this_thread::get_id())
+ .arg(id_);
}
for (SocketCallbackInfoContainer::iterator s = callbacks_.begin();
s != callbacks_.end(); ++s) {
IfaceMgr::deleteAllExternalSockets() {
if (check_thread_id_ && std::this_thread::get_id() != id_) {
LOG_ERROR(dhcp_logger, DHCP_DELETE_ALL_EXTERNAL_SOCKETS)
- .arg(std::this_thread::get_id());
+ .arg(std::this_thread::get_id())
+ .arg(id_);
}
std::lock_guard<std::mutex> lock(callbacks_mutex_);
callbacks_.clear();