From c5d47328135bf806ec666c430928b51126102225 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 Oct 2017 18:11:25 +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 6a276cc8a..3c6f07011 100755 --- a/crypto777/nanosrc/core/global.c +++ b/crypto777/nanosrc/core/global.c @@ -673,15 +673,17 @@ int32_t nn_recv(int32_t s,void *buf,size_t len,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; struct nn_iovec *iov; struct nn_msg msg; void *chunk; - //PNACL_msg("nn_sendmsg.(%d) \n",s); + printf("nn_sendmsg.(%d) \n",s); NN_BASIC_CHECKS; if ( nn_slow(!msghdr) ) { + printf("nn_sendmsg.(%d) einval\n",s); errno = EINVAL; return -1; } if ( nn_slow(msghdr->msg_iovlen < 0) ) { + printf("nn_sendmsg.(%d) emsgsize\n",s); errno = EMSGSIZE; return -1; } @@ -690,6 +692,7 @@ int32_t nn_sendmsg(int32_t s,const struct nn_msghdr *msghdr,int32_t flags) chunk = *(void **)msghdr->msg_iov[0].iov_base; if ( nn_slow(chunk == NULL) ) { + printf("nn_sendmsg.(%d) efault\n",s); errno = EFAULT; return -1; } @@ -732,6 +735,7 @@ int32_t nn_sendmsg(int32_t s,const struct nn_msghdr *msghdr,int32_t flags) } nn_assert(msghdr->msg_control == 0); // cant support msgs until sendmsg()/recvmsg() native to pnacl rc = nn_sock_send(SELF.socks[s],&msg,flags); // Send it further down the stack + printf("rc from nn_socksend.%d\n",rc); if ( nn_slow(rc < 0) ) { // If we are dealing with user-supplied buffer, detach it from the message object