Changeset 3106 for pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
- Timestamp:
- Feb 24, 2010 5:43:34 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
r2999 r3106 271 271 } 272 272 273 /* 274 * Transport status notification 275 */ 276 static pj_bool_t on_transport_state(pjsip_transport *tp, pj_uint32_t state, 277 const pjsip_transport_state_info *info) 278 { 279 char host_port[128]; 280 281 pj_ansi_snprintf(host_port, sizeof(host_port), "[%.*s:%d]", 282 (int)tp->remote_name.host.slen, 283 tp->remote_name.host.ptr, 284 tp->remote_name.port); 285 286 if (state & PJSIP_TP_STATE_CONNECTED) { 287 PJ_LOG(3,(THIS_FILE, "SIP transport %s is connected to %s", 288 tp->type_name, host_port)); 289 } 290 else if (state & PJSIP_TP_STATE_ACCEPTED) { 291 PJ_LOG(3,(THIS_FILE, "SIP transport %s accepted %s", 292 tp->type_name, host_port)); 293 } 294 else if (state & PJSIP_TP_STATE_DISCONNECTED) { 295 char buf[100]; 296 297 snprintf(buf, sizeof(buf), "SIP transport %s is disconnected from %s", 298 tp->type_name, host_port); 299 pjsua_perror(THIS_FILE, buf, info->status); 300 } 301 else if (state & PJSIP_TP_STATE_REJECTED) { 302 char buf[100]; 303 304 snprintf(buf, sizeof(buf), "SIP transport %s rejected %s", 305 tp->type_name, host_port); 306 pjsua_perror(THIS_FILE, buf, info->status); 307 } 308 309 #if defined(PJSIP_HAS_TLS_TRANSPORT) && PJSIP_HAS_TLS_TRANSPORT!=0 310 311 if (!pj_ansi_stricmp(tp->type_name, "tls") && info->ext_info && 312 (state == PJSIP_TP_STATE_CONNECTED || 313 (state & PJSIP_TP_STATE_TLS_VERIF_ERROR))) 314 { 315 pjsip_tls_state_info *tls_info = (pjsip_tls_state_info*)info->ext_info; 316 pj_ssl_sock_info *ssl_sock_info = (pj_ssl_sock_info*) 317 tls_info->ssl_sock_info; 318 char buf[2048]; 319 320 /* Dump server TLS certificate */ 321 pj_ssl_cert_info_dump(ssl_sock_info->remote_cert_info, " ", 322 buf, sizeof(buf)); 323 PJ_LOG(4,(THIS_FILE, "TLS cert info of %s:\n%s", host_port, buf)); 324 } 325 326 #endif 327 return PJ_TRUE; 328 } 329 273 330 274 331 //#include<e32debug.h> … … 331 388 cfg.cb.on_call_replaced = &on_call_replaced; 332 389 cfg.cb.on_nat_detect = &on_nat_detect; 390 cfg.cb.on_transport_state = &on_transport_state; 333 391 334 392 if (SIP_PROXY) { … … 1055 1113 1056 1114 // Initialize RSocketServ 1057 if ((err=aSocketServer.Connect( )) != KErrNone)1115 if ((err=aSocketServer.Connect(32)) != KErrNone) 1058 1116 return PJ_STATUS_FROM_OS(err); 1059 1117
Note: See TracChangeset
for help on using the changeset viewer.