+void memcached_quit(memcached_st *ptr)
+{
+ unsigned int x;
+
+ if (ptr->hosts == NULL ||
+ ptr->number_of_hosts == 0)
+ return;
+
+ if (ptr->hosts && ptr->number_of_hosts)
+ {
+ for (x= 0; x < ptr->number_of_hosts; x++)
+ memcached_quit_server(&ptr->hosts[x], 0);
+ }