winlin

Merge branch 'srs.master'

@@ -564,21 +564,21 @@ int SrsProtocol::do_send_message(SrsMessage* msg) @@ -564,21 +564,21 @@ int SrsProtocol::do_send_message(SrsMessage* msg)
564 srs_assert(nbh > 0); 564 srs_assert(nbh > 0);
565 565
566 // header iov 566 // header iov
567 - iov[0].iov_base = header;  
568 - iov[0].iov_len = nbh; 567 + out_iov[0].iov_base = header;
  568 + out_iov[0].iov_len = nbh;
569 569
570 // payload iov 570 // payload iov
571 int payload_size = pend - p; 571 int payload_size = pend - p;
572 if (payload_size > out_chunk_size) { 572 if (payload_size > out_chunk_size) {
573 payload_size = out_chunk_size; 573 payload_size = out_chunk_size;
574 } 574 }
575 - iov[1].iov_base = p;  
576 - iov[1].iov_len = payload_size; 575 + out_iov[1].iov_base = p;
  576 + out_iov[1].iov_len = payload_size;
577 577
578 // send by writev 578 // send by writev
579 // sendout header and payload by writev. 579 // sendout header and payload by writev.
580 // decrease the sys invoke count to get higher performance. 580 // decrease the sys invoke count to get higher performance.
581 - if ((ret = skt->writev(iov, 2, NULL)) != ERROR_SUCCESS) { 581 + if ((ret = skt->writev(out_iov, 2, NULL)) != ERROR_SUCCESS) {
582 srs_error("send with writev failed. ret=%d", ret); 582 srs_error("send with writev failed. ret=%d", ret);
583 return ret; 583 return ret;
584 } 584 }
@@ -592,7 +592,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg) @@ -592,7 +592,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg)
592 592
593 void SrsProtocol::generate_chunk_header(SrsMessageHeader* mh, bool c0, int* pnbh, char** ph) 593 void SrsProtocol::generate_chunk_header(SrsMessageHeader* mh, bool c0, int* pnbh, char** ph)
594 { 594 {
595 - char* cache = out_c0_cache; 595 + char* cache = out_c0c3_cache;
596 596
597 // to directly set the field. 597 // to directly set the field.
598 char* pp = NULL; 598 char* pp = NULL;
@@ -215,11 +215,11 @@ private: @@ -215,11 +215,11 @@ private:
215 * used for type0, 11bytes(or 15bytes with extended timestamp) header. 215 * used for type0, 11bytes(or 15bytes with extended timestamp) header.
216 * or for type3, 1bytes(or 5bytes with extended timestamp) header. 216 * or for type3, 1bytes(or 5bytes with extended timestamp) header.
217 */ 217 */
218 - char out_c0_cache[SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE]; 218 + char out_c0c3_cache[SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE];
219 /** 219 /**
220 * output iovec cache. 220 * output iovec cache.
221 */ 221 */
222 - iovec iov[2]; 222 + iovec out_iov[2];
223 /** 223 /**
224 * output chunk size, default to 128, set by config. 224 * output chunk size, default to 128, set by config.
225 */ 225 */