Remove redundant call to nonblock.
authorBrian Aker <brian@tangent.org>
Sun, 23 Dec 2012 04:08:14 +0000 (23:08 -0500)
committerBrian Aker <brian@tangent.org>
Sun, 23 Dec 2012 04:08:14 +0000 (23:08 -0500)
libmemcached/connect.cc
libmemcached/io.cc
libtest/include.am

index 2543148bd9aaeb2add1569c517b19fef2f947191..6b7df7ae3b957215b2d66561acecef39eb48a2f4 100644 (file)
@@ -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;
index 8cee0178711eeff6587cc8ded3ae226bfa79c2fa..d4599f77c793e15095c3b2cf08f47a9f3d66e6fc 100644 (file)
@@ -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())
index 17ec255c56ab490aec542217122079d9f9e2431d..0a662a171ead20c4e8ccaff700d7d8c27f86ab08 100644 (file)
@@ -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