|
|
|
@ -208,14 +208,15 @@ int _sntll_writemsg(conn_t *co, sxmsg_t *msg)
|
|
|
|
|
if(rd < 0) {
|
|
|
|
|
co->flags |= SNSX_CLOSED;
|
|
|
|
|
r = SNE_ESSL;
|
|
|
|
|
} else if(head->payload_length) rd = __conn_write(co, msg->payload, head->payload_length);
|
|
|
|
|
/* check up again */
|
|
|
|
|
if(rd < 0) {
|
|
|
|
|
co->flags |= SNSX_CLOSED;
|
|
|
|
|
r = SNE_ESSL;
|
|
|
|
|
} else if(head->payload_length) {
|
|
|
|
|
rd = __conn_write(co, msg->payload, head->payload_length);
|
|
|
|
|
/* check up again */
|
|
|
|
|
if(rd < 0) { co->flags |= SNSX_CLOSED; r = SNE_ESSL; }
|
|
|
|
|
}
|
|
|
|
|
pthread_mutex_unlock(&co->sslinout[2]);
|
|
|
|
|
|
|
|
|
|
if(!(co->flags & SNSX_CLOSED)) r = SNE_SUCCESS;
|
|
|
|
|
|
|
|
|
|
return r;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|