|
|
@ -777,7 +777,15 @@ static void *__sxmpl_thread(void *b)
|
|
|
|
gettimeofday(&beg, NULL);
|
|
|
|
gettimeofday(&beg, NULL);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
memset(mhead, 0, sizeof(sxmplv2_head_t));
|
|
|
|
memset(mhead, 0, sizeof(sxmplv2_head_t));
|
|
|
|
rd = __conn_read(co, mhead, sizeof(sxmplv2_head_t));
|
|
|
|
total_rd = 0;
|
|
|
|
|
|
|
|
while(total_rd != sizeof(sxmplv2_head_t)) {
|
|
|
|
|
|
|
|
total_rd += __conn_read(co, buf + total_rd, sizeof(sxmplv2_head_t) - total_rd);
|
|
|
|
|
|
|
|
if(total_rd == -1) {
|
|
|
|
|
|
|
|
co->flags |= SXMP_CLOSED;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
rd = total_rd;
|
|
|
|
#ifdef _PERFPROFILE
|
|
|
|
#ifdef _PERFPROFILE
|
|
|
|
gettimeofday(&end, NULL);
|
|
|
|
gettimeofday(&end, NULL);
|
|
|
|
|
|
|
|
|
|
|
@ -808,7 +816,7 @@ static void *__sxmpl_thread(void *b)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
total_rd = 0;
|
|
|
|
total_rd = 0;
|
|
|
|
while(total_rd != mhead->payload_length) {
|
|
|
|
while(total_rd != mhead->payload_length) {
|
|
|
|
total_rd += __conn_read(co, bbuf + total_rd, mhead->payload_length);
|
|
|
|
total_rd += __conn_read(co, bbuf + total_rd, mhead->payload_length - total_rd);
|
|
|
|
if(total_rd == -1) goto __sslproto_error;
|
|
|
|
if(total_rd == -1) goto __sslproto_error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rd = total_rd;
|
|
|
|
rd = total_rd;
|
|
|
|