1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

124 Commits

Author SHA1 Message Date
Volker Lendecke
d0aedeb46e Increase tevent version for tevent_req_notify_callback() 2009-06-04 17:50:44 +02:00
Volker Lendecke
c6f39b46a7 Add tevent_req_notify_callback
This is necessary for requests that have multiple results. Examples would be
SMBEcho and ldap_search.
2009-06-04 17:29:48 +02:00
Jelmer Vernooij
cf9636ea99 tevent/python: Makefile was still trying to build some non AC_SUBST python targets
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
2009-05-19 23:33:00 +02:00
Jelmer Vernooij
72b744f38e tevent: Define TALLOC_FREE() if it's not defined yet, to allow building
with released versions of talloc.
2009-05-16 20:31:59 +02:00
Jelmer Vernooij
5065cf70f8 tevent: Remove python module.
This module didn't have any functionality that we actually used yet, and
it was quite small.

Tevent is quite low level and perhaps doesn't make much sense to expose
directly as a Python module. It was also causing build problems when used with a
system-tevent. We can always back later if necessary.
2009-05-16 14:56:37 +02:00
Jelmer Vernooij
857c3f8322 tevent: Install tevent_internal.h in the standalone build.
This is not ideal, but at least it fixes the build of samba-gtk for now.
I've also added a warning about API guarantees at the top of the header.
2009-05-16 04:14:21 +02:00
Jelmer Vernooij
6230eb94af Update copies of config.guess and config.sub. 2009-05-16 04:03:12 +02:00
Jelmer Vernooij
06864b4469 tevent: Don't install headers, since we don't install a shared lib
either (from Samba).
2009-05-16 01:54:10 +02:00
Stefan Metzmacher
6f7cd213dd tevent: fix typo async_req_done() => tevent_req_done()
metze
2009-05-07 08:09:56 +02:00
Stefan Metzmacher
36e7045340 tevent: fix the nesting logic
Only tevent_loop_once and tevent_loop_until() should care
about the nesting level.

This fixes the samba3 printing code where we use tevent_loop_wait()
and don't allow nested events.

We still call the nesting hook for all levels, we need to decide
if we really want this...

metze
2009-03-19 14:39:22 +01:00
Andrew Tridgell
13b6663e23 fixed a logic bug in the tevent nesting code
The event nesting code never triggered as nesting.level was never
greater than 1. The main event loop needs to increase the nesting
level by 1.

I also added a paranoia check to the nesting setup call. The API as
currently written cannot support multiple nesting hooks, so we need to
abort if multiple hooks are tried.
2009-03-19 11:21:36 +11:00
Stefan Metzmacher
7d07266ca2 tevent: change version to 0.9.5 after the ABI has changed
metze
2009-03-17 20:19:11 +01:00
Stefan Metzmacher
9eaf53d98e tevent: store the location where a request was finished
This is very useful to find bugs.
You can use 'p *req' in gdb to show where
tevent_req_done(), tevent_req_error() or tevent_req_nomem()
was called.

metze
2009-03-17 20:17:01 +01:00
Stefan Metzmacher
3a831e4620 tevent: use an immediate event as trigger for tevent_queue
metze
2009-03-17 19:59:09 +01:00
Stefan Metzmacher
4bdf299385 tevent: use an immediate event fot tevent_req_post()
Now tevent_req_post() never fails

metze
2009-03-17 19:59:08 +01:00
Stefan Metzmacher
a78cd2a24b tevent: use TALLOC_FREE() in tevent_req.c
metze
2009-03-17 19:59:08 +01:00
Stefan Metzmacher
66886f8966 tevent: add support for immediate events
They're like directly triggered timed events,
but you can preallocated them and scheduling them
will not fail.

metze
2009-03-17 19:59:00 +01:00
Stefan Metzmacher
940e61846e tevent: add tevent_common_loop_wait() helper function and use it
tevent_loop_wait should do the same for all backends.
It should loop as long as we have pending events.

metze
2009-03-17 19:58:57 +01:00
Stefan Metzmacher
0139befb91 tevent: check signal events first in event_loop_once
We also check for signal events directly before and after
the select/epoll calls.

metze
2009-03-17 19:58:56 +01:00
Stefan Metzmacher
3af7db3dce tevent: let tevent_loop_once() just run one fd event
This makes the logic much simpler for the callers,
and matches the samba3 behavior.

If needed we can add performance tunning for tevent_loop_wait()
later.

metze
2009-03-17 19:58:55 +01:00
Stefan Metzmacher
868f3f5f32 tevent: change version to 0.9.4 as the ABI has changed
metze
2009-03-13 15:49:35 +01:00
Tim Prouty
a84f939f4f tevent: Fix might be unitialized warning 2009-03-12 12:28:13 -07:00
Stefan Metzmacher
cb388882cf tevent: add tevent_loop_until()
This is only a hack for samba4 and should not be used
in new code.

metze
2009-03-12 14:21:26 +01:00
Stefan Metzmacher
7142ef49bd tevent: add tevent_loop_set_nesting_hook()
This is an ugly hack to let the s4 server work arround
some bugs related to nested events and uid changing.

metze
2009-03-12 14:21:26 +01:00
Stefan Metzmacher
06f88fe7a2 tevent: don't allow nested tevent_loop_once() anymore
Incompatible caller should use tevent_loop_allow_nesting()
function.

metze
2009-03-12 12:14:18 +01:00
Stefan Metzmacher
9932fd2d9a tevent: pass __location__ to tevent_loop_once/wait()
metze
2009-03-12 12:12:34 +01:00
Stefan Metzmacher
880d9d6d8c tevent: add tevent_set_abort_fn()
metze
2009-03-12 12:04:33 +01:00
Stefan Metzmacher
43a7d48d24 tevent: add tevent_signal_support()
Not every tevent backend supports signal events.

metze
2009-03-12 12:04:31 +01:00
Stefan Metzmacher
825949b810 tevent: add tevent_req_callback_data_void() macro
Callers can use it instead of tevent_req_callback_data()
if they use a non talloc private pointer.

metze
2009-03-10 16:44:44 +01:00
Stefan Metzmacher
09d1b2324c tevent: add tevent_req_received() function
This function can be called as last action of a _recv()
function, it destroys the data attached to the tevent_req.

metze
2009-03-10 16:44:44 +01:00
Simo Sorce
67d41d0fc7 Make struct tevent_req opaque
Move struct tevent_req in tevent_internal, and ad getters and setters
for private data and the callback function.
This patch also renames 'private_state' into 'data'. What is held in this
pointer is in fact data and not a state like enum tevent_req_state.
Calling it 'state' is confusing.

The functions addedd are:
tevent_req_set_callback() - sets req->async.fn and req->async.private_data
tevent_req_set_print_fn() - sets req->private_print
tevent_req_callback_data() - gets req->async.private_data
tevent_req_data() - gets rea->data

This way it is much simpler to keep API/ABI compatibility in the future.
2009-03-02 11:02:09 -05:00
Jelmer Vernooij
09ac816b36 Merge branch 'master' of git://git.samba.org/samba into teventfix
Conflicts:
	lib/tevent/pytevent.c
2009-03-01 16:39:35 +01:00
Jelmer Vernooij
235244f4cc Avoid using tevent_util.h, which won't be available if we use the system
tevent.
2009-03-01 16:38:07 +01:00
Stefan Metzmacher
3a1f24f286 tevent: add tevent_queue infrastructure
metze
2009-02-26 14:22:12 +01:00
Stefan Metzmacher
e2f37ec106 tevent: add private_print function feature to tevent_req
metze
2009-02-25 14:30:55 +01:00
Stefan Metzmacher
13ac0dc456 tevent: add tevent_req_poll() function
metze
2009-02-25 14:08:36 +01:00
Volker Lendecke
9e3178e838 Attempt to fix the OpenChange build -- sorry for the break 2009-02-25 11:02:48 +01:00
Volker Lendecke
70814474f5 tevent.h requires bool and uint[16|32|64]_t 2009-02-24 20:40:46 +01:00
Jelmer Vernooij
c9a057bc04 pytevent: Fix include path - tevent_util is not installed. 2009-02-21 19:08:24 +01:00
Stefan Metzmacher
975a881d54 tevent: add tevent_wakeup_send/recv()
This can be used as tevent_req based timer event.

metze
2009-02-18 10:31:36 +01:00
Stefan Metzmacher
7f6618a3de tevent: rename tevent_req_set_timeout() => tevent_req_set_endtime()
This makes more clear what the function does.

metze
2009-02-18 10:31:35 +01:00
Kai Blin
48b874e376 tevent: Rename ev_timeval* functions to tevent_timeval, export them.
Also add tevent_timeval_add() and tevent_timeval_current_ofs()
to help not depending on lub/util/time.c for things that just need tevent
2009-02-17 09:19:31 +01:00
Stefan Metzmacher
406e6d6114 tevent: fix compiler warning in pytevent.c
metze
2009-02-16 09:53:49 +01:00
Stefan Metzmacher
6211162d3e lib/tevent: change to LGPLv3+
metze
2009-02-16 08:53:25 +01:00
Volker Lendecke
f0440d0d56 Add missing prototype for "tevent_req_print" 2009-02-14 22:00:44 +01:00
Volker Lendecke
d39849ddcd Fix a warning and a bug: pipe(2) can fail 2009-02-14 22:00:44 +01:00
Volker Lendecke
01aff219dd Add two variable assignments to shut up gcc 2009-02-14 22:00:43 +01:00
Stefan Metzmacher
946573aaed tevent: raise version to 0.9.3
- aio events are removed
- tevent_req infrastructure was added

metze
2009-02-13 18:55:21 +01:00
Stefan Metzmacher
113651c517 lib/tevent: add tevent_req infrastructure
This is almost a copy of the async_req code,
which will be removed later.

metze
2009-02-13 18:37:01 +01:00
Stefan Metzmacher
f337974ed5 lib/tevent: add tevent_req.c as copy of lib/async_req/async_req.c
metze
2009-02-13 16:02:14 +01:00