qrtr: Initialize sockaddr_qrtr for node 1

As node 0 is made a valid id in the kernel we're not allowed to specify
node 0 when binding our sockets. For now just hard code 1, as that's
where we are.

Either the kernel should define a reserved node id or we should have a
convenient way of specifying the local node, but for now this is good
enough.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Bjorn Andersson
2016-02-07 21:49:36 -08:00
parent 3e11a3598b
commit 39be874580
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ int qrtr_open(int rport)
struct sockaddr_qrtr sq;
sq.sq_family = AF_QIPCRTR;
sq.sq_node = 0;
sq.sq_node = 1;
sq.sq_port = rport;
rc = bind(sock, (void *)&sq, sizeof(sq));

View File

@@ -415,7 +415,7 @@ static int qrtr_socket(int port)
}
sq.sq_family = AF_QIPCRTR;
sq.sq_node = 0;
sq.sq_node = 1;
sq.sq_port = port;
rc = bind(sock, (void *)&sq, sizeof(sq));