Changeset 1519 for pjproject/trunk
- Timestamp:
- Oct 24, 2007 9:37:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
r1476 r1519 139 139 pj_status_t status); 140 140 141 /* Handle accept() completion */ 142 static pj_status_t handle_accept(pj_ioqueue_key_t *key, 143 pj_ioqueue_op_key_t *op_key, 144 pj_sock_t sock, 145 pj_status_t status); 146 141 147 /* This callback is called by transport manager to destroy listener */ 142 148 static pj_status_t lis_destroy(pjsip_tpfactory *factory); … … 359 365 listener->accept_op[i]->index = i; 360 366 361 on_accept_complete(listener->key, &listener->accept_op[i]->op_key, 362 listener->sock, PJ_EPENDING); 367 status = handle_accept(listener->key, &listener->accept_op[i]->op_key, 368 listener->sock, PJ_EPENDING); 369 if (status != PJ_SUCCESS) 370 goto on_error; 363 371 } 364 372 … … 903 911 pj_status_t status) 904 912 { 913 handle_accept(key, op_key, sock, status); 914 } 915 916 917 /* Handle accept() completion */ 918 static pj_status_t handle_accept(pj_ioqueue_key_t *key, 919 pj_ioqueue_op_key_t *op_key, 920 pj_sock_t sock, 921 pj_status_t status) 922 { 905 923 struct tcp_listener *listener; 906 924 struct tcp_transport *tcp; … … 936 954 */ 937 955 ++err_cnt; 938 if (err_cnt >= 10) {956 if (err_cnt >= 20) { 939 957 PJ_LOG(1, (listener->factory.obj_name, 940 "Too many errors, listener stopping")); 958 "Too many errors, LISTENER IS STOPPING!")); 959 return status; 941 960 } 942 961 … … 1021 1040 1022 1041 } while (status != PJ_EPENDING); 1042 1043 return PJ_SUCCESS; 1023 1044 } 1024 1045
Note: See TracChangeset
for help on using the changeset viewer.