- Timestamp:
- Mar 10, 2010 1:33:25 PM (15 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r3110 r3119 2805 2805 case PJSIP_TP_STATE_CONNECTED: 2806 2806 { 2807 PJ_LOG(3,(THIS_FILE, "SIP transport %s is connected to %s",2807 PJ_LOG(3,(THIS_FILE, "SIP %s transport is connected to %s", 2808 2808 tp->type_name, host_port)); 2809 2809 } … … 2814 2814 char buf[100]; 2815 2815 2816 snprintf(buf, sizeof(buf), "SIP transport %sis disconnected from %s",2816 snprintf(buf, sizeof(buf), "SIP %s transport is disconnected from %s", 2817 2817 tp->type_name, host_port); 2818 2818 pjsua_perror(THIS_FILE, buf, info->status); -
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r3110 r3119 1313 1313 */ 1314 1314 PJ_DECL(pj_status_t) pjsip_tpmgr_set_status_cb(pjsip_tpmgr *mgr, 1315 pjsip_tp_state_callback *cb);1315 pjsip_tp_state_callback cb); 1316 1316 1317 1317 … … 1323 1323 * @return The transport state callback or NULL if it is not set. 1324 1324 */ 1325 PJ_DECL(pjsip_tp_state_callback *) pjsip_tpmgr_get_status_cb(1325 PJ_DECL(pjsip_tp_state_callback) pjsip_tpmgr_get_status_cb( 1326 1326 const pjsip_tpmgr *mgr); 1327 1327 -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r3096 r3119 253 253 pjsip_module mod; /**< pjsua's PJSIP module. */ 254 254 pjsua_transport_data tpdata[8]; /**< Array of transports. */ 255 pjsip_tp_state_callback old_tp_cb; /**< Old transport callback. */ 255 256 256 257 /* Threading: */ -
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r3110 r3119 90 90 void (*on_rx_msg)(pjsip_endpoint*, pj_status_t, pjsip_rx_data*); 91 91 pj_status_t (*on_tx_msg)(pjsip_endpoint*, pjsip_tx_data*); 92 pjsip_tp_state_callback *tp_state_cb;92 pjsip_tp_state_callback tp_state_cb; 93 93 void *tp_state_user_data; 94 94 }; … … 1739 1739 1740 1740 PJ_DEF(pj_status_t) pjsip_tpmgr_set_status_cb(pjsip_tpmgr *mgr, 1741 pjsip_tp_state_callback *cb)1741 pjsip_tp_state_callback cb) 1742 1742 { 1743 1743 PJ_ASSERT_RETURN(mgr, PJ_EINVAL); … … 1748 1748 } 1749 1749 1750 PJ_DEF(pjsip_tp_state_callback *) pjsip_tpmgr_get_status_cb(1750 PJ_DEF(pjsip_tp_state_callback) pjsip_tpmgr_get_status_cb( 1751 1751 const pjsip_tpmgr *mgr) 1752 1752 { -
pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
r3113 r3119 170 170 static void tcp_init_shutdown(struct tcp_transport *tcp, pj_status_t status) 171 171 { 172 pjsip_tp_state_callback *state_cb;172 pjsip_tp_state_callback state_cb; 173 173 174 174 if (tcp->close_reason == PJ_SUCCESS) … … 953 953 struct tcp_transport *tcp; 954 954 char addr[PJ_INET6_ADDRSTRLEN+10]; 955 pjsip_tp_state_callback *state_cb;955 pjsip_tp_state_callback state_cb; 956 956 pj_status_t status; 957 957 … … 1263 1263 pj_sockaddr_in addr; 1264 1264 int addrlen; 1265 1266 pjsip_tp_state_callback *state_cb; 1265 pjsip_tp_state_callback state_cb; 1267 1266 1268 1267 tcp = (struct tcp_transport*) pj_activesock_get_user_data(asock); -
pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c
r3110 r3119 177 177 static void tls_init_shutdown(struct tls_transport *tls, pj_status_t status) 178 178 { 179 pjsip_tp_state_callback *state_cb;179 pjsip_tp_state_callback state_cb; 180 180 181 181 if (tls->close_reason == PJ_SUCCESS) … … 978 978 pj_ssl_sock_info ssl_info; 979 979 char addr[PJ_INET6_ADDRSTRLEN+10]; 980 pjsip_tp_state_callback *state_cb;980 pjsip_tp_state_callback state_cb; 981 981 pj_bool_t is_shutdown; 982 982 pj_status_t status; … … 1338 1338 pj_ssl_sock_info ssl_info; 1339 1339 pj_sockaddr_in addr, *tp_addr; 1340 pjsip_tp_state_callback *state_cb;1340 pjsip_tp_state_callback state_cb; 1341 1341 pj_bool_t is_shutdown; 1342 1342 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r3106 r3119 1526 1526 } 1527 1527 1528 /* Callback to receive transport state notifications */ 1529 static void on_tp_state_callback(pjsip_transport *tp, 1530 pjsip_transport_state state, 1531 const pjsip_transport_state_info *info) 1532 { 1533 if (pjsua_var.ua_cfg.cb.on_transport_state) { 1534 (*pjsua_var.ua_cfg.cb.on_transport_state)(tp, state, info); 1535 } 1536 if (pjsua_var.old_tp_cb) { 1537 (*pjsua_var.old_tp_cb)(tp, state, info); 1538 } 1539 } 1540 1528 1541 /* 1529 1542 * Create and initialize SIP socket (and possibly resolve public … … 1867 1880 /* Set transport state callback */ 1868 1881 if (pjsua_var.ua_cfg.cb.on_transport_state) { 1869 pjsip_tpmgr_set_status_cb(pjsip_endpt_get_tpmgr(pjsua_var.endpt), 1870 &pjsua_var.ua_cfg.cb.on_transport_state); 1882 pjsip_tp_state_callback tpcb; 1883 pjsip_tpmgr *tpmgr; 1884 1885 tpmgr = pjsip_endpt_get_tpmgr(pjsua_var.endpt); 1886 tpcb = pjsip_tpmgr_get_status_cb(tpmgr); 1887 1888 if (tpcb != &on_tp_state_callback) { 1889 pjsua_var.old_tp_cb = tpcb; 1890 pjsip_tpmgr_set_status_cb(tpmgr, &on_tp_state_callback); 1891 } 1871 1892 } 1872 1893
Note: See TracChangeset
for help on using the changeset viewer.