Remove final UDP bits from io framework.
authorBrian Aker <brian@tangent.org>
Thu, 5 Jan 2012 06:18:07 +0000 (22:18 -0800)
committerBrian Aker <brian@tangent.org>
Thu, 5 Jan 2012 06:18:07 +0000 (22:18 -0800)
libmemcached/io.cc

index 538f15371688b593179946043db0ae27566d7431..ab98e4864aac9ff4024a09bde28833740ec37373 100644 (file)
@@ -142,10 +142,8 @@ static bool process_input_buffer(memcached_server_write_instance_st ptr)
     memcached_set_processing_input((memcached_st *)ptr->root, true);
 
     char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-    memcached_return_t error;
     memcached_st *root= (memcached_st *)ptr->root;
-    error= memcached_response(ptr, buffer, sizeof(buffer),
-                              &root->result);
+    memcached_return_t error= memcached_response(ptr, buffer, sizeof(buffer), &root->result);
 
     memcached_set_processing_input(root, false);
 
@@ -378,14 +376,7 @@ static bool io_flush(memcached_server_write_instance_st ptr,
   }
 
   WATCHPOINT_ASSERT(write_length == 0);
-  if (memcached_is_udp(ptr->root))
-  {
-    ptr->write_buffer_offset= UDP_DATAGRAM_HEADER_LENGTH;
-  }
-  else
-  {
-    ptr->write_buffer_offset= 0;
-  }
+  ptr->write_buffer_offset= 0;
 
   return true;
 }