[VPP-704]./uri_tcp_test slave , uri test segment fault 91/6291/3
authorflyingeagle23 <wang.hui56@zte.com.cn>
Thu, 20 Apr 2017 10:38:48 +0000 (18:38 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 21 Apr 2017 14:57:07 +0000 (14:57 +0000)
Change-Id: I19dcc3fcf85c63dc7a7f35e023f6269c9f233d3b
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
src/uri/uri_tcp_test.c [changed mode: 0644->0755]
src/vnet/session/session_api.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index c057e06..ca053a2
@@ -487,7 +487,8 @@ vl_api_connect_uri_reply_t_handler (vl_api_connect_uri_reply_t * mp)
 
   if (mp->retval)
     {
-      uword *errp = hash_get (utm->error_string_by_error_number, -mp->retval);
+      uword *errp = hash_get (utm->error_string_by_error_number,
+                             -clib_net_to_host_u32 (mp->retval));
       clib_warning ("connection failed with code: %s", *errp);
       utm->state = STATE_FAILED;
       return;
old mode 100644 (file)
new mode 100755 (executable)
index a82dfe0..8116b67
@@ -180,7 +180,7 @@ send_session_connected_callback (u32 app_index, u32 api_context,
     }
   else
     {
-      mp->retval = VNET_API_ERROR_SESSION_CONNECT_FAIL;
+      mp->retval = clib_host_to_net_u32 (VNET_API_ERROR_SESSION_CONNECT_FAIL);
     }
 
   vl_msg_api_send_shmem (q, (u8 *) & mp);