Browse Source

Test

etomic
jl777 7 years ago
parent
commit
fdf629ed08
  1. 2
      crypto777/nanosrc/aio/usock_posix.c_dev
  2. 1
      crypto777/nanosrc/protocols/pipeline/xpush.c
  3. 4
      crypto777/nanosrc/protocols/utils/lb.c

2
crypto777/nanosrc/aio/usock_posix.c_dev

@ -1000,7 +1000,7 @@ static int32_t nn_usock_send_raw(struct nn_usock *self,struct msghdr *hdr)
#else #else
nbytes = sendmsg(self->s,hdr,0); nbytes = sendmsg(self->s,hdr,0);
#endif #endif
PostMessage("nn_usock_send_raw nbytes.%d for sock.%d\n",(int32_t)nbytes,self->s); printf("nn_usock_send_raw nbytes.%d for sock.%d\n",(int32_t)nbytes,self->s);
if ( nn_slow(nbytes < 0) ) // Handle errors if ( nn_slow(nbytes < 0) ) // Handle errors
{ {
if ( nn_fast(errno == EAGAIN || errno == EWOULDBLOCK) ) if ( nn_fast(errno == EAGAIN || errno == EWOULDBLOCK) )

1
crypto777/nanosrc/protocols/pipeline/xpush.c

@ -160,6 +160,7 @@ static int nn_xpush_events (struct nn_sockbase *self)
static int nn_xpush_send (struct nn_sockbase *self, struct nn_msg *msg) static int nn_xpush_send (struct nn_sockbase *self, struct nn_msg *msg)
{ {
printf("nn_xpush_send\n");
return nn_lb_send (&nn_cont (self, struct nn_xpush, sockbase)->lb, return nn_lb_send (&nn_cont (self, struct nn_xpush, sockbase)->lb,
msg, NULL); msg, NULL);
} }

4
crypto777/nanosrc/protocols/utils/lb.c

@ -68,14 +68,16 @@ int nn_lb_send (struct nn_lb *self, struct nn_msg *msg, struct nn_pipe **to)
{ {
int rc; int rc;
struct nn_pipe *pipe; struct nn_pipe *pipe;
printf("nn_lb_send\n");
/* Pipe is NULL only when there are no avialable pipes. */ /* Pipe is NULL only when there are no avialable pipes. */
pipe = nn_priolist_getpipe (&self->priolist); pipe = nn_priolist_getpipe (&self->priolist);
printf("nn_lb_send pipe.%p\n",pipe);
if (nn_slow (!pipe)) if (nn_slow (!pipe))
return -EAGAIN; return -EAGAIN;
/* Send the messsage. */ /* Send the messsage. */
rc = nn_pipe_send (pipe, msg); rc = nn_pipe_send (pipe, msg);
printf("nn_pipe_send rc.%d\n",rc);
errnum_assert (rc >= 0, -rc); errnum_assert (rc >= 0, -rc);
/* Move to the next pipe. */ /* Move to the next pipe. */

Loading…
Cancel
Save