X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=lib%2Fmemcached_response.c;h=693f9b30520a71c0f21f875ffc095090b25e8c6f;hb=dd3711e0fb5dc8ea96253ca28db3d1fe3067a920;hp=ec29f0aa230292d455528d24e61b99e9361dc560;hpb=3efc2e6fb6a17e8eb52dbe3590a5dcb063b30537;p=m6w6%2Flibmemcached diff --git a/lib/memcached_response.c b/lib/memcached_response.c index ec29f0aa..693f9b30 100644 --- a/lib/memcached_response.c +++ b/lib/memcached_response.c @@ -43,8 +43,15 @@ memcached_return memcached_response(memcached_st *ptr, else return MEMCACHED_UNKNOWN_READ_FAILURE; } - case 'E': /* PROTOCOL ERROR */ - return MEMCACHED_PROTOCOL_ERROR; + case 'E': /* PROTOCOL ERROR or END */ + { + if (buffer[1] == 'N') + return MEMCACHED_NOTFOUND; + else if (buffer[1] == 'R') + return MEMCACHED_PROTOCOL_ERROR; + else + return MEMCACHED_UNKNOWN_READ_FAILURE; + } case 'C': /* CLIENT ERROR */ return MEMCACHED_CLIENT_ERROR; default: