DEBUG(0,("%s[%p]: 1. %s\n", __location__, coro, state->string));
subreq = tevent_wakeup_send(state, ev, timeval_current_ofs(0,500));
- if (tevent_coroutine_nomem(subreq, coro)) {
- return tevent_coroutine_return(coro);
- }
tevent_coroutine_yield(coro, subreq);
ok = tevent_wakeup_recv(subreq);
TALLOC_FREE(subreq);
+ if (!ok) {
+ tevent_coroutine_error(coro, ENOTSUP);
+ return tevent_coroutine_return(coro);
+ }
DEBUG(0,("%s[%p]: 2. %s wakeup[%d]\n", __location__, coro, state->string, ok));
DEBUG(0,("%s:%s[%p]: 1. %s\n", __location__, __FUNCTION__, coro, state->string));
subreq = example_ocor_send(state, ev, state->string);
- if (tevent_coroutine_nomem(subreq, coro)) {
- return tevent_coroutine_return(coro);
- }
tevent_coroutine_yield(coro, subreq);
ret = example_ocor_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);
DEBUG(0,("%s:%s[%p]: 2. %s example_ocor[%d]\n", __location__, __FUNCTION__, coro, state->string, ret));
subreq = example_ocor_send(state, ev, state->string);
- if (tevent_coroutine_nomem(subreq, coro)) {
- return tevent_coroutine_return(coro);
- }
tevent_coroutine_yield(coro, subreq);
ret = example_ocor_recv(subreq, &sys_errno);
TALLOC_FREE(subreq);