aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorflyingeagle23 <wang.hui56@zte.com.cn>2017-04-20 18:38:48 +0800
committerFlorin Coras <florin.coras@gmail.com>2017-04-21 14:57:07 +0000
commitdb42b7bdefef4f26601782e9e2cc35096e847544 (patch)
tree055e23d3329aa92e1feadb4e68a868efc3f60213 /src
parente212506138fffc57678e05a24c63dbe16ccae3fa (diff)
[VPP-704]./uri_tcp_test slave , uri test segment fault
Change-Id: I19dcc3fcf85c63dc7a7f35e023f6269c9f233d3b Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/uri/uri_tcp_test.c3
-rwxr-xr-x[-rw-r--r--]src/vnet/session/session_api.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/uri/uri_tcp_test.c b/src/uri/uri_tcp_test.c
index c057e06e339..ca053a2c4ad 100644..100755
--- a/src/uri/uri_tcp_test.c
+++ b/src/uri/uri_tcp_test.c
@@ -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;
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index a82dfe0b901..8116b673a32 100644..100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -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);