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

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

Merge "net: qrtr: ns: Fix Announce services for all nodes"

parents 48557290 aead5863
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@ CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_TBF=y
CONFIG_QRTR=y
CONFIG_QRTR_MHI=y
CONFIG_QRTR_MHI_DEV=y
CONFIG_QRTR_NODE_ID=2
CONFIG_QRTR_SMD=y
CONFIG_NETDEVICES=y
CONFIG_MAILBOX=y
+15 −13
Original line number Diff line number Diff line
@@ -227,13 +227,15 @@ static int announce_servers(struct sockaddr_qrtr *sq)
	struct qrtr_server *srv;
	struct qrtr_node *node;
	unsigned long index;
	unsigned long node_idx;
	int ret;

	node = node_get(qrtr_ns.local_node);
	if (!node)
		return 0;

	/* Announce the list of servers registered in this node */
	xa_for_each(&nodes, node_idx, node) {
		if (node->id == sq->sq_node) {
			pr_info("Avoiding duplicate announce for NODE ID %u\n", node->id);
			continue;
		}
		xa_for_each(&node->servers, index, srv) {
			ret = service_announce_new(sq, srv);
			if (ret < 0) {
@@ -244,7 +246,7 @@ static int announce_servers(struct sockaddr_qrtr *sq)
				return ret;
			}
		}

	}
	return 0;
}