* alternatively would be to track whether the
* immediate has already been scheduled. For
* now, avoid that complexity here.
- *
- * reg->ev and ctx->event_ctx can't
- * be wrapper tevent_context pointers
- * so we don't need to use
- * tevent_context_same_loop().
*/
if (reg->ev == ctx->event_ctx) {
sec_init();
- if (tevent_context_is_wrapper(ev)) {
- /* This is really a programmer error! */
- DBG_ERR("Should not be used with a wrapper tevent context\n");
- return NT_STATUS_INVALID_PARAMETER;
- }
-
lck_path = lock_path("msg.lock");
if (lck_path == NULL) {
return NT_STATUS_NO_MEMORY;
state->filter = filter;
state->private_data = private_data;
- if (tevent_context_is_wrapper(ev)) {
- /* This is really a programmer error! */
- DBG_ERR("Wrapper tevent context doesn't use main context.\n");
- tevent_req_error(req, EINVAL);
- return tevent_req_post(req, ev);
- }
-
/*
* We have to defer the callback here, as we might be called from
* within a different tevent_context than state->ev
bool consumed;
size_t i;
- /*
- * ev and msg_ctx->event_ctx can't be wrapper tevent_context pointers
- * so we don't need to use tevent_context_same_loop().
- */
-
if (ev == msg_ctx->event_ctx) {
consumed = messaging_dispatch_classic(msg_ctx, rec);
if (consumed) {
{
struct msg_ctdb_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_ctdb_ref);
if (result == NULL) {
*err = ENOMEM;
return EEXIST;
}
- if (tevent_context_is_wrapper(ev)) {
- /* This is really a programmer error! */
- DBG_ERR("Should not be used with a wrapper tevent context\n");
- return EINVAL;
- }
-
ctx = talloc_zero(NULL, struct messaging_dgm_context);
if (ctx == NULL) {
goto fail_nomem;
return NULL;
}
- if (tevent_context_is_wrapper(ev)) {
- /*
- * This is really a programmer error!
- */
- DBG_ERR("Should not be used with a wrapper tevent context\n");
- return NULL;
- }
-
fde = talloc(mem_ctx, struct messaging_dgm_fde);
if (fde == NULL) {
return NULL;
{
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);
if (result == NULL) {
*err = ENOMEM;