Changeset 5981
- Timestamp:
- May 9, 2019 4:54:38 AM (5 years ago)
- Location:
- pjproject/trunk/pjlib-util/src/pjlib-util
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/cli_telnet.c
r5697 r5981 1786 1786 1787 1787 if (status != PJ_SUCCESS) { 1788 PJ_ LOG(3, (THIS_FILE, "Failed setting socket options"));1788 PJ_PERROR(3, (THIS_FILE, status, "Failed setting socket options")); 1789 1789 } 1790 1790 … … 1821 1821 } 1822 1822 } else { 1823 PJ_ LOG(3, (THIS_FILE, "Failed binding the socket"));1823 PJ_PERROR(3, (THIS_FILE, status, "Failed binding the socket")); 1824 1824 goto on_exit; 1825 1825 } -
pjproject/trunk/pjlib-util/src/pjlib-util/dns_server.c
r5534 r5981 472 472 char addrinfo[PJ_INET6_ADDRSTRLEN+10]; 473 473 pj_sockaddr_print(src_addr, addrinfo, sizeof(addrinfo), 3); 474 PJ_LOG(4,(THIS_FILE, "Error parsing query from %s", addrinfo)); 474 PJ_PERROR(4,(THIS_FILE, status, "Error parsing query from %s", 475 addrinfo)); 475 476 goto on_return; 476 477 } … … 554 555 0, src_addr, addr_len); 555 556 if (status != PJ_SUCCESS && status != PJ_EPENDING) { 556 PJ_ LOG(4,(THIS_FILE, "Error sending answer, status=%d", status));557 PJ_PERROR(4,(THIS_FILE, status, "Error sending answer")); 557 558 goto on_return; 558 559 } -
pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c
r5826 r5981 1594 1594 } else { 1595 1595 /* Error occurs */ 1596 char errmsg[PJ_ERR_MSG_SIZE]; 1597 1598 pj_strerror(status, errmsg, sizeof(errmsg)); 1599 PJ_LOG(4,(resolver->name.ptr, 1600 "Error transmitting request: %s", errmsg)); 1596 PJ_PERROR(4,(resolver->name.ptr, status, 1597 "Error transmitting request")); 1601 1598 1602 1599 /* Let it fallback to timeout section below */ … … 1686 1683 /* Check for errors */ 1687 1684 if (bytes_read < 0) { 1688 char errmsg[PJ_ERR_MSG_SIZE];1689 1690 1685 status = (pj_status_t)-bytes_read; 1691 pj_strerror(status, errmsg, sizeof(errmsg)); 1692 PJ_LOG(4,(resolver->name.ptr, "DNS resolver read error: %s", errmsg)); 1686 PJ_PERROR(4,(resolver->name.ptr, status, "DNS resolver read error")); 1693 1687 1694 1688 goto read_next_packet; … … 1727 1721 /* Handle parse error */ 1728 1722 if (status != PJ_SUCCESS) { 1729 char errmsg[PJ_ERR_MSG_SIZE]; 1730 1731 pj_strerror(status, errmsg, sizeof(errmsg)); 1732 PJ_LOG(3,(resolver->name.ptr, 1733 "Error parsing DNS response from %s:%d: %s", 1734 pj_sockaddr_print(src_addr, addr, sizeof(addr), 2), 1735 pj_sockaddr_get_port(src_addr), 1736 errmsg)); 1723 PJ_PERROR(3,(resolver->name.ptr, status, 1724 "Error parsing DNS response from %s:%d", 1725 pj_sockaddr_print(src_addr, addr, sizeof(addr), 2), 1726 pj_sockaddr_get_port(src_addr))); 1737 1727 goto read_next_packet; 1738 1728 } … … 1815 1805 1816 1806 if (status != PJ_EPENDING && status != PJ_ECANCELLED) { 1817 char errmsg[PJ_ERR_MSG_SIZE]; 1818 1819 pj_strerror(status, errmsg, sizeof(errmsg)); 1820 PJ_LOG(4,(resolver->name.ptr, "DNS resolver ioqueue read error: %s", 1821 errmsg)); 1807 PJ_PERROR(4,(resolver->name.ptr, status, 1808 "DNS resolver ioqueue read error")); 1822 1809 1823 1810 pj_assert(!"Unhandled error"); -
pjproject/trunk/pjlib-util/src/pjlib-util/srv_resolver.c
r5635 r5981 686 686 status = pj_dns_parse_addr_response(pkt, &rec); 687 687 if (status!=PJ_SUCCESS) { 688 char errmsg[PJ_ERR_MSG_SIZE]; 689 690 PJ_LOG(4,(query_job->objname, 691 "DNS %s record parse error for '%.*s'." 692 " Err=%d (%s)", 693 (is_type_a ? "A" : "AAAA"), 694 (int)query_job->domain_part.slen, 695 query_job->domain_part.ptr, 696 status, 697 pj_strerror(status,errmsg,sizeof(errmsg)).ptr)); 688 PJ_PERROR(4,(query_job->objname, status, 689 "DNS %s record parse error for '%.*s'.", 690 (is_type_a ? "A" : "AAAA"), 691 (int)query_job->domain_part.slen, 692 query_job->domain_part.ptr)); 698 693 } 699 694 } … … 756 751 757 752 } else if (status != PJ_SUCCESS) { 758 char errmsg[PJ_ERR_MSG_SIZE];759 760 753 /* Update last error */ 761 754 query_job->last_error = status; 762 755 763 756 /* Log error */ 764 pj_strerror(status, errmsg, sizeof(errmsg)); 765 PJ_LOG(4,(query_job->objname, 766 "DNS %s record resolution failed: %s", 767 (is_type_a? "A" : "AAAA"), 768 errmsg)); 757 PJ_PERROR(4,(query_job->objname, status, 758 "DNS %s record resolution failed", 759 (is_type_a? "A" : "AAAA"))); 769 760 } 770 761 … … 841 832 /* Check for failure */ 842 833 if (status != PJ_SUCCESS) { 843 char errmsg[PJ_ERR_MSG_SIZE]; 844 PJ_UNUSED_ARG(errmsg); 845 PJ_LOG(4,(query_job->objname, 846 "DNS %s record resolution error for '%.*s'." 847 " Err=%d (%s)", 848 pj_dns_get_type_name(query_job->dns_state), 849 (int)query_job->domain_part.slen, 850 query_job->domain_part.ptr, 851 status, 852 pj_strerror(status,errmsg,sizeof(errmsg)).ptr)); 834 PJ_PERROR(4,(query_job->objname, status, 835 "DNS %s record resolution error for '%.*s'.", 836 pj_dns_get_type_name(query_job->dns_state), 837 (int)query_job->domain_part.slen, 838 query_job->domain_part.ptr)); 853 839 854 840 /* Cancel any pending query */ -
pjproject/trunk/pjlib-util/src/pjlib-util/stun_simple_client.c
r5636 r5981 236 236 237 237 if (status != PJ_SUCCESS) { 238 char errmsg[PJ_ERR_MSG_SIZE]; 239 240 PJ_LOG(4,(THIS_FILE, "recvfrom() error ignored: %s", 241 pj_strerror(status, errmsg,sizeof(errmsg)).ptr)); 238 PJ_PERROR(4,(THIS_FILE, status, 239 "recvfrom() error ignored")); 242 240 243 241 /* Ignore non-PJ_SUCCESS status. … … 253 251 status = pjstun_parse_msg(recv_buf, len, &msg); 254 252 if (status != PJ_SUCCESS) { 255 char errmsg[PJ_ERR_MSG_SIZE]; 256 257 PJ_LOG(4,(THIS_FILE, "STUN parsing error ignored: %s", 258 pj_strerror(status, errmsg,sizeof(errmsg)).ptr)); 253 PJ_PERROR(4,(THIS_FILE, status, 254 "STUN parsing error ignored")); 259 255 260 256 /* Also ignore non-successful parsing. This may not
Note: See TracChangeset
for help on using the changeset viewer.