Changeset 5983
- Timestamp:
- May 9, 2019 7:47:39 AM (5 years ago)
- Location:
- pjproject/trunk/pjnath/src/pjnath
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/errno.c
r5535 r5983 194 194 pj_status_t status) 195 195 { 196 char errmsg[PJ_ERR_MSG_SIZE];197 198 pj_strerror(status, errmsg, sizeof(errmsg));199 200 196 #if PJNATH_ERROR_LEVEL==1 201 PJ_ LOG(1,(sender, "%s: %s", title, errmsg));197 PJ_PERROR(1,(sender, status, title)); 202 198 #elif PJNATH_ERROR_LEVEL==2 203 PJ_ LOG(2,(sender, "%s: %s", title, errmsg));199 PJ_PERROR(2,(sender, status, title)); 204 200 #elif PJNATH_ERROR_LEVEL==3 205 PJ_ LOG(3,(sender, "%s: %s", title, errmsg));201 PJ_PERROR(3,(sender, status, title)); 206 202 #elif PJNATH_ERROR_LEVEL==4 207 PJ_ LOG(4,(sender, "%s: %s", title, errmsg));203 PJ_PERROR(4,(sender, status, title)); 208 204 #elif PJNATH_ERROR_LEVEL==5 209 PJ_ LOG(5,(sender, "%s: %s", title, errmsg));205 PJ_PERROR(5,(sender, status, title)); 210 206 #else 211 207 # error Invalid PJNATH_ERROR_LEVEL value -
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r5861 r5983 959 959 const char *title, pj_status_t status) 960 960 { 961 char errmsg[PJ_ERR_MSG_SIZE]; 962 963 pj_strerror(status, errmsg, sizeof(errmsg)); 964 PJ_LOG(4,(ice_st->obj_name, "%s: %s", title, errmsg)); 961 PJ_PERROR(4,(ice_st->obj_name, status, title)); 962 965 963 pj_log_push_indent(); 966 964 … … 1588 1586 if (cb.on_ice_complete) { 1589 1587 if (status != PJ_SUCCESS) { 1590 char errmsg[PJ_ERR_MSG_SIZE]; 1591 pj_strerror(status, errmsg, sizeof(errmsg)); 1592 PJ_LOG(4,(ice_st->obj_name, 1593 "ICE negotiation failed after %ds:%03d: %s", 1594 msec/1000, msec%1000, errmsg)); 1588 PJ_PERROR(4,(ice_st->obj_name, status, 1589 "ICE negotiation failed after %ds:%03d", 1590 msec/1000, msec%1000)); 1595 1591 } else { 1596 1592 unsigned i; -
pjproject/trunk/pjnath/src/pjnath/nat_detect.c
r5833 r5983 582 582 } 583 583 584 PJ_ LOG(5,(sess->pool->obj_name, "Completed %s, status=%d",585 test_names[test_id], status));584 PJ_PERROR(5,(sess->pool->obj_name, status, "Completed %s", 585 test_names[test_id])); 586 586 587 587 sess->result[test_id].complete = PJ_TRUE; -
pjproject/trunk/pjnath/src/pjnath/stun_session.c
r5233 r5983 1221 1221 &response); 1222 1222 if (status != PJ_SUCCESS && response != NULL) { 1223 PJ_ LOG(5,(SNAME(sess), "Message authentication failed"));1223 PJ_PERROR(5,(SNAME(sess), status, "Message authentication failed")); 1224 1224 send_response(sess, token, tmp_pool, response, &rdata->info, 1225 1225 PJ_FALSE, src_addr, src_addr_len); … … 1263 1263 &tdata->auth_info.auth_key); 1264 1264 if (status != PJ_SUCCESS) { 1265 PJ_ LOG(5,(SNAME(sess),1266 1265 PJ_PERROR(5,(SNAME(sess), status, 1266 "Response authentication failed")); 1267 1267 return status; 1268 1268 } -
pjproject/trunk/pjnath/src/pjnath/stun_sock.c
r5861 r5983 244 244 PJ_TRUE, &sobuf_size); 245 245 if (status != PJ_SUCCESS) { 246 pj_perror(3,stun_sock->obj_name, status,247 "Failed setting SO_RCVBUF");246 PJ_PERROR(3, (stun_sock->obj_name, status, 247 "Failed setting SO_RCVBUF")); 248 248 } else { 249 249 if (sobuf_size < cfg->so_rcvbuf_size) { … … 263 263 PJ_TRUE, &sobuf_size); 264 264 if (status != PJ_SUCCESS) { 265 pj_perror(3,stun_sock->obj_name, status,266 "Failed setting SO_SNDBUF");265 PJ_PERROR(3, (stun_sock->obj_name, status, 266 "Failed setting SO_SNDBUF")); 267 267 } else { 268 268 if (sobuf_size < cfg->so_sndbuf_size) { -
pjproject/trunk/pjnath/src/pjnath/turn_session.c
r5636 r5983 1933 1933 PJ_STUN_MAGIC, NULL, &tdata); 1934 1934 if (status != PJ_SUCCESS) { 1935 PJ_LOG(1,(sess->obj_name, 1936 "Error creating CreatePermission request: %d", 1937 status)); 1935 PJ_PERROR(1,(sess->obj_name, status, 1936 "Error creating CreatePermission request")); 1938 1937 return 0; 1939 1938 } … … 1978 1977 tdata); 1979 1978 if (status != PJ_SUCCESS) { 1980 PJ_LOG(1,(sess->obj_name, 1981 "Error sending CreatePermission request: %d", 1982 status)); 1979 PJ_PERROR(1,(sess->obj_name, status, 1980 "Error sending CreatePermission request")); 1983 1981 count = 0; 1984 1982 } -
pjproject/trunk/pjnath/src/pjnath/turn_sock.c
r5596 r5983 835 835 PJ_TRUE, &sobuf_size); 836 836 if (status != PJ_SUCCESS) { 837 pj_perror(3,turn_sock->obj_name, status,838 "Failed setting SO_RCVBUF");837 PJ_PERROR(3, (turn_sock->obj_name, status, 838 "Failed setting SO_RCVBUF")); 839 839 } else { 840 840 if (sobuf_size < turn_sock->setting.so_rcvbuf_size) { … … 854 854 PJ_TRUE, &sobuf_size); 855 855 if (status != PJ_SUCCESS) { 856 pj_perror(3,turn_sock->obj_name, status,857 "Failed setting SO_SNDBUF");856 PJ_PERROR(3, (turn_sock->obj_name, status, 857 "Failed setting SO_SNDBUF")); 858 858 } else { 859 859 if (sobuf_size < turn_sock->setting.so_sndbuf_size) { … … 905 905 on_connect_complete(turn_sock->active_sock, PJ_SUCCESS); 906 906 } else if (status != PJ_EPENDING) { 907 pj_perror(3,turn_sock->pool->obj_name, status,908 909 910 sizeof(addrtxt), 3));907 PJ_PERROR(3, (turn_sock->pool->obj_name, status, 908 "Failed to connect to %s", 909 pj_sockaddr_print(&info.server, addrtxt, 910 sizeof(addrtxt), 3))); 911 911 pj_turn_sock_destroy(turn_sock); 912 912 return;
Note: See TracChangeset
for help on using the changeset viewer.