Changeset 509 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
- Timestamp:
- Jun 15, 2006 11:04:33 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r503 r509 650 650 pj_status_t status; 651 651 652 PJSUA_LOCK();653 654 652 status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock); 655 653 if (status != PJ_SUCCESS) { 656 654 pjsua_perror(THIS_FILE, "socket() error", status); 657 goto on_return;655 return status; 658 656 } 659 657 … … 662 660 pjsua_perror(THIS_FILE, "bind() error", status); 663 661 pj_sock_close(sock); 664 goto on_return;662 return status; 665 663 } 666 664 … … 686 684 pjsua_perror(THIS_FILE, "Error resolving with STUN", status); 687 685 pj_sock_close(sock); 688 goto on_return;686 return status; 689 687 } 690 688 … … 698 696 pjsua_perror(THIS_FILE, "Unable to resolve local host", status); 699 697 pj_sock_close(sock); 700 goto on_return;698 return status; 701 699 } 702 700 … … 709 707 *p_sock = sock; 710 708 711 on_return:712 713 PJSUA_UNLOCK();714 715 709 PJ_LOG(4,(THIS_FILE, "SIP UDP socket reachable at %s:%d", 716 710 pj_inet_ntoa(p_pub_addr->sin_addr), 717 711 (int)pj_ntohs(p_pub_addr->sin_port))); 718 712 719 return status;713 return PJ_SUCCESS; 720 714 } 721 715 … … 750 744 751 745 pjsua_transport_config config; 752 pj_sock_t sock ;746 pj_sock_t sock = PJ_INVALID_SOCKET; 753 747 pj_sockaddr_in pub_addr; 754 748 pjsip_host_port addr_name; … … 798 792 PJSUA_UNLOCK(); 799 793 800 return PJ_SUCCESS;794 return status; 801 795 } 802 796
Note: See TracChangeset
for help on using the changeset viewer.