Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcb90242 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Read and drop incoming data when channels are not opened"

parents f74dd92b 6b5f30c2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -596,6 +596,7 @@ static void socket_read_work_fn(struct work_struct *work)
	struct diag_socket_info *info = container_of(work,
						     struct diag_socket_info,
						     read_work);
	struct diagfwd_info *fwd_info;

	if (!info) {
		diag_ws_release();
@@ -616,8 +617,9 @@ static void socket_read_work_fn(struct work_struct *work)
		diag_ws_release();
		return;
	}

	if (!info->fwd_ctxt && info->port_type == PORT_TYPE_SERVER)
	fwd_info = info->fwd_ctxt;
	if (info->port_type == PORT_TYPE_SERVER &&
		(!fwd_info || !atomic_read(&fwd_info->opened)))
		diag_socket_drop_data(info);

	if (!atomic_read(&info->opened) && info->port_type == PORT_TYPE_SERVER)