Changeset 852
- Timestamp:
- Dec 11, 2006 9:32:57 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c
r849 r852 163 163 }; 164 164 165 static int ssl_print_err_count; 165 166 static int ssl_print_err_cb(const char *str, size_t len, void *u) 166 167 { … … 180 181 break; 181 182 } 183 ++ssl_print_err_count; 182 184 return len; 183 185 } … … 186 188 { 187 189 struct err_data e; 190 int count = ssl_print_err_count; 188 191 e.lvl = level; e.snd = sender; e.ttl = title; 189 192 ERR_print_errors_cb(&ssl_print_err_cb, &e); 190 ERR_print_errors_fp(stderr); 193 194 if (count==ssl_print_err_count) 195 ssl_print_err_cb(" ", 1, &e); 191 196 } 192 197 #else … … 529 534 530 535 case SSL_ERROR_ZERO_RETURN: 536 PJ_LOG(4,(tls_tp->base.obj_name, "SSL transport shutdodwn by remote")); 531 537 pjsip_transport_shutdown(&tls_tp->base); 532 538 goto done; … … 678 684 679 685 /* Initialize local address */ 686 tls_tp->base.addr_len = sizeof(tls_tp->base.local_addr); 680 687 status = pj_sock_getsockname(tls_tp->sock, &tls_tp->base.local_addr, 681 688 &tls_tp->base.addr_len); … … 713 720 tls_tp->rdata.pkt_info.src_port = pj_ntohs(rem_addr->sin_port); 714 721 722 /* Register transport to transport manager */ 723 status = pjsip_transport_register(lis->tpmgr, &tls_tp->base); 724 if (status != PJ_SUCCESS) { 725 goto on_error; 726 } 727 715 728 /* Create worker thread to receive packets */ 716 729 status = pj_thread_create(pool, "tlsthread", &tls_worker_thread, 717 730 tls_tp, PJ_THREAD_DEFAULT_STACK_SIZE, 0, 718 731 &tls_tp->thread); 719 if (status != PJ_SUCCESS) 720 goto on_error; 732 if (status != PJ_SUCCESS) { 733 pjsip_transport_destroy(&tls_tp->base); 734 return status; 735 } 721 736 722 737 /* Done */ … … 855 870 static pj_status_t tls_tp_do_shutdown(pjsip_transport *transport) 856 871 { 872 PJ_LOG(4,(transport->obj_name, "TLS transport marked for shutdown..")); 873 857 874 /* Nothing to do for TLS */ 858 875 PJ_UNUSED_ARG(transport); 876 859 877 return PJ_SUCCESS; 860 878 } … … 866 884 { 867 885 struct tls_transport *tls_tp = (struct tls_transport*) transport; 886 887 PJ_LOG(4,(transport->obj_name, "Destroying TLS transport..")); 868 888 869 889 if (tls_tp->thread) { … … 910 930 } 911 931 932 PJ_LOG(4,(THIS_FILE, "TLS transport destroyed")); 912 933 return PJ_SUCCESS; 913 934 }
Note: See TracChangeset
for help on using the changeset viewer.