/* Ensure we'll receive messages when this is unlocked. */
if (!sconn->smb1.locks.blocking_lock_unlock_state) {
- messaging_register(sconn->msg_ctx, NULL,
+ messaging_register(sconn->msg_ctx, sconn,
MSG_SMB_UNLOCK, received_unlock_msg);
sconn->smb1.locks.blocking_lock_unlock_state = true;
}
struct server_id server_id,
DATA_BLOB *data)
{
- struct smbd_server_connection *sconn;
+ struct smbd_server_connection *sconn =
+ talloc_get_type(private_data,
+ struct smbd_server_connection);
- sconn = msg_ctx_to_sconn(msg);
if (sconn == NULL) {
- DEBUG(1, ("could not find sconn\n"));
return;
}