| 190 | } |
| 191 | |
| 192 | redis_result* redis_client::get_error(socket_stream& conn, dbuf_pool* dbuf) |
| 193 | { |
| 194 | string& buf = conn.get_buf(); |
| 195 | buf.clear(); |
| 196 | if (!conn_.gets(buf)) { |
| 197 | logger_error("gets error, server: %s", conn.get_peer(true)); |
| 198 | return NULL; |
| 199 | } |
| 200 | |
| 201 | redis_result* rr = new(dbuf) redis_result(dbuf); |
| 202 | rr->set_type(REDIS_RESULT_ERROR); |
| 203 | rr->set_size(1); |
| 204 | |
| 205 | put_data(dbuf, rr, buf.c_str(), buf.length()); |
| 206 | return rr; |
| 207 | } |
| 208 | |
| 209 | redis_result* redis_client::get_status(socket_stream& conn, dbuf_pool* dbuf) |
| 210 | { |