X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fquit.c;h=8b5acf67d1f056727f38328241af7b0c4abac6c4;hb=9979e3f8206c764a881550dda41a444f005206f3;hp=c22635a8a77af69ff22d2def8a810d461b6d8198;hpb=b41c57c2f84855cfd32a7b14008ca0aceb92f32b;p=m6w6%2Flibmemcached diff --git a/libmemcached/quit.c b/libmemcached/quit.c index c22635a8..8b5acf67 100644 --- a/libmemcached/quit.c +++ b/libmemcached/quit.c @@ -9,11 +9,11 @@ will force data to be completed. */ -void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death) +void memcached_quit_server(memcached_server_st *ptr, bool io_death) { if (ptr->fd != -1) { - if (io_death == 0 && ptr->type != MEMCACHED_CONNECTION_UDP) + if (io_death == false && ptr->type != MEMCACHED_CONNECTION_UDP) { memcached_return_t rc; char buffer[MEMCACHED_MAX_BUFFER]; @@ -24,11 +24,11 @@ void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death) request.message.header.request.magic = PROTOCOL_BINARY_REQ; request.message.header.request.opcode = PROTOCOL_BINARY_CMD_QUIT; request.message.header.request.datatype = PROTOCOL_BINARY_RAW_BYTES; - rc= memcached_do(ptr, request.bytes, sizeof(request.bytes), 1); + rc= memcached_do(ptr, request.bytes, sizeof(request.bytes), true); } else { - rc= memcached_do(ptr, "quit\r\n", 6, 1); + rc= memcached_do(ptr, "quit\r\n", sizeof("quit\r\n"), true); } WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_FETCH_NOTFINISHED); @@ -61,7 +61,7 @@ void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death) ptr->read_ptr= ptr->read_buffer; memcached_server_response_reset(ptr); - if(io_death) + if (io_death) { ptr->server_failure_counter++; }