svn commit: samba r13992 - in branches/SAMBA_4_0/source/lib/ldb:
common include ldb_ildap ldb_ldap ldb_sqlite3 ldb_tdb
idra at samba.org
idra at samba.org
Tue Mar 7 21:08:10 GMT 2006
Author: idra
Date: 2006-03-07 21:08:09 +0000 (Tue, 07 Mar 2006)
New Revision: 13992
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13992
Log:
change the way ldb_async_wait() works.
I think I should change the name of this function
to ldb_async_process(), any opinions ?
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
branches/SAMBA_4_0/source/lib/ldb/include/ldb.h
branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-03-07 21:08:09 UTC (rev 13992)
@@ -233,11 +233,7 @@
int ldb_async_wait(struct ldb_context *ldb, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
- struct ldb_module *module;
-
- FIRST_OP(ldb, async_wait);
-
- return module->ops->async_wait(module, handle, type);
+ return handle->module->ops->async_wait(handle, type);
}
/*
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2006-03-07 21:08:09 UTC (rev 13992)
@@ -342,9 +342,3 @@
FIND_OP(module, del_transaction);
return module->ops->del_transaction(module);
}
-
-int ldb_next_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
-{
- FIND_OP(module, async_wait);
- return module->ops->async_wait(module, handle, type);
-}
Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb.h
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-03-07 21:08:09 UTC (rev 13992)
@@ -605,6 +605,7 @@
int status;
enum ldb_async_state state;
void *private_data;
+ struct ldb_module *module;
};
struct ldb_search {
Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h 2006-03-07 21:08:09 UTC (rev 13992)
@@ -61,7 +61,7 @@
int (*start_transaction)(struct ldb_module *);
int (*end_transaction)(struct ldb_module *);
int (*del_transaction)(struct ldb_module *);
- int (*async_wait)(struct ldb_module *, struct ldb_async_handle *, enum ldb_async_wait_type);
+ int (*async_wait)(struct ldb_async_handle *, enum ldb_async_wait_type);
};
typedef int (*ldb_connect_fn) (struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[]);
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-03-07 21:08:09 UTC (rev 13992)
@@ -341,6 +341,8 @@
return LDB_ERR_OPERATIONS_ERROR;
}
+ h->module = module;
+
ildb_ac = talloc(h, struct ildb_async_context);
if (ildb_ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
@@ -916,7 +918,7 @@
}
}
-static int ildb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int ildb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
struct ildb_async_context *ac = talloc_get_type(handle->private_data, struct ildb_async_context);
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c 2006-03-07 21:08:09 UTC (rev 13992)
@@ -76,6 +76,8 @@
return NULL;
}
+ h->module = module;
+
ac = talloc(h, struct lldb_async_context);
if (ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
@@ -875,10 +877,10 @@
return handle->status;
}
-static int lldb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int lldb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
struct lldb_async_context *ac = talloc_get_type(handle->private_data, struct lldb_async_context);
- struct lldb_private *lldb = talloc_get_type(ac->module->private_data, struct lldb_private);
+ struct lldb_private *lldb = talloc_get_type(handle->module->private_data, struct lldb_private);
struct timeval timeout;
LDAPMessage *result;
int ret = LDB_ERR_OPERATIONS_ERROR;
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c 2006-03-07 21:08:09 UTC (rev 13992)
@@ -70,6 +70,8 @@
return NULL;
}
+ h->module = module;
+
ac = talloc(h, struct lsql_async_context);
if (ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
@@ -1969,7 +1971,7 @@
return 0;
}
-static int lsql_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int lsql_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
return handle->status;
}
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c 2006-03-07 21:03:48 UTC (rev 13991)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c 2006-03-07 21:08:09 UTC (rev 13992)
@@ -91,6 +91,8 @@
return NULL;
}
+ h->module = module;
+
ac = talloc_zero(h, struct ltdb_async_context);
if (ac == NULL) {
ldb_set_errstring(module->ldb, talloc_asprintf(module, "Out of Memory"));
@@ -909,7 +911,7 @@
return LDB_SUCCESS;
}
-static int ltdb_async_wait(struct ldb_module *module, struct ldb_async_handle *handle, enum ldb_async_wait_type type)
+static int ltdb_async_wait(struct ldb_async_handle *handle, enum ldb_async_wait_type type)
{
return handle->status;
}
More information about the samba-cvs
mailing list