summaryrefslogtreecommitdiff
path: root/lib/messaging
Commit message (Collapse)AuthorAgeFilesLines
* lib:messaging: Fix code spellingAndreas Schneider2023-04-111-1/+1
| | | | | | Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
* lib/messaging: s/getpid/tevent_cached_getpidStefan Metzmacher2022-07-252-10/+10
| | | | | | | | Our messaging code is very performance critical and we should note waste time in getpid() syscalls... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging: Fix receiving file descriptorsVolker Lendecke2021-03-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Don't close unconsumed file descriptors in messaging_recv_cb(). Via multiple registrations on different tevent contexts we might call messaging_recv_cb() multiple times: All but the first tevent context handled in the loop in msg_dgm_ref_recv() will not see file descriptors anymore, it will just get a -1, even if the first reference had no receiver interested in the fds. Change the API such that consumers can set the file descriptor to -1 if it's consumed. If nobody wanted them, do the close where they were created via recvmsg, in messages_dgm.c. If you want multiple handlers to consume the file descriptors, you should dup() them in the filter function handed to messaging_filtered_read_send and save the duplicate in your private data for later consumption. 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): Fri Mar 19 08:18:26 UTC 2021 on sn-devel-184
* lib: Protect "messaging_dgm_init()" from NULL dirsVolker Lendecke2021-03-091-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Avoid a cast in messages_dgmVolker Lendecke2021-03-091-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme2020-08-031-0/+1
| | | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
* lib/messaging: Move messages_dgm out of source3Amitay Isaacs2020-05-065-0/+2047
... so CTDB can also use it. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org>