Merge branch 'master' of ssh://askele.com/libsntl

v0.5.xx
unknown 10 years ago
commit 7b9aaac4e8

@ -90,7 +90,7 @@ static int __conn_read(conn_t *co, void *buf, size_t buf_len)
int rfd = SSL_get_fd(co->ssl), r; int rfd = SSL_get_fd(co->ssl), r;
fd_set readset; fd_set readset;
fprintf(stderr, "\tListening ... on %s\n", co->uuid); //fprintf(stderr, "\tListening ... on %s\n", co->uuid);
/* get prepare to select */ /* get prepare to select */
FD_ZERO(&readset); FD_ZERO(&readset);
FD_SET(rfd, &readset); FD_SET(rfd, &readset);
@ -1265,7 +1265,12 @@ static int __default_msg_return(void *cctx, sexp_t *sx)
usrtc_delete(chan->msgs_tree, &(smsg->pendingq_node)); usrtc_delete(chan->msgs_tree, &(smsg->pendingq_node));
pthread_rwlock_unlock(&(chan->msglock)); pthread_rwlock_unlock(&(chan->msglock));
} }
pthread_mutex_unlock(&(smsg->wait)); if(smsg->flags & ESXMSG_PENDING) pthread_mutex_unlock(&(smsg->wait));
else {
/* nobody want it */
destroy_sexp(smsg->initial_sx);
__destroy_msg(smsg);
}
} }
__finish: __finish:

@ -231,8 +231,10 @@ static int __msg_reply(sxmsg_t *msg, sexp_t *sx, struct timespec *tio, int opcod
else pthread_mutex_timedlock(&(msg->wait), tio); else pthread_mutex_timedlock(&(msg->wait), tio);
} }
if(tio && (msg->flags & ESXMSG_PENDING)) if(tio && (msg->flags & ESXMSG_PENDING)) {
msg->flags &= ~ESXMSG_PENDING; /* we will not wait for it */
return SXOTIMEDOUT; return SXOTIMEDOUT;
}
r = msg->opcode; r = msg->opcode;

Loading…
Cancel
Save