}
struct ctdb_cluster_mutex_handle *
-ctdb_cluster_mutex(struct ctdb_context *ctdb,
+ctdb_cluster_mutex(TALLOC_CTX *mem_ctx,
+ struct ctdb_context *ctdb,
const char *argstring,
int timeout)
{
char **args;
int ret;
- h = talloc(ctdb, struct ctdb_cluster_mutex_handle);
+ h = talloc(mem_ctx, struct ctdb_cluster_mutex_handle);
if (h == NULL) {
DEBUG(DEBUG_ERR, (__location__ " out of memory\n"));
return NULL;
#ifndef __CTDB_CLUSTER_MUTEX_H__
#define __CTDB_CLUSTER_MUTEX_H__
+#include <talloc.h>
+
#include "replace.h"
#include "system/network.h"
void *private_data);
struct ctdb_cluster_mutex_handle *
-ctdb_cluster_mutex(struct ctdb_context *ctdb,
+ctdb_cluster_mutex(TALLOC_CTX *mem_ctx,
+ struct ctdb_context *ctdb,
const char *argstring,
int timeout);
return 0;
}
- h = ctdb_cluster_mutex(ctdb, ctdb->recovery_lock, 5);
+ h = ctdb_cluster_mutex(ctdb, ctdb, ctdb->recovery_lock, 5);
if (h == NULL) {
return -1;
}
.locked = false,
};
- h = ctdb_cluster_mutex(ctdb, ctdb->recovery_lock, 0);
+ h = ctdb_cluster_mutex(ctdb, ctdb, ctdb->recovery_lock, 0);
if (h == NULL) {
return false;
}