14 std::string *session_token) {
15 if (buffer.
data.size() == 0 || session_token == NULL) {
27 const std::string status = result->string_value;
31 reply->
root(),
"session_token", JSON_STRING);
35 *session_token = token->string_value;
38 }
else if (status ==
"path_busy") {
40 reply->
root(),
"time_remaining", JSON_INT);
41 if (time_remaining != NULL) {
43 time_remaining->int_value);
46 }
else if (status ==
"error") {
62 if (buffer.
data.size() == 0) {
74 const std::string status = result->string_value;
78 }
else if (status ==
"invalid_token") {
80 }
else if (status ==
"error") {
static JSON * SearchInObject(const JSON *json_object, const std::string &name, const json_type type)
static JsonDocument * Create(const std::string &text)
static LeaseReply ParseDropReply(const CurlBuffer &buffer, int llvl)
static LeaseReply ParseAcquireReply(const CurlBuffer &buffer, std::string *session_token, int llvl)
const JSON * root() const
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)