mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
Revert "s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context"
This reverts commit 9dc332060cf5f249ea887dbc60ec7a39b6f91120. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
e2a5272ac6
commit
26107832cd
@ -55,6 +55,18 @@ void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
|||||||
{
|
{
|
||||||
struct msg_dgm_ref *result, *tmp_refs;
|
struct msg_dgm_ref *result, *tmp_refs;
|
||||||
|
|
||||||
|
if (tevent_context_is_wrapper(ev)) {
|
||||||
|
/*
|
||||||
|
* This is really a programmer error!
|
||||||
|
*
|
||||||
|
* The main/raw tevent context should
|
||||||
|
* have been registered first!
|
||||||
|
*/
|
||||||
|
DBG_ERR("Should not be used with a wrapper tevent context\n");
|
||||||
|
*err = EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
result = talloc(mem_ctx, struct msg_dgm_ref);
|
result = talloc(mem_ctx, struct msg_dgm_ref);
|
||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
*err = ENOMEM;
|
*err = ENOMEM;
|
||||||
@ -75,18 +87,6 @@ void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
|||||||
if (refs == NULL) {
|
if (refs == NULL) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (tevent_context_is_wrapper(ev)) {
|
|
||||||
/*
|
|
||||||
* This is really a programmer error!
|
|
||||||
*
|
|
||||||
* The main/raw tevent context should
|
|
||||||
* have been registered first!
|
|
||||||
*/
|
|
||||||
DBG_ERR("Should not be used with a wrapper tevent context\n");
|
|
||||||
*err = EINVAL;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = messaging_dgm_init(ev, unique, socket_dir, lockfile_dir,
|
ret = messaging_dgm_init(ev, unique, socket_dir, lockfile_dir,
|
||||||
msg_dgm_ref_recv, NULL);
|
msg_dgm_ref_recv, NULL);
|
||||||
DBG_DEBUG("messaging_dgm_init returned %s\n", strerror(ret));
|
DBG_DEBUG("messaging_dgm_init returned %s\n", strerror(ret));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user