* Use and distribution licensed under the BSD license. See
* the COPYING file in the parent directory for full text.
*
- * Summary:
+ * Summary:
*
*/
self->get_key_failure= NULL;
self->delete_trigger= NULL;
self->callbacks= NULL;
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ self->sasl.callbacks= NULL;
+ self->sasl.is_allocated= false;
+#endif
return true;
}
if (ptr->continuum)
libmemcached_free(ptr, ptr->continuum);
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ if (ptr->sasl.callbacks != NULL)
+ {
+ memcached_destroy_sasl_auth_data(ptr);
+ }
+#endif
+
if (memcached_is_allocated(ptr))
{
libmemcached_free(ptr, ptr);
new_clone->prefix_key_length= source->prefix_key_length;
}
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ if (source->sasl.callbacks)
+ {
+ if (memcached_clone_sasl(new_clone, source) != MEMCACHED_SUCCESS)
+ {
+ memcached_free(new_clone);
+ return NULL;
+ }
+ }
+#endif
+
rc= run_distribution(new_clone);
if (rc != MEMCACHED_SUCCESS)