From d86fc9163127f7c5bd0c3af950fcddff7911867f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 21 Mar 2010 02:18:48 -0400 Subject: tools: remove creation of event_context Since the sysdb is now synchronous and creates its own event context we don't need an explicit event context anymore in the tools. --- src/python/pysss.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/python') diff --git a/src/python/pysss.c b/src/python/pysss.c index 7801be5e..36bae264 100644 --- a/src/python/pysss.c +++ b/src/python/pysss.c @@ -29,17 +29,6 @@ #include "tools/tools_util.h" #include "tools/sss_sync_ops.h" -#define TRANSACTION_WAIT(trs, retval) do { \ - while (!trs->transaction_done) { \ - tevent_loop_once(trs->self->ev); \ - } \ - retval = trs->error; \ - if (retval) { \ - PyErr_SetSssError(retval); \ - goto fail; \ - } \ -} while(0) - /* * function taken from samba sources tree as of Aug 20 2009, * file source4/lib/ldb/pyldb.c @@ -124,7 +113,6 @@ struct tools_ctx *init_ctx(TALLOC_CTX *mem_ctx, return NULL; } - tctx->ev = self->ev; tctx->confdb = self->confdb; tctx->sysdb = self->sysdb; tctx->local = self->local; @@ -263,7 +251,6 @@ static PyObject *py_sss_useradd(PySssLocalObject *self, * sysdb did assign it automatically, do a lookup */ if (tctx->octx->uid == 0 || tctx->octx->gid == 0) { ret = sysdb_getpwnam_sync(tctx, - tctx->ev, tctx->sysdb, tctx->octx->name, tctx->local, @@ -370,7 +357,6 @@ static PyObject *py_sss_userdel(PySssLocalObject *self, if (tctx->octx->remove_homedir) { ret = sysdb_getpwnam_sync(tctx, - tctx->ev, tctx->sysdb, tctx->octx->name, tctx->local, @@ -771,13 +757,6 @@ static PyObject *PySssLocalObject_new(PyTypeObject *type, } self->mem_ctx = mem_ctx; - self->ev = tevent_context_init(mem_ctx); - if (self->ev == NULL) { - talloc_free(mem_ctx); - PyErr_SetSssErrorWithMessage(EIO, "Cannot create event context"); - return NULL; - } - confdb_path = talloc_asprintf(self->mem_ctx, "%s/%s", DB_PATH, CONFDB_FILE); if (confdb_path == NULL) { talloc_free(mem_ctx); -- cgit