diff options
author | Marco Varlese <marco.varlese@suse.com> | 2018-02-21 12:39:52 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-02-21 19:22:39 +0000 |
commit | 15cc6a83f1369d77955bc5cb2d398f43f8100e69 (patch) | |
tree | 0d6d9664f0e76cb50ad1fa96f425bbddb813b15a /src/vnet/sctp/sctp.c | |
parent | fa5fb2d162b0b88d8c59bf2664224948956e4ac4 (diff) |
SCTP: minor refactor
This patch adds some missing information in various debugging messages
which can help with debugging state-machine and connection-tracking.
It also renames some internal variable names for better code
readibility.
Change-Id: I68503fc0214300032f7514426c8b5b2b12edf11a
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.c')
-rw-r--r-- | src/vnet/sctp/sctp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/sctp/sctp.c b/src/vnet/sctp/sctp.c index b81d4d0e9ea..4643e8e900a 100644 --- a/src/vnet/sctp/sctp.c +++ b/src/vnet/sctp/sctp.c @@ -305,14 +305,14 @@ sctp_sub_connection_add_ip6 (u8 thread_index, sctp_connection_t * sctp_connection_new (u8 thread_index) { - sctp_main_t *tm = vnet_get_sctp_main (); + sctp_main_t *sctp_main = vnet_get_sctp_main (); sctp_connection_t *sctp_conn; - pool_get (tm->connections[thread_index], sctp_conn); + pool_get (sctp_main->connections[thread_index], sctp_conn); memset (sctp_conn, 0, sizeof (*sctp_conn)); sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].parent = sctp_conn; sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].c_c_index = - sctp_conn - tm->connections[thread_index]; + sctp_conn - sctp_main->connections[thread_index]; sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].c_thread_index = thread_index; sctp_conn->local_tag = 0; sctp_conn->next_avail_sub_conn = 1; @@ -473,8 +473,8 @@ sctp_session_close (u32 conn_index, u32 thread_index) { ASSERT (thread_index == 0); - sctp_connection_t *sctp_conn; - sctp_conn = sctp_connection_get (conn_index, thread_index); + sctp_connection_t *sctp_conn = + sctp_connection_get (conn_index, thread_index); if (sctp_conn != NULL) sctp_connection_close (sctp_conn); } @@ -482,8 +482,8 @@ sctp_session_close (u32 conn_index, u32 thread_index) void sctp_session_cleanup (u32 conn_index, u32 thread_index) { - sctp_connection_t *sctp_conn; - sctp_conn = sctp_connection_get (conn_index, thread_index); + sctp_connection_t *sctp_conn = + sctp_connection_get (conn_index, thread_index); if (sctp_conn != NULL) { |