#define CTDB_ERR_INVALID 1
#define CTDB_ERR_NOMEM 2
+struct event_context;
/*
initialise ctdb subsystem
*/
-struct ctdb_context *ctdb_init(TALLOC_CTX *mem_ctx);
+struct ctdb_context *ctdb_init(struct event_context *ev);
/*
tell ctdb what address to listen on, in transport specific format
and to simplify the code.
*/
-struct ctdb_context *ctdb_init(TALLOC_CTX *mem_ctx)
+struct ctdb_context *ctdb_init(struct event_context *ev)
{
struct ctdb_context *ctdb;
- ctdb = talloc_zero(mem_ctx, struct ctdb_context);
+ ctdb = talloc_zero(ev, struct ctdb_context);
+ ctdb->ev = ev;
+
return ctdb;
}
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "replace.h"
+#include "includes.h"
+#include "lib/events/events.h"
#include "system/filesys.h"
-#include "tdb.h"
-#include "talloc.h"
-#include "ctdb.h"
#include "popt.h"
enum my_functions {FUNC_SORT=1, FUNC_FETCH=2};
int i, ret;
TDB_DATA key, data;
poptContext pc;
+ struct event_context *ev;
pc = poptGetContext(argv[0], argc, argv, popt_options, POPT_CONTEXT_KEEP_FIRST);
exit(1);
}
+ ev = event_context_init(NULL);
+
/* initialise ctdb */
- ctdb = ctdb_init(NULL);
+ ctdb = ctdb_init(ev);
if (ctdb == NULL) {
printf("Failed to init ctdb\n");
exit(1);