|
@@ -64,6 +64,10 @@ const std::string& RELEASE_SOCKET_COMMAND() {
|
|
|
return (str);
|
|
|
}
|
|
|
|
|
|
+// RCode constants for the get_token command
|
|
|
+const size_t SOCKET_ERROR_CODE = 2;
|
|
|
+const size_t SHARE_ERROR_CODE = 3;
|
|
|
+
|
|
|
// A helper converter from numeric protocol ID to the corresponding string.
|
|
|
// used both for generating a message for the boss process and for logging.
|
|
|
inline const char*
|
|
@@ -134,10 +138,10 @@ readRequestSocketAnswer(isc::data::ConstElementPtr recv_msg,
|
|
|
isc::data::ConstElementPtr answer = isc::config::parseAnswer(rcode,
|
|
|
recv_msg);
|
|
|
// Translate known rcodes to the corresponding exceptions
|
|
|
- if (rcode == 2) {
|
|
|
+ if (rcode == SOCKET_ERROR_CODE) {
|
|
|
isc_throw(SocketRequestor::SocketAllocateError, answer->str());
|
|
|
}
|
|
|
- if (rcode == 3) {
|
|
|
+ if (rcode == SHARE_ERROR_CODE) {
|
|
|
isc_throw(SocketRequestor::ShareError, answer->str());
|
|
|
}
|
|
|
// The unknown exceptions
|