- Timestamp:
- Feb 28, 2014 5:42:24 AM (11 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r4275 r4773 1389 1389 to connection-oriented transports 1390 1390 such as TCP and TLS. */ 1391 PJSIP_TP_STATE_DISCONNECTED 1391 PJSIP_TP_STATE_DISCONNECTED, /**< Transport disconnected, applicable 1392 1392 only to connection-oriented 1393 1393 transports such as TCP and TLS. */ 1394 PJSIP_TP_STATE_SHUTDOWN, /**< Transport shutdown, either 1395 due to TCP/TLS disconnect error 1396 from the network, or when shutdown 1397 is initiated by PJSIP itself. */ 1398 PJSIP_TP_STATE_DESTROY, /**< Transport destroy, when transport 1399 is about to be destroyed. */ 1394 1400 } pjsip_transport_state; 1395 1401 -
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r4713 r4773 1092 1092 pjsip_tpmgr *mgr; 1093 1093 pj_status_t status; 1094 pjsip_tp_state_callback state_cb; 1094 1095 1095 1096 TRACE_((THIS_FILE, "Transport %s shutting down", tp->obj_name)); … … 1112 1113 if (tp->do_shutdown) 1113 1114 status = tp->do_shutdown(tp); 1114 1115 1116 /* Notify application of transport shutdown */ 1117 state_cb = pjsip_tpmgr_get_state_cb(tp->tpmgr); 1118 if (state_cb) { 1119 pjsip_transport_state_info state_info; 1120 1121 pj_bzero(&state_info, sizeof(state_info)); 1122 state_info.status = status; 1123 (*state_cb)(tp, PJSIP_TP_STATE_SHUTDOWN, &state_info); 1124 } 1125 1115 1126 if (status == PJ_SUCCESS) 1116 1127 tp->is_shutdown = PJ_TRUE; … … 1134 1145 PJ_DEF(pj_status_t) pjsip_transport_destroy( pjsip_transport *tp) 1135 1146 { 1147 pjsip_tp_state_callback state_cb; 1148 1136 1149 /* Must have no user. */ 1137 1150 PJ_ASSERT_RETURN(pj_atomic_get(tp->ref_cnt) == 0, PJSIP_EBUSY); 1151 1152 /* Notify application of transport destroy */ 1153 state_cb = pjsip_tpmgr_get_state_cb(tp->tpmgr); 1154 if (state_cb) { 1155 pjsip_transport_state_info state_info; 1156 1157 pj_bzero(&state_info, sizeof(state_info)); 1158 (*state_cb)(tp, PJSIP_TP_STATE_DESTROY, &state_info); 1159 } 1138 1160 1139 1161 /* Destroy. */
Note: See TracChangeset
for help on using the changeset viewer.