From: Brian Aker Date: Sun, 23 Dec 2012 04:08:14 +0000 (-0500) Subject: Remove redundant call to nonblock. X-Git-Tag: 1.0.16~24^2~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=cc0fa630757d5942387b2c38209718dbaba11f4a;p=awesomized%2Flibmemcached Remove redundant call to nonblock. --- diff --git a/libmemcached/connect.cc b/libmemcached/connect.cc index 2543148b..6b7df7ae 100644 --- a/libmemcached/connect.cc +++ b/libmemcached/connect.cc @@ -358,7 +358,7 @@ static bool set_socket_options(org::libmemcached::Instance* server) #endif -#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) +#if defined(SO_NOSIGPIPE) if (SO_NOSIGPIPE) { int set= 1; diff --git a/libmemcached/io.cc b/libmemcached/io.cc index 8cee0178..d4599f77 100644 --- a/libmemcached/io.cc +++ b/libmemcached/io.cc @@ -82,7 +82,7 @@ static bool repack_input_buffer(org::libmemcached::Instance* ptr) if ((nr= ::recv(ptr->fd, ptr->read_ptr + ptr->read_data_length, MEMCACHED_MAX_BUFFER - ptr->read_data_length, - MSG_DONTWAIT|MSG_NOSIGNAL)) <= 0) + MSG_NOSIGNAL)) <= 0) { if (nr == 0) { @@ -337,11 +337,11 @@ static bool io_flush(org::libmemcached::Instance* ptr, int flags; if (with_flush) { - flags= MSG_NOSIGNAL|MSG_DONTWAIT; + flags= MSG_NOSIGNAL; } else { - flags= MSG_NOSIGNAL|MSG_DONTWAIT|MSG_MORE; + flags= MSG_NOSIGNAL|MSG_MORE; } ssize_t sent_length= ::send(ptr->fd, local_write_ptr, write_length, flags); @@ -419,7 +419,7 @@ static memcached_return_t _io_fill(org::libmemcached::Instance* ptr) ssize_t data_read; do { - data_read= ::recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, MSG_DONTWAIT|MSG_NOSIGNAL); + data_read= ::recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, MSG_NOSIGNAL); if (data_read == SOCKET_ERROR) { switch (get_socket_errno()) @@ -557,7 +557,7 @@ memcached_return_t memcached_io_slurp(org::libmemcached::Instance* ptr) char buffer[MEMCACHED_MAX_BUFFER]; do { - data_read= ::recv(ptr->fd, ptr->read_buffer, sizeof(buffer), MSG_DONTWAIT|MSG_NOSIGNAL); + data_read= ::recv(ptr->fd, ptr->read_buffer, sizeof(buffer), MSG_NOSIGNAL); if (data_read == SOCKET_ERROR) { switch (get_socket_errno()) diff --git a/libtest/include.am b/libtest/include.am index 17ec255c..0a662a17 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -149,15 +149,12 @@ libtest_unittest_LDADD= # We are either building in tree, or with if BUILDING_LIBMEMCACHED -libtest_libtest_la_LIBADD+= libmemcached/libmemcached.la libtest_libtest_la_SOURCES+= libtest/memcached.cc libtest_libtest_la_CXXFLAGS+= -DHAVE_LIBMEMCACHED libtest_unittest_CXXFLAGS+= -DHAVE_LIBMEMCACHED -libtest_unittest_LDADD+= libmemcached/libmemcached.la else if HAVE_LIBMEMCACHED -libtest_libtest_la_LIBADD+= $(LIBMEMCACHED_UTIL_LDFLAGS) libtest_libtest_la_SOURCES+= libtest/memcached.cc else libtest_libtest_la_CXXFLAGS+= -DHAVE_LIBMEMCACHED=0