Add back in the UDP header creation.
authorBrian Aker <brian@tangent.org>
Sat, 31 Dec 2011 01:37:27 +0000 (17:37 -0800)
committerBrian Aker <brian@tangent.org>
Sat, 31 Dec 2011 01:37:27 +0000 (17:37 -0800)
libmemcached/server.cc

index 03426c8a1383bb0fd1e9812225567d1aa9c184b4..f08f8bf077cdcc150ee98721dbcf3054e0beeac3 100644 (file)
@@ -131,6 +131,12 @@ memcached_server_st *__server_create_with(memcached_st *memc,
 
   _server_init(self, const_cast<memcached_st *>(memc), hostname, port, weight, type);
 
+  if (memc and memcached_is_udp(memc))
+  { 
+    self->write_buffer_offset= UDP_DATAGRAM_HEADER_LENGTH;
+    memcached_io_init_udp_header(self, 0);
+  }
+
   if (memc)
   {
     set_hostinfo(self);