Adding missing file.
[m6w6/libmemcached] / libmemcached / memcached_hosts.c
index f87414dacb8432c989c78586a919d69514ba4aa3..3082f693836c37eda7a86c17f971461ebe2dbb28 100644 (file)
@@ -51,9 +51,9 @@ memcached_return run_distribution(memcached_st *ptr)
   return MEMCACHED_SUCCESS;
 }
 
-static void host_reset(memcached_st *ptr, memcached_server_st *host, 
-                       char *hostname, unsigned int port,
-                       memcached_connection type)
+void host_reset(memcached_st *ptr, memcached_server_st *host, 
+                char *hostname, unsigned int port,
+                memcached_connection type)
 {
   memset(host,  0, sizeof(memcached_server_st));
   strncpy(host->hostname, hostname, MEMCACHED_MAX_HOST_LENGTH - 1);
@@ -152,7 +152,11 @@ memcached_return update_continuum(memcached_st *ptr)
         float pct = (float)list[host_index].limit_maxbytes/ (float)total_mem_bytes;
         pointer_per_server= floorf( pct * MEMCACHED_POINTS_PER_SERVER * (float)(ptr->number_of_hosts));
 #ifdef HAVE_DEBUG
-        printf("ketama_weighted:%s|%d|%llu|%u\n", list[host_index].hostname, list[host_index].port,  list[host_index].limit_maxbytes, pointer_per_server);
+        printf("ketama_weighted:%s|%d|%llu|%u\n", 
+               list[host_index].hostname, 
+               list[host_index].port,  
+               (unsigned long long)list[host_index].limit_maxbytes, 
+               pointer_per_server);
 #endif
     }
     for(index= 1; index <= pointer_per_server; ++index)