summaryrefslogtreecommitdiffstats
path: root/lib/tevent
Commit message (Collapse)AuthorAgeFilesLines
* Another part of the fix for bug 6651 - smbd SIGSEGV when breaking oplocks.Jeremy Allison2009-09-031-2/+6
| | | | | | SA_INFO_QUEUE_COUNT *MUST* be a power of 2, in order for the ring buffer wrap to work correctly at the 32 bit boundary. Thanks to Petr Vandrovec <petr@vandrovec.name> for this.
* tevent: Fix a segfault upon the first signalVolker Lendecke2009-08-291-0/+6
| | | | | | | | | | | | | When the first signal arrives, tevent_common_signal_handler() crashed: "ev" is initialized to NULL, so the first "write(ev->pipe_fds[1], &c, 1);" dereferences NULL. Rusty, Tridge, please check. Also, can you tell me a bit more about the environment you tested this in? I'd be curious to see where this survived. Thanks, Volker
* lib/tevent: close pipe_fds on event_context destructionRusty Russell2009-08-281-0/+2
| | | | | | | The "hack_fds" were never closed before; now they're inside event_context they should be closed when that is destroyed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tevent: handle tevent_common_add_signal on different event contexts.Rusty Russell2009-08-282-14/+31
| | | | | | | | | | I don't know if this is a problem in real life. The code assumes there's only one tevent_context; all signals will notify the first event context. That's counter-intuitive if you ever use more than one, and there's nothing else in this code which prevents it AFAICT. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tevent: fix race with signals and tevent_common_add_signalRusty Russell2009-08-281-20/+20
| | | | | | | | | | | We carefully preserve the old signal handler, but we replace it before we've set up everything; in particular, if we fail setting up the pipe_hack we could write a NUL char to stdout (fd 0), instead of calling the old signal handler. Replace the signal handler as the very last thing we do. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tevent: remove spectacularly complicated manual subtractionRusty Russell2009-08-281-4/+1
| | | | | | | | | | | To be completely honest, I don't quite know whether to laugh or cry at this one: 1 + (0xFFFFFFFF & ~(s.seen - s.count)) == 1 + (~(s.seen - s.count)) # s.seen, s.count are uint32_t == s.count - s.seen # -A == ~A + 1 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tevent: avoid using reserved c++ word.Günther Deschner2009-08-241-1/+1
| | | | Guenther
* Fix for bug 6651 - smbd SIGSEGV when breaking oplocks.Jeremy Allison2009-08-211-17/+54
| | | | | | | Based on a patch submitted by Petr Vandrovec <petr@vandrovec.name>. Multiple pending signals with siginfo_t's weren't being handled correctly leading to smbd abort with kernel oplock signals. Jeremy
* tevent: fix a commentMichael Adam2009-08-191-1/+1
| | | | Michael
* tevent: change version to 0.9.7 after adding tevent_req_cancel infrastructureStefan Metzmacher2009-08-171-1/+1
| | | | metze
* tevent: add tevent_req_cancel() infrastructureStefan Metzmacher2009-08-173-0/+70
| | | | | | | This offers a generic way for callers to cancel an async request. metze
* tevent: add some more doxygen comments for tevent_req functionsStefan Metzmacher2009-08-151-0/+38
| | | | metze
* tevent: try to fix the build on QNX qnx18 6.4.1 it doesn't have SA_RESTART ↵Stefan Metzmacher2009-07-161-1/+11
| | | | | | defined metze
* Change to talloc_zero_size instead of extra memset.Jeremy Allison2009-07-141-2/+1
| | | | Jeremy.
* When tallocing a memory block for the state in a tevent_req struct,Jeremy Allison2009-07-141-0/+1
| | | | | ensure it's zeroed out. Vl & Metze please check. Jeremy.
* Sort the signature filesSimo Sorce2009-07-032-45/+45
|
* Expose functions need by backend writersSimo Sorce2009-07-035-52/+67
| | | | | | | move publicly needed structures and functions in the public header. Stop installing internal headers. Update the signature and exports files with the new exposed function.
* Revert "For tevent to install tevent_util.h"Simo Sorce2009-06-181-1/+0
| | | | | | This reverts commit b112cc5503350b248949bdbcce8072f5523ce877. tevent_util.h is a private header. Must not be installed.
* For tevent to install tevent_util.hEric Sandall2009-06-181-0/+1
| | | | | | | Patch for bug #6270 This patch is for the future when samba4 builds using external libraries. With this patch, tevent now installs tevent_util.h which is required by samba4.
* Add exports file and abi checker for teventSimo Sorce2009-06-157-2/+157
| | | | | | | | This is a first attempt at exporting symbols only for public functions We also provide a rudimentary ABI checker that tries to check that function signatures are not changed by mistake. Given our use of macros this is not an API checker. It's all based on tevent.h contents and the gcc -aux-info option
* Increase tevent version for tevent_req_notify_callback()Volker Lendecke2009-06-041-1/+1
|
* Add tevent_req_notify_callbackVolker Lendecke2009-06-042-4/+13
| | | | | This is necessary for requests that have multiple results. Examples would be SMBEcho and ldap_search.
* tevent/python: Makefile was still trying to build some non AC_SUBST python ↵Jelmer Vernooij2009-05-191-7/+1
| | | | | targets Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
* tevent: Define TALLOC_FREE() if it's not defined yet, to allow buildingJelmer Vernooij2009-05-161-0/+6
| | | | with released versions of talloc.
* tevent: Remove python module.Jelmer Vernooij2009-05-166-219/+0
| | | | | | | | | 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.
* tevent: Install tevent_internal.h in the standalone build.Jelmer Vernooij2009-05-162-1/+4
| | | | | 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.
* Update copies of config.guess and config.sub.Jelmer Vernooij2009-05-162-76/+282
|
* tevent: Don't install headers, since we don't install a shared libJelmer Vernooij2009-05-161-5/+0
| | | | either (from Samba).
* tevent: fix typo async_req_done() => tevent_req_done()Stefan Metzmacher2009-05-071-1/+1
| | | | metze
* tevent: fix the nesting logicStefan Metzmacher2009-03-191-7/+7
| | | | | | | | | | | | | 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
* fixed a logic bug in the tevent nesting codeAndrew Tridgell2009-03-191-1/+13
| | | | | | | | | | 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.
* tevent: change version to 0.9.5 after the ABI has changedStefan Metzmacher2009-03-171-1/+1
| | | | metze
* tevent: store the location where a request was finishedStefan Metzmacher2009-03-173-19/+48
| | | | | | | | | 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
* tevent: use an immediate event as trigger for tevent_queueStefan Metzmacher2009-03-172-42/+60
| | | | metze
* tevent: use an immediate event fot tevent_req_post()Stefan Metzmacher2009-03-172-19/+13
| | | | | | Now tevent_req_post() never fails metze
* tevent: use TALLOC_FREE() in tevent_req.cStefan Metzmacher2009-03-171-9/+5
| | | | metze
* tevent: add support for immediate eventsStefan Metzmacher2009-03-178-34/+295
| | | | | | | | They're like directly triggered timed events, but you can preallocated them and scheduling them will not fail. metze
* tevent: add tevent_common_loop_wait() helper function and use itStefan Metzmacher2009-03-175-55/+33
| | | | | | | tevent_loop_wait should do the same for all backends. It should loop as long as we have pending events. metze
* tevent: check signal events first in event_loop_onceStefan Metzmacher2009-03-173-0/+15
| | | | | | | We also check for signal events directly before and after the select/epoll calls. metze
* tevent: let tevent_loop_once() just run one fd eventStefan Metzmacher2009-03-173-45/+7
| | | | | | | | | | 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
* tevent: change version to 0.9.4 as the ABI has changedStefan Metzmacher2009-03-131-1/+1
| | | | metze
* tevent: Fix might be unitialized warningTim Prouty2009-03-121-1/+1
|
* tevent: add tevent_loop_until()Stefan Metzmacher2009-03-122-0/+68
| | | | | | | This is only a hack for samba4 and should not be used in new code. metze
* tevent: add tevent_loop_set_nesting_hook()Stefan Metzmacher2009-03-123-1/+50
| | | | | | | This is an ugly hack to let the s4 server work arround some bugs related to nested events and uid changing. metze
* tevent: don't allow nested tevent_loop_once() anymoreStefan Metzmacher2009-03-123-1/+53
| | | | | | | Incompatible caller should use tevent_loop_allow_nesting() function. metze
* tevent: pass __location__ to tevent_loop_once/wait()Stefan Metzmacher2009-03-126-17/+22
| | | | metze
* tevent: add tevent_set_abort_fn()Stefan Metzmacher2009-03-122-0/+21
| | | | metze
* tevent: add tevent_signal_support()Stefan Metzmacher2009-03-122-0/+10
| | | | | | Not every tevent backend supports signal events. metze
* tevent: add tevent_req_callback_data_void() macroStefan Metzmacher2009-03-101-0/+2
| | | | | | | Callers can use it instead of tevent_req_callback_data() if they use a non talloc private pointer. metze
* tevent: add tevent_req_received() functionStefan Metzmacher2009-03-103-2/+29
| | | | | | | This function can be called as last action of a _recv() function, it destroys the data attached to the tevent_req. metze