summaryrefslogtreecommitdiff
path: root/lib/tevent
Commit message (Collapse)AuthorAgeFilesLines
* py3: Remove duplicated PyUnicode_Check() after the py3 compat macros were ↵Andrew Bartlett2019-06-241-1/+1
| | | | | | | | | | | | removed This came about because in py2 we had to check for strings and unicode. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Mon Jun 24 18:48:53 UTC 2019 on sn-devel-184
* py3: Remove PyStr_AsUTF8() compatability macroAndrew Bartlett2019-06-241-4/+1
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_FromString() compatability macroAndrew Bartlett2019-06-241-3/+1
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_Check() compatability macroAndrew Bartlett2019-06-241-3/+1
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* tevent: Fix a typoVolker Lendecke2019-06-201-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* DLIST_REMOVE: clang: Fix dereference of a null pointer warningNoel Power2019-06-111-1/+1
| | | | | | | | | | | Fixes: lib/tevent/tevent_wrapper.c:295:3: warning: Access to field 'next' results in a dereference of a null pointer (loaded from field 'prev') <--[clang] Additionally fix similar instance of the same macro Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer gary@catalyst.net.nz
* lib/tevent: clang:Noel Power2019-06-111-0/+2
| | | | | | | | | Fixes: lib/tevent/tevent_wrapper.c:213:6: warning: Access to field 'destroyed' results in a dereference of a null pointer (loaded from variable 'glue') <--[clang] Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer gary@catalyst.net.nz
* lib/tevent: squash 'cast between incompatible function types' warningNoel Power2019-05-161-23/+50
| | | | | | | | | | | | | | squash 'cast between incompatible function types' warning To avoid warning above produced by using -Wcast-function-type we; + ensure PyCFunctions of type METH_NOARGS defined dummy arg + ensure PyCFunctions of type METH_KEYWORDS use PY_DISCARD_FUNC_SIG macro Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* tevent: Release tevent 0.10.0tevent-0.10.0Andrew Bartlett2019-03-212-1/+127
| | | | | | | | | | | * Remove Python 2.x support except to build just the bare C library * Remove --extra-python (a build time mode to produce Python2 and Python3 bindings at the same time) * New minor version to allow Samba 4.10 to release a tevent if required from that branch Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* build: Standardise on calling conf.SAMBA_CHECK_PYTHON() in librariesAndrew Bartlett2019-03-211-9/+2
| | | | | | | | | | | | | We do this by removing the confusing mandatory option to conf.SAMBA_CHECK_PYTHON{,_HEADERS}(), instead just use the value of --disable-python internally This follows the default minimum of Python 3.4 and keeps things consistent with the main Samba build where --disable-python is required to skip building python bindings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* build: Remove bld.gen_python_environments()Andrew Bartlett2019-03-211-7/+6
| | | | | | | This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* tevent: version 0.9.39tevent-0.9.39Stefan Metzmacher2019-02-262-1/+127
| | | | | | | | * py_tevent: add_timer takes float argument * C99 build fixes. * Fix standalone build of tevent. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Search for location of waf scriptDavid Mulder2019-02-261-1/+2
| | | | | | | | | | | | When calling make from the ldb, talloc, tdb, and tevent bundles, we need to first find the location of the waf script. Currently the build fails since it can't find waf. Fixes regression caused by a660b7f. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* py_tevent: add_timer takes float argumentDouglas Bagnall2019-02-081-2/+6
| | | | | | | We were already using it that way. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* lib:tevent: Use correct C99 initializer for tevent_reqAndreas Schneider2019-01-281-4/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* tevent: version 0.9.38tevent-0.9.38Stefan Metzmacher2019-01-152-1/+127
| | | | | | | | | | | | | | * Deprecate tevent wrapper api again * Build fixes * The build uses python3 by default: * --extra-python would take python2 now * To build with python2 only use: PYTHON=python2 ./configure PYTHON=python2 make PYTHON=python2 make install Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org>
* tevent: deprecate tevent_wrapper api againStefan Metzmacher2019-01-127-5/+18
| | | | | | | | | | | | Samba doesn't use it anymore and we don't want to invite new users of that api without further discussion. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jan 12 03:12:09 CET 2019 on sn-devel-144
* Fix typos and ban the rams from sambatdb-1.3.17Swen Schillig2019-01-101-1/+1
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* build: Move python detection back into waf (instead of in configure and ↵Andrew Bartlett2018-12-142-2/+1
| | | | | | | | | | | | | | | | | | | Makefile) This avoids creating a mini-configure in the configure script. Users wishing to use python2 to build need to specify PYTHON= to both ./configure and make After we merged the python3 change, it became clear that relying on systems prefixing the correct python just causes trouble and make debugging harder, so only use $PYTHON for the override, not the default case This essentially reverts a660b7fb8e519bd3be558fd0425bff8f287fca1f but leaves the files more consistent. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* build: Workaround python3 hash order issues (for now)Andrew Bartlett2018-12-131-1/+1
| | | | | | | | | | | This works around python3 having a new hash seed each time it starts to allow a second "make" not to rebuild the world. This should probably be reverted once we find the hash that is causing the issue, but should reduce frustration for now. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PY3: switch current build to use python3Noel Power2018-12-102-3/+4
| | | | | | | | | | | | | | Make sure default make and configure for all now defaults to building with python3. To build a samba (or sub component e.g. talloc etc.) with python3 ./configure && make To build a samba (or sub component e.g. talloc etc.) with python2 PYTHON=python ./configure && PYTHON=python make Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix spelling mistakesOlly Betts2018-11-301-1/+1
| | | | | | Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Avoid the use of open_memstream in tevent_req_profile_stringVolker Lendecke2018-10-081-2/+13
| | | | | | | | Solaris does not have it. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13629 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: Fix a docu typoVolker Lendecke2018-09-141-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib/tevent/wscript: update to handle waf 2.0.4Alexander Bokovoy2018-09-051-10/+11
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* PEP8: fix E306: expected 1 blank line before a nested definition, found 0Joe Guo2018-08-241-0/+2
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E305: expected 2 blank lines after class or function definition, ↵Joe Guo2018-08-241-0/+1
| | | | | | | | found 1 Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E302: expected 2 blank lines, found 1Joe Guo2018-08-241-0/+1
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E123: closing bracket does not match indentation of opening ↵Joe Guo2018-08-241-1/+1
| | | | | | | | bracket's line Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* Minor, really small, documentation fix.Richard Sharpe2018-08-061-1/+1
| | | | | Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* tevent: use talloc_zero_size() for the private state in ↵Stefan Metzmacher2018-07-241-1/+1
| | | | | | | | | | tevent_context_wrapper_create() This is watch tevent_req_create() uses and what callers of tevent_context_wrapper_create() would therefore also expect. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: fix CID 1437974 dereference after null checkRalph Boehme2018-07-171-1/+1
| | | | | | | | | | | | Probably a copy/paste error from the tevent_debug() statement a few lines above as at this place we want to pass main_ev directly to tevent_debug() anyway. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 17 16:21:21 CEST 2018 on sn-devel-144
* tevent: fix CID 1437976 dereference before null checkRalph Boehme2018-07-171-1/+3
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* torture: Test tevent_req_profileVolker Lendecke2018-07-111-0/+277
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: version 0.9.37tevent-0.9.37Stefan Metzmacher2018-07-113-27/+127
| | | | | | | | | | | | * simplify "poll" and "poll_mt" backends * make tevent_abort() reachable for backends * add tevent_common_invoke_*_handler() functions * add tevent_context_same_loop() function * add tevent_context_wrapper_create() infrastructure * add tevent_req_profile infrastructure Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: Add tevent_req_profileVolker Lendecke2018-07-114-0/+422
| | | | | | | This allows detailed reporting where a tevent_req spends its time Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: add a test that frees wrapper_ev with pending eventsRalph Boehme2018-07-111-0/+157
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: add a simple wrapper testRalph Boehme2018-07-111-0/+356
| | | | | | | | This checks that for all supported event types the before and after handlers are called. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: add tevent_context_wrapper_create() infrastructureStefan Metzmacher2018-07-1114-19/+1069
| | | | | | | | | | | | | | This allows to specify wrapper tevent_contexts, which adds the ability to run functions before and after the event handler functions. This can be used to implement impersonation hooks or advanced debugging/profiling hooks. We'll undo the 0.9.36 ABI change on the 0.9.37 release at the end of this patchset. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: make use of #include "system/threads.h"Stefan Metzmacher2018-07-112-3/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: split out tevent_common_invoke_fd_handler()Stefan Metzmacher2018-07-116-6/+47
| | | | | | | | We'll undo the 0.9.36 ABI change on the 0.9.37 release at the end of this patchset. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: split out tevent_common_invoke_immediate_handler()Stefan Metzmacher2018-07-114-23/+75
| | | | | | | | We'll undo the 0.9.36 ABI change on the 0.9.37 release at the end of this patchset. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: split out tevent_common_invoke_timer_handler()Stefan Metzmacher2018-07-113-38/+78
| | | | | | | | | | | As side effect this avoids tricks with an extra tevent_common_timed_deny_destructor(). We'll undo the 0.9.36 ABI change on the 0.9.37 release at the end of this patchset. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: split out tevent_common_invoke_signal_handler()Stefan Metzmacher2018-07-113-38/+69
| | | | | | | | | | | As side effect this avoids tricks with tevent_se_exists_destructor() to figure out if the event handler removed itself. We'll undo the 0.9.36 ABI change on the 0.9.37 release at the end of this patchset. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: simplify tevent_signal_destructor()Stefan Metzmacher2018-07-111-14/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: use talloc_zero() in tevent_signal.cStefan Metzmacher2018-07-111-3/+3
| | | | | | | | This might not be strictly required, but it might avoid problems in future... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: simplify tevent_cleanup_pending_signal_handlers()Stefan Metzmacher2018-07-111-13/+3
| | | | | | | | | | Calling tevent_signal_destructor() does the same as se->event_ctx is already NULL. This also makes sure we correctly cleanup the SA_SIGINFO array. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: add tevent_common_check_double_free() helper functionStefan Metzmacher2018-07-113-0/+22
| | | | | | | | | | | | | | This will be used to generically support TALLOC_FREE() on event which are currently running. It aborts on every explicit talloc_free(), but ignores implicit cleanup when the talloc parent is about to go. We'll undo the 0.9.36 ABI change on the 0.9.37 release at the end of this patchset. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: add tevent_threaded_schedule_immediate_destructor that just abortsStefan Metzmacher2018-07-111-0/+16
| | | | | | | | This will be active while the event is part of the ev->scheduled_immediates list. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* tevent: use _tevent_schedule_immediate() to move events from a thread to the ↵Stefan Metzmacher2018-07-112-4/+18
| | | | | | | main_ev Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>