Merge Patrick's exception branch.
[m6w6/libmemcached] / libmemcached / memcached_purge.c
index 96bf1d270fa7061a2c8e72dc8421188252a78a90..40c8ad61a5af5d0e956e2a4c246601d9fcf1acf3 100644 (file)
@@ -30,7 +30,7 @@ memcached_return memcached_purge(memcached_server_st *ptr)
   }
   WATCHPOINT_ASSERT(ptr->fd != -1);
 
-  int no_msg= memcached_server_response_count(ptr) - 1;
+  uint32_t no_msg= memcached_server_response_count(ptr) - 1;
   if (no_msg > 0)
   {
     memcached_result_st result;
@@ -42,7 +42,7 @@ memcached_return memcached_purge(memcached_server_st *ptr)
      * data to be sent from the server (the commands was in the output buffer
      * and just flushed
      */
-    long timeo= ptr->root->poll_timeout;
+    int32_t timeo= ptr->root->poll_timeout;
     ptr->root->poll_timeout= 2000;
 
     result_ptr= memcached_result_create(ptr->root, &result);
@@ -68,7 +68,7 @@ memcached_return memcached_purge(memcached_server_st *ptr)
     }
 
     memcached_result_free(result_ptr);
-    ptr->root->poll_timeout=timeo;
+    ptr->root->poll_timeout= timeo;
   }
   ptr->root->purging= 0;