Updated with Twitter's memcached_server_error() function.
[m6w6/libmemcached] / libmemcachedutil / memcached_pool.c
index 766375f1bc2b84472e3ffddd74f541b3803ed262..708b7ce2a793ffa930336eb7102f119d99846cbb 100644 (file)
@@ -1,5 +1,7 @@
-#include "common.h"
+#include "libmemcached/common.h"
 #include "libmemcached/memcached_pool.h"
+
+#include <errno.h>
 #include <pthread.h>
 
 struct memcached_pool_st 
@@ -9,8 +11,8 @@ struct memcached_pool_st
   memcached_st *master;
   memcached_st **mmc;
   int firstfree;
-  int size;
-  int current_size;
+  uint32_t size;
+  uint32_t current_size;
 };
 
 static memcached_return mutex_enter(pthread_mutex_t *mutex) 
@@ -79,7 +81,7 @@ memcached_pool_st *memcached_pool_create(memcached_st* mmc,
     /* Try to create the initial size of the pool. An allocation failure at
      * this time is not fatal..
      */
-    for (int ii=0; ii < initial; ++ii)
+    for (unsigned int ii=0; ii < initial; ++ii)
       if (grow_pool(ret) == -1)
         break;
   }