TCP/session improvements
[vpp.git] / src / vnet / session / application_interface.c
index 0ea77fd..4b30bd8 100644 (file)
@@ -51,7 +51,7 @@ ip_is_local (ip46_address_t * ip46_address, u8 is_ip4)
       prefix.fp_proto = FIB_PROTOCOL_IP6;
     }
 
-  clib_memcpy (&prefix.fp_addr, ip46_address, sizeof (ip46_address));
+  clib_memcpy (&prefix.fp_addr, ip46_address, sizeof (ip46_address_t));
   fei = fib_table_lookup (0, &prefix);
   flags = fib_entry_get_flags (fei);
 
@@ -98,7 +98,7 @@ vnet_bind_i (u32 api_client_index, ip46_address_t * ip46, u16 port_host_order,
 
   if (application_lookup (api_client_index))
     {
-      clib_warning ("Only one bind supported for now");
+      clib_warning ("Only one connection supported for now");
       return VNET_API_ERROR_ADDRESS_IN_USE;
     }
 
@@ -186,9 +186,7 @@ vnet_connect_i (u32 api_client_index, u32 api_context, session_type_t sst,
   /*
    * Not connecting to a local server. Create regular session
    */
-  stream_session_open (sst, ip46, port, app->index);
-
-  return 0;
+  return stream_session_open (sst, ip46, port, app->index);
 }
 
 /**
@@ -366,8 +364,7 @@ vnet_connect_uri (vnet_connect_args_t * a)
 }
 
 int
-vnet_disconnect_session (u32 client_index, u32 session_index,
-                        u32 thread_index)
+vnet_disconnect_session (u32 session_index, u32 thread_index)
 {
   stream_session_t *session;