From 1fd97e7c5b0ac22a1e5e9a02d4fca89c66d3af2c Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 Oct 2017 18:05:57 +0300 Subject: [PATCH] Test --- crypto777/nanosrc/core/global.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypto777/nanosrc/core/global.c b/crypto777/nanosrc/core/global.c index 324b266f7..4edab59f8 100755 --- a/crypto777/nanosrc/core/global.c +++ b/crypto777/nanosrc/core/global.c @@ -809,15 +809,17 @@ int32_t nn_recvmsg(int32_t s,struct nn_msghdr *msghdr,int32_t flags) int32_t nn_sendmsg(int32_t s,const struct nn_msghdr *msghdr,int32_t flags) { int32_t rc,i,nnmsg; size_t sz,spsz; struct nn_iovec *iov; struct nn_msg msg; void *chunk; struct nn_cmsghdr *cmsg; - //PNACL_msg("nn_sendmsg.(%d) \n",s); + printf("nn_sendmsg.(%d) \n",s); NN_BASIC_CHECKS; if ( nn_slow(!msghdr) ) { + printf("nn_sendmsg.EINVAL\n"); errno = EINVAL; return -1; } if ( nn_slow(msghdr->msg_iovlen < 0) ) { + printf("nn_sendmsg.EMSGSIZE\n"); errno = EMSGSIZE; return -1; } @@ -827,6 +829,7 @@ int32_t nn_sendmsg(int32_t s,const struct nn_msghdr *msghdr,int32_t flags) if ( nn_slow(chunk == NULL) ) { errno = EFAULT; + printf("nn_sendmsg.EFAULT\n"); return -1; } sz = nn_chunk_size(chunk); @@ -905,6 +908,7 @@ int32_t nn_sendmsg(int32_t s,const struct nn_msghdr *msghdr,int32_t flags) /* Send it further down the stack. */ rc = nn_sock_send (SELF.socks [s], &msg, flags); + printf("nn_sock_send rc.%d\n",rc); if (nn_slow (rc < 0)) { /* If we are dealing with user-supplied buffer, detach it from