diff options
-rw-r--r-- | CHANGELOG | 12 | ||||
-rw-r--r-- | include/licenser.h | 12 | ||||
-rw-r--r-- | licenser.cpp | 6 |
3 files changed, 23 insertions, 7 deletions
@@ -22,4 +22,14 @@ Changes in 2.0.1: Changes in 2.0.2: - Added this changelog -- Implemented support for additional leeway time in case there's no server connnection +- Implemented support for additional leeway time in case there's no server connection + +#################### + +Changes in 2.0.3: +- Mocwrapper made even less verbose + +#################### + +Changes in 2.0.4: +- Changed daemon response message in case there is no licenses left in the pool diff --git a/include/licenser.h b/include/licenser.h index 762839f..00ba815 100644 --- a/include/licenser.h +++ b/include/licenser.h @@ -27,11 +27,12 @@ #include "licdsetup.h" enum RequestReply { - e_bad_request = -1, - e_license_granted = 0, - e_license_rejected = 1, - e_no_conn_leeway = 2, - e_bad_connection = 3 + e_bad_request = -1, + e_license_granted = 0, + e_license_rejected = 1, + e_no_conn_leeway = 2, + e_license_pool_full = 3, + e_bad_connection = 4 }; enum class RequestType { @@ -92,6 +93,7 @@ private: {e_license_granted, "License acquired."}, {e_license_rejected, "No valid license acquired"}, {e_no_conn_leeway, "License granted with warning: No server connection. Leeway time left: "}, + {e_license_pool_full, "All licenses in use. No more license available on the server."}, {e_bad_connection, "No connection to server. Try again later."} }; }; diff --git a/licenser.cpp b/licenser.cpp index dd250cb..ca52e4b 100644 --- a/licenser.cpp +++ b/licenser.cpp @@ -243,7 +243,11 @@ int Licenser::parseAndSaveJsonReply(std::string &reply, const RequestInfo &reque ss << " reservation_id=" << json.get("reservation_id"); reply = ss.str(); } else { - reply = replyString[e_license_rejected]; + if (json.get("message") == "License fully reserved") { + reply = replyString[e_license_pool_full]; + } else { + reply = replyString[e_license_rejected]; + } // Do not save the response json, just return return 1; } |