- Timestamp:
- Jul 26, 2018 7:19:39 AM (6 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/errno.h
r5823 r5845 627 627 */ 628 628 #define PJMEDIA_SRTP_ESDPREQSECTP (PJMEDIA_ERRNO_START+229) /* 220229 */ 629 /** 630 * @hideinitializer 631 * SRTP parameters negotiation still in progress. 632 */ 633 #define PJMEDIA_SRTP_EKEYNOTREADY (PJMEDIA_ERRNO_START+230) /* 220230 */ 629 634 630 635 /** -
pjproject/trunk/pjmedia/src/pjmedia/errno.c
r5824 r5845 167 167 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPREQCRYPTO, "SRTP crypto attribute required" ), 168 168 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPREQSECTP, "Secure transport required in SDP media descriptor" ), 169 PJ_BUILD_ERR( PJMEDIA_SRTP_EKEYNOTREADY, "SRTP parameters negotiation still in progress" ), 169 170 PJ_BUILD_ERR( PJMEDIA_SRTP_DTLS_ENOCRYPTO, "No matching SRTP crypto-suite after DTLS nego" ), 170 171 PJ_BUILD_ERR( PJMEDIA_SRTP_DTLS_EPEERNOCERT,"No certificate supplied by peer in DTLS nego" ), -
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r5825 r5845 247 247 pj_uint32_t rtp_rx_last_ts; /**< Last received RTP timestamp*/ 248 248 pj_status_t rtp_rx_last_err; /**< Last RTP recv() error */ 249 pj_status_t rtp_tx_last_err; /**< Last RTP send() error */ 250 pj_status_t rtcp_tx_last_err; /**< Last RTCP send() error */ 249 251 250 252 /* RTCP Feedback */ … … 1142 1144 /* Send! */ 1143 1145 status = pjmedia_transport_send_rtcp(stream->transport, pkt, len); 1146 if (status != PJ_SUCCESS) { 1147 if (stream->rtcp_tx_last_err != status) { 1148 PJ_PERROR(4,(stream->port.info.name.ptr, status, 1149 "Error sending RTCP")); 1150 stream->rtcp_tx_last_err = status; 1151 } 1152 } else { 1153 if (stream->rtcp_tx_last_err != PJ_SUCCESS) { 1154 PJ_LOG(4,(stream->port.info.name.ptr, "Sending RTCP resumed")); 1155 stream->rtcp_tx_last_err = PJ_SUCCESS; 1156 } 1157 } 1144 1158 1145 1159 return status; … … 1184 1198 status = send_rtcp(stream, !stream->rtcp_sdes_bye_disabled, PJ_FALSE, 1185 1199 with_xr, PJ_FALSE); 1186 if (status != PJ_SUCCESS) { 1187 PJ_PERROR(4,(stream->port.info.name.ptr, status, 1188 "Error sending RTCP")); 1189 } 1190 1191 stream->rtcp_last_tx = timestamp; 1200 if (status == PJ_SUCCESS) { 1201 stream->rtcp_last_tx = timestamp; 1202 } 1192 1203 } 1193 1204 } … … 1485 1496 sizeof(pjmedia_rtp_hdr)); 1486 1497 if (status != PJ_SUCCESS) { 1487 PJ_PERROR(4,(stream->port.info.name.ptr, status, 1488 "Error sending RTP")); 1498 if (stream->rtp_tx_last_err != status) { 1499 PJ_PERROR(4,(stream->port.info.name.ptr, status, 1500 "Error sending RTP")); 1501 stream->rtp_tx_last_err = status; 1502 } 1489 1503 return PJ_SUCCESS; 1504 } else { 1505 if (stream->rtp_tx_last_err != PJ_SUCCESS) { 1506 PJ_LOG(4,(stream->port.info.name.ptr, "Sending RTP resumed")); 1507 stream->rtp_tx_last_err = PJ_SUCCESS; 1508 } 1490 1509 } 1491 1510 -
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r5811 r5845 1190 1190 if (!srtp->session_inited) { 1191 1191 pj_lock_release(srtp->mutex); 1192 return PJ _EINVALIDOP;1192 return PJMEDIA_SRTP_EKEYNOTREADY; 1193 1193 } 1194 1194 err = srtp_protect(srtp->srtp_tx_ctx, srtp->rtp_tx_buffer, &len); … … 1236 1236 if (!srtp->session_inited) { 1237 1237 pj_lock_release(srtp->mutex); 1238 return PJ _EINVALIDOP;1238 return PJMEDIA_SRTP_EKEYNOTREADY; 1239 1239 } 1240 1240 err = srtp_protect_rtcp(srtp->srtp_tx_ctx, srtp->rtcp_tx_buffer, &len);
Note: See TracChangeset
for help on using the changeset viewer.