session: use transport endpoint cfg for listen

Makes it similar to connects.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I38c328670054e1a9ba4dc4ea8fe7519a5a09e8be
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index 83def8e..8590d04 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -820,7 +820,7 @@
 }
 
 static u32
-ct_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
+ct_start_listen (u32 app_listener_index, transport_endpoint_cfg_t *tep)
 {
   session_endpoint_cfg_t *sep;
   ct_connection_t *ct;
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 42f24d2..108fa36 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1468,12 +1468,12 @@
 int
 session_listen (session_t * ls, session_endpoint_cfg_t * sep)
 {
-  transport_endpoint_t *tep;
+  transport_endpoint_cfg_t *tep;
   int tc_index;
   u32 s_index;
 
   /* Transport bind/listen */
-  tep = session_endpoint_to_transport (sep);
+  tep = session_endpoint_to_transport_cfg (sep);
   s_index = ls->session_index;
   tc_index = transport_start_listen (session_get_transport_proto (ls),
 				     s_index, tep);
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 92df365..540d6a6 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -341,7 +341,7 @@
 
 u32
 transport_start_listen (transport_proto_t tp, u32 session_index,
-			transport_endpoint_t * tep)
+			transport_endpoint_cfg_t *tep)
 {
   return tp_vfts[tp].start_listen (session_index, tep);
 }
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index 02ab540..633bb1e 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -72,7 +72,7 @@
   /*
    * Setup
    */
-  u32 (*start_listen) (u32 session_index, transport_endpoint_t * lcl);
+  u32 (*start_listen) (u32 session_index, transport_endpoint_cfg_t *lcl);
   u32 (*stop_listen) (u32 conn_index);
   int (*connect) (transport_endpoint_cfg_t * rmt);
   void (*half_close) (u32 conn_index, u32 thread_index);
@@ -140,7 +140,7 @@
 void transport_close (transport_proto_t tp, u32 conn_index, u8 thread_index);
 void transport_reset (transport_proto_t tp, u32 conn_index, u8 thread_index);
 u32 transport_start_listen (transport_proto_t tp, u32 session_index,
-			    transport_endpoint_t * tep);
+			    transport_endpoint_cfg_t *tep);
 u32 transport_stop_listen (transport_proto_t tp, u32 conn_index);
 void transport_cleanup (transport_proto_t tp, u32 conn_index,
 			u8 thread_index);