aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.c
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2018-02-15 10:40:42 +0100
committerDavid S. Miller <davem@davemloft.net>2018-02-16 15:26:33 -0500
commit27469b7352b5197cffa0e3dadb5f1127f055da27 (patch)
tree3d69eb67760f1e213820be002e634990be8edf35 /net/tipc/subscr.c
parentMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next (diff)
downloadlinux-dev-27469b7352b5197cffa0e3dadb5f1127f055da27.tar.xz
linux-dev-27469b7352b5197cffa0e3dadb5f1127f055da27.zip
tipc: remove redundant code in topology server
The socket handling in the topology server is unnecessarily generic. It is prepared to handle both SOCK_RDM, SOCK_DGRAM and SOCK_STREAM type sockets, as well as the only socket type which is really used, SOCK_SEQPACKET. We now remove this redundant code to make the code more readable. Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/subscr.c')
-rw-r--r--net/tipc/subscr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 68e26470c516..eaef826fc06d 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -81,7 +81,7 @@ static void tipc_subscrp_send_event(struct tipc_subscription *sub,
sub->evt.found_upper = htohl(found_upper, sub->swap);
sub->evt.port.ref = htohl(port_ref, sub->swap);
sub->evt.port.node = htohl(node, sub->swap);
- tipc_conn_sendmsg(tn->topsrv, subscriber->conid, NULL,
+ tipc_conn_sendmsg(tn->topsrv, subscriber->conid,
msg_sect.iov_base, msg_sect.iov_len);
}
@@ -375,8 +375,6 @@ int tipc_topsrv_start(struct net *net)
}
topsrv->net = net;
topsrv->saddr = saddr;
- topsrv->imp = TIPC_CRITICAL_IMPORTANCE;
- topsrv->type = SOCK_SEQPACKET;
topsrv->max_rcvbuf_size = sizeof(struct tipc_subscr);
topsrv->tipc_conn_recvmsg = tipc_subscrb_rcv_cb;
topsrv->tipc_conn_new = tipc_subscrb_connect_cb;