projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
See if this fixes issue with 64bit Ubuntu
[awesomized/libmemcached]
/
libmemcached
/
quit.c
diff --git
a/libmemcached/quit.c
b/libmemcached/quit.c
index 251f578cdd9e2d801bdb78929bd5bc309c7547d1..a82470000ff6496477e0cea7fcbc5f58dd62c57b 100644
(file)
--- a/
libmemcached/quit.c
+++ b/
libmemcached/quit.c
@@
-11,7
+11,7
@@
void memcached_quit_server(memcached_server_st *ptr, bool io_death)
{
void memcached_quit_server(memcached_server_st *ptr, bool io_death)
{
- if (ptr->fd !=
-1
)
+ if (ptr->fd !=
INVALID_SOCKET
)
{
if (io_death == false && ptr->type != MEMCACHED_CONNECTION_UDP && ptr->options.is_shutting_down == false)
{
{
if (io_death == false && ptr->type != MEMCACHED_CONNECTION_UDP && ptr->options.is_shutting_down == false)
{
@@
-30,7
+30,7
@@
void memcached_quit_server(memcached_server_st *ptr, bool io_death)
}
else
{
}
else
{
- rc= memcached_do(ptr, "quit\r\n", s
trlen("quit\r\n")
, true);
+ rc= memcached_do(ptr, "quit\r\n", s
izeof("quit\r\n") -1
, true);
}
WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_FETCH_NOTFINISHED);
}
WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_FETCH_NOTFINISHED);
@@
-64,7
+64,7
@@
void memcached_quit_server(memcached_server_st *ptr, bool io_death)
memcached_io_close(ptr);
}
memcached_io_close(ptr);
}
- ptr->fd=
-1
;
+ ptr->fd=
INVALID_SOCKET
;
ptr->io_bytes_sent= 0;
ptr->write_buffer_offset= (size_t) ((ptr->type == MEMCACHED_CONNECTION_UDP) ? UDP_DATAGRAM_HEADER_LENGTH : 0);
ptr->read_buffer_length= 0;
ptr->io_bytes_sent= 0;
ptr->write_buffer_offset= (size_t) ((ptr->type == MEMCACHED_CONNECTION_UDP) ? UDP_DATAGRAM_HEADER_LENGTH : 0);
ptr->read_buffer_length= 0;
@@
-85,14
+85,9
@@
void memcached_quit_server(memcached_server_st *ptr, bool io_death)
void memcached_quit(memcached_st *ptr)
{
void memcached_quit(memcached_st *ptr)
{
- uint32_t x;
-
- if (memcached_server_count(ptr) == 0)
- return;
-
if (memcached_server_count(ptr))
{
if (memcached_server_count(ptr))
{
- for (x= 0; x < memcached_server_count(ptr); x++)
+ for (
uint32_t
x= 0; x < memcached_server_count(ptr); x++)
{
memcached_server_write_instance_st instance=
memcached_server_instance_fetch(ptr, x);
{
memcached_server_write_instance_st instance=
memcached_server_instance_fetch(ptr, x);