mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
smbd: Move messaging_cleanup() to the cleanupd
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
1dddba5f17
commit
99833c9428
@ -558,7 +558,6 @@ static void remove_child_pid(struct smbd_parent_context *parent,
|
||||
struct server_id child_id;
|
||||
struct iovec iov[2];
|
||||
NTSTATUS status;
|
||||
int ret;
|
||||
|
||||
child_id = pid_to_procid(pid);
|
||||
|
||||
@ -572,13 +571,6 @@ static void remove_child_pid(struct smbd_parent_context *parent,
|
||||
iov, ARRAY_SIZE(iov), NULL, 0);
|
||||
DEBUG(10, ("messaging_send_iov returned %s\n", nt_errstr(status)));
|
||||
|
||||
ret = messaging_cleanup(parent->msg_ctx, pid);
|
||||
|
||||
if ((ret != 0) && (ret != ENOENT)) {
|
||||
DEBUG(10, ("%s: messaging_cleanup returned %s\n",
|
||||
__func__, strerror(ret)));
|
||||
}
|
||||
|
||||
for (child = parent->children; child != NULL; child = child->next) {
|
||||
if (child->pid == pid) {
|
||||
struct smbd_child_pid *tmp = child;
|
||||
|
@ -87,6 +87,7 @@ static void smbd_cleanupd_process_exited(struct messaging_context *msg,
|
||||
req, struct smbd_cleanupd_state);
|
||||
pid_t pid;
|
||||
bool unclean_shutdown;
|
||||
int ret;
|
||||
|
||||
if (data->length != (sizeof(pid) + sizeof(unclean_shutdown))) {
|
||||
DBG_WARNING("Got invalid length: %zu\n", data->length);
|
||||
@ -101,6 +102,12 @@ static void smbd_cleanupd_process_exited(struct messaging_context *msg,
|
||||
unclean_shutdown ? "un" : "");
|
||||
|
||||
smbprofile_cleanup(pid, state->parent_pid);
|
||||
|
||||
ret = messaging_cleanup(msg, pid);
|
||||
|
||||
if ((ret != 0) && (ret != ENOENT)) {
|
||||
DBG_DEBUG("messaging_cleanup returned %s\n", strerror(ret));
|
||||
}
|
||||
}
|
||||
|
||||
NTSTATUS smbd_cleanupd_recv(struct tevent_req *req)
|
||||
|
Loading…
x
Reference in New Issue
Block a user