* Someone from the family died, validate our locks
*/
- messaging_send_buf(msg_ctx, messaging_server_id(msg_ctx),
- MSG_SMB_BRL_VALIDATE, NULL, 0);
+ if (am_parent) {
+ messaging_send_buf(msg_ctx, am_parent->cleanupd,
+ MSG_SMB_BRL_VALIDATE, NULL, 0);
+ }
return 0;
}
DEBUG(1,("Cleaning up brl and lock database after unclean shutdown\n"));
message_send_all(parent->msg_ctx, MSG_SMB_UNLOCK, NULL, 0, NULL);
- messaging_send_buf(parent->msg_ctx,
- messaging_server_id(parent->msg_ctx),
+
+ messaging_send_buf(parent->msg_ctx, parent->cleanupd,
MSG_SMB_BRL_VALIDATE, NULL, 0);
}
messaging_register(msg_ctx, NULL, MSG_SMB_STAT_CACHE_DELETE,
smb_stat_cache_delete);
messaging_register(msg_ctx, NULL, MSG_DEBUG, smbd_msg_debug);
- messaging_register(msg_ctx, NULL, MSG_SMB_BRL_VALIDATE,
- brl_revalidate);
messaging_register(msg_ctx, NULL, MSG_SMB_FORCE_TDIS,
smb_parent_send_to_children);
messaging_register(msg_ctx, NULL, MSG_SMB_KILL_CLIENT_IP,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "replace.h"
+#include "includes.h"
#include "smbd_cleanupd.h"
#include "lib/util_procid.h"
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/debug.h"
#include "smbprofile.h"
#include "serverid.h"
+#include "locking/proto.h"
struct smbd_cleanupd_state {
pid_t parent_pid;
return tevent_req_post(req, ev);
}
+ status = messaging_register(msg, NULL, MSG_SMB_BRL_VALIDATE,
+ brl_revalidate);
+ if (tevent_req_nterror(req, status)) {
+ return tevent_req_post(req, ev);
+ }
+
return req;
}