summaryrefslogtreecommitdiffstats
path: root/lib/tevent
Commit message (Collapse)AuthorAgeFilesLines
* tevent: version 0.9.24David Disseldorp2015-03-042-1/+89
| | | | | | | | | | * Ignore unsolicited signal wakeup in tevent_port event loop. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Mar 4 08:33:06 CET 2015 on sn-devel-104
* tevent: Ignore unexpected signal events in the same way the epoll backend does.Jeremy Allison2015-03-031-3/+9
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11118 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Mar 3 17:33:06 CET 2015 on sn-devel-104
* tevent: version 0.9.23Michael Adam2015-02-272-1/+89
| | | | | | | | | | | | * Add Solaris ports as tevent backend. * Improvements to the tevent_data tutorial. * Remove use of the 'staticforward' macro. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Feb 27 03:48:57 CET 2015 on sn-devel-104
* Add Solaris ports as a tevent backend.Jeremy Allison2015-02-154-1/+789
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104
* Update the tevent_data.dox tutrial stuff to fix some errors, including whiteRichard Sharpe2015-01-241-13/+17
| | | | | | | | | | space problems. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Ralph Boehme <rb@sernet.de> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Sat Jan 24 09:33:03 CET 2015 on sn-devel-104
* Remove use of the "staticforward" macroPetr Viktorin2015-01-221-6/+6
| | | | | | | | | | This macro was used for compatibility with broken compilers. Since Python 2.3, it is always defined as `static`, and only exists "for source compatibility with old C extensions". Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* tevent: version 0.9.22Stefan Metzmacher2014-09-302-1/+89
| | | | | | | | | | | * pkgconfig fixes * Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables. https://bugzilla.samba.org/show_bug.cgi?id=10640 * Minor compile fixes Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* tevent: remove unused exit_code in tevent_select.cStefan Metzmacher2014-09-301-4/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* tevent: remove unused exit_code in tevent_poll.cStefan Metzmacher2014-09-301-3/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Polish echo_serverVolker Lendecke2014-09-181-4/+4
| | | | | | | | | | | Samba has a lot of struct assignments now, in a lot of cases it simplifies the code. Use it in the sample code. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Sep 18 23:02:38 CEST 2014 on sn-devel-104
* tevent:build: improve detection of srcdirMichael Adam2014-06-201-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* lib: tevent: make TEVENT_SIG_INCREMENT atomic.Jeremy Allison2014-06-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | On arm platforms incrementing a variable is not an atomic operation, so may be interrupted by signal processing (if a signal interrupts another signal handler). Use compiler built-ins to make this atomic. __sync_fetch_and_add() works on gcc, llvm, IBM xlC on AIX, and Intel icc (10.1 and above). atomic_add_32() works on Oracle Solaris. Based on an inital patch from kamei@osstech.co.jp. Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables https://bugzilla.samba.org/show_bug.cgi?id=10640 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* tevent: Update flags in tevent pkgconfig fileLukas Slebodnik2014-04-041-2/+2
| | | | | | | | | | | After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is used on install. But "-Wl," will be passed to linker and should not be among CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place. @see commit 735c1cd2da15167748e92ba6de48fdb5169db587 Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dlinklist: Fix a typoVolker Lendecke2014-04-021-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Apr 2 17:11:37 CEST 2014 on sn-devel-104
* lib/tevent/tests: add missing #include "torture/local/proto.h"Stefan Metzmacher2014-04-021-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tevent: version 0.9.21Stefan Metzmacher2014-01-172-1/+89
| | | | | | | | | | | | | | | This fixes a the following bugs: - fix a crash bug in tevent_queue_immediate_trigger() - add missing tevent_num_signals() and tevent_sa_info_queue_count() prototypes including documentation. This adds the following new features: - tevent_req_set_cleanup_fn() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: add tevent_req_set_cleanup_fn()Stefan Metzmacher2014-01-173-0/+77
| | | | | | | | | | | | | | | | | | | | | | | Note that some callers used their own destructor for their tevent_req instance, they'll just overwrite this, which is not intended, but works without problems. The intended way is to specify a cleanup function and handle the TEVENT_REQ_RECEIVED state as destructor. Note that the TEVENT_REQ_RECEIVED cleanup event might be triggered by an explicit tevent_req_received() in the _recv() function. The TEVENT_REQ_RECEIVED event is only triggered once as tevent_req_received() will remove the destructor. So the difference compared to a custom destructor is that the struct tevent_req itself can continue to be there, while tevent_req_received() removed all internal state. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: add/use tevent_req_destructorStefan Metzmacher2014-01-171-1/+14
| | | | | | | | | | | | This makes sure we call tevent_req_received(req) on talloc_free() and cleanup things in a defined order. Note that some callers used their own destructor for their tevent_req instance, they'll just overwrite this, which is not intended, but works without problems. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: add doxygen comments for tevent_num_signals() and ↵Stefan Metzmacher2014-01-171-0/+23
| | | | | | | tevent_sa_info_queue_count() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: Add prototypesVolker Lendecke2014-01-171-0/+4
| | | | | | | ... doxygen docs to be filled in :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: Only build "std_fallback_to_poll" when epoll is aroundVolker Lendecke2014-01-171-0/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: fix crash bug in tevent_queue_immediate_trigger()Stefan Metzmacher2014-01-171-0/+4
| | | | | | | | | | | Assume we we have a queue with 2 entries (A and B with triggerA() and triggerB()). If triggerA() removes itself tevent_queue_entry_destructor() will be called for A, this schedules the immediate event to call triggerB(). If triggerA() then also removes B by an explicit of implizit talloc_free(), q->list is NULL, but the immediate event is still scheduled and can't be unscheduled. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Do not return a value from a void function.Simo Sorce2013-12-261-1/+0
| | | | | | | | Reported by herwin <samba@herwinw.nl> Resolves: https://bugzilla.samba.org/show_bug.cgi?id=10346 Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: Fix CID 1138326 Unchecked return valueVolker Lendecke2013-12-171-1/+1
| | | | | | | For this case we explicitly have added tevent_req_oom Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: version 0.9.20Stefan Metzmacher2013-12-122-1/+88
| | | | | | | | | | | | | | This adds the following new features: - tevent_queue_wait_send/recv() - tevent_num_signals() - tevent_sa_info_queue_count() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Dec 12 00:39:35 CET 2013 on sn-devel-104
* tevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and ↵Stefan Metzmacher2013-12-111-0/+10
| | | | | | | | | | | TEVENT_SA_INFO_QUEUE_COUNT This way the caller can change use the supported limits without using hardcoded values. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256Stefan Metzmacher2013-12-111-1/+1
| | | | | | | | | | | There are some existing callers which assume the old SA_INFO_QUEUE_COUNT 100 value. 256 should give room for the future. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: tevent_epoll_set_panic_fallback() can be a void functionStefan Metzmacher2013-12-113-6/+3
| | | | | | | There's no case where this could return an error. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_epoll.cStefan Metzmacher2013-12-111-15/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_signal.cStefan Metzmacher2013-12-111-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_select.cStefan Metzmacher2013-12-111-6/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_req.cStefan Metzmacher2013-12-111-4/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_queue.cStefan Metzmacher2013-12-111-2/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: use talloc_get_type_abort() in the documentation examplesStefan Metzmacher2013-12-111-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: add tevent_queue_wait_send/recv()Gregor Beck2013-12-112-0/+85
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: tevent_req_create() already uses ZERO_STRUCT(req)Stefan Metzmacher2013-12-111-2/+0
| | | | | | | There's no need to zero individual members. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: let tevent_req_received() clear the private_cancel functionStefan Metzmacher2013-12-111-0/+1
| | | | | | | This makes sure it's not called when the private state is already gone. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: cancel the timeout timer when the request is finishedStefan Metzmacher2013-12-111-0/+6
| | | | | | | | As we might defer the callback with tevent_req_defer_callback() when calling tevent_req_done(), we should cancel the timeout directly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: Use talloc_pooled_object for tevent_req_createVolker Lendecke2013-09-081-1/+4
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Sep 8 13:39:25 CEST 2013 on sn-devel-104
* tevent: Remove a pointless gotoVolker Lendecke2013-08-161-4/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* tevent: Fix tutorial referenceVolker Lendecke2013-08-121-5/+3
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Aug 12 09:17:10 CEST 2013 on sn-devel-104
* tevent: Add echo server sample codeVolker Lendecke2013-08-051-0/+664
| | | | | | | | | | | | This is under a deliberately permissive license. I would like people to start using libtevent and tevent_req (LGPL) without any worries about where to start from. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Aug 5 04:07:58 CEST 2013 on sn-devel-104
* tevent: change version to 0.9.19Stefan Metzmacher2013-08-012-1/+84
| | | | | | | | | | | | * Fix tevent testsuite issue on Solaris. * Add tevent tuturial and documentation updates * Fix Coverity ID 989236 Operands don't affect result * Bug: https://bugzilla.samba.org/show_bug.cgi?id=10012 Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Aug 1 17:05:02 CEST 2013 on sn-devel-104
* tevent: Remove the signal pipe if no signal events are aroundVolker Lendecke2013-08-011-1/+13
| | | | | | | | | | | | It makes adding/removing the first/last sigevents a bit more expensive, but it will fix tevent_loop_wait not finishing when one signal event was added and removed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10012 Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* tevent: document tevent_req_create state zeroingDavid Disseldorp2013-07-081-3/+3
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 8 20:43:49 CEST 2013 on sn-devel-104
* tevent: Fix a typoVolker Lendecke2013-07-051-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Fri Jul 5 11:10:07 CEST 2013 on sn-devel-104
* Fix some blank line endingsVolker Lendecke2013-06-211-4/+4
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jun 21 19:57:06 CEST 2013 on sn-devel-104
* tevent: Fix Coverity ID 989236 Operands don't affect resultVolker Lendecke2013-06-141-1/+1
| | | | | | | "unsigned" could be less than uint64_t, so idx==UINT64_MAX is always false. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: Link the tutorial on the mainpage.Andreas Schneider2013-06-122-157/+535
| | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jun 12 19:54:30 CEST 2013 on sn-devel-104
* tevent: Add tevent tutorial files.David Koňař2013-06-128-0/+1034
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>