projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updated with Twitter's memcached_server_error() function.
[m6w6/libmemcached]
/
libmemcachedutil
/
memcached_pool.c
diff --git
a/libmemcachedutil/memcached_pool.c
b/libmemcachedutil/memcached_pool.c
index 766375f1bc2b84472e3ffddd74f541b3803ed262..708b7ce2a793ffa930336eb7102f119d99846cbb 100644
(file)
--- a/
libmemcachedutil/memcached_pool.c
+++ b/
libmemcachedutil/memcached_pool.c
@@
-1,5
+1,7
@@
-#include "common.h"
+#include "
libmemcached/
common.h"
#include "libmemcached/memcached_pool.h"
#include "libmemcached/memcached_pool.h"
+
+#include <errno.h>
#include <pthread.h>
struct memcached_pool_st
#include <pthread.h>
struct memcached_pool_st
@@
-9,8
+11,8
@@
struct memcached_pool_st
memcached_st *master;
memcached_st **mmc;
int firstfree;
memcached_st *master;
memcached_st **mmc;
int firstfree;
-
in
t size;
-
in
t current_size;
+
uint32_
t size;
+
uint32_
t current_size;
};
static memcached_return mutex_enter(pthread_mutex_t *mutex)
};
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..
*/
/* 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;
}
if (grow_pool(ret) == -1)
break;
}