- bool flush= (bool) ((instance->root->flags.buffer_requests && verb == SET_OP) ? 0 : 1);
- if (ptr->flags.binary_protocol)
+
+ bool flush= true;
+ if (memcached_is_buffering(instance->root) and verb == SET_OP)
+ {
+ flush= false;
+ }
+
+ bool reply= memcached_is_replying(ptr);
+
+ hashkit_string_st* destination= NULL;
+
+ if (memcached_is_encrypted(ptr))
+ {
+ if (can_by_encrypted(verb) == false)
+ {
+ return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT,
+ memcached_literal_param("Operation not allowed while encyrption is enabled"));
+ }
+
+ if ((destination= hashkit_encrypt(&ptr->hashkit, value, value_length)) == NULL)
+ {
+ return rc;
+ }
+ value= hashkit_string_c_str(destination);
+ value_length= hashkit_string_length(destination);
+ }
+
+ if (memcached_is_binary(ptr))