**Changes from beta2:**
+* Fix libmemcachedprotocol's binary `STAT` and `VERSION` handlers.
* Fix [gh #105](https://github.com/m6w6/libmemcached/issues/105):
EINTR handled too defensively when polling.
> released 2020-12-21
-**NOTE:**
+**NOTE:**
This is a bug fix release, not a feature release. The minor version number
was incremented due to the following changes:
**Changes from beta2:**
+* Fix libmemcachedprotocol's binary ``STAT`` and ``VERSION`` handlers.
* Fix `gh #105 <https://github.com/m6w6/libmemcached/issues/105>`_\ :
EINTR handled too defensively when polling.
released 2020-12-21
-**NOTE:**
+**NOTE:**\ :raw-html-m2r:`<br>`
This is a bug fix release, not a feature release. The minor version number
was incremented due to the following changes:
protocol_binary_response_header *response) {
memcached_protocol_client_st *client = (void *) cookie;
- if (client->root->pedantic
+ if (response && client->root->pedantic
&& !memcached_binary_protocol_pedantic_check_response(request, response)) {
return PROTOCOL_BINARY_RESPONSE_EINVAL;
}
return PROTOCOL_BINARY_RESPONSE_EINTERNAL;
}
+ if (!response) {
+ return PROTOCOL_BINARY_RESPONSE_SUCCESS;
+ }
+
size_t len = sizeof(protocol_binary_response_header) + htonl(response->response.bodylen);
size_t offset = 0;
char *ptr = (void *) response;
rval = client->root->callback->interface.v1.stat(cookie, (void *) (header + 1), keylen,
stat_response_handler);
+ if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) {
+ /* END message */
+ protocol_binary_response_no_extras response = {
+ .message = {
+ .header.response =
+ {
+ .magic = PROTOCOL_BINARY_RES,
+ .opcode = PROTOCOL_BINARY_CMD_STAT,
+ .status = htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
+ .opaque = header->request.opaque,
+ },
+ }};
+ rval = response_handler(cookie, header, &response);
+ }
} else {
rval = PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND;
}
memcached_protocol_client_st *client = (void *) cookie;
if (client->root->callback->interface.v1.version) {
rval = client->root->callback->interface.v1.version(cookie, version_response_handler);
+ if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) {
+ rval = response_handler(cookie, header, NULL);
+ }
} else {
rval = PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND;
}