Ignore:
Timestamp:
Feb 25, 2010 11:58:19 AM (12 years ago)
Author:
nanang
Message:

More ticket #1032:

  • Updated transport state notification callback to return void.
  • Updated transport state enum to only contain connected and disconnected, no more bitmask value.
  • Added direction field to SIP transport.
  • Removed remote hostname hash from transport key.
  • Updated cert info dump to return -1 when buffer is insufficient.
  • Added new error code PJSIP_TLS_ECERTVERIF.
  • Updated get_cert_name() in ssl_sock_symbian.c to use heap buffer instead of stack.
  • Minors, e.g: added prefix PJ in cipher types, docs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp

    r3106 r3110  
    274274 * Transport status notification 
    275275 */ 
    276 static pj_bool_t on_transport_state(pjsip_transport *tp, pj_uint32_t state, 
    277                                     const pjsip_transport_state_info *info) 
     276static void on_transport_state(pjsip_transport *tp,  
     277                               pjsip_transport_state state, 
     278                               const pjsip_transport_state_info *info) 
    278279{ 
    279280    char host_port[128]; 
     
    284285                     tp->remote_name.port); 
    285286 
    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); 
     287    switch (state) { 
     288    case PJSIP_TP_STATE_CONNECTED: 
     289        { 
     290            PJ_LOG(3,(THIS_FILE, "SIP transport %s is connected to %s",  
     291                     tp->type_name, host_port)); 
     292        } 
     293        break; 
     294 
     295    case PJSIP_TP_STATE_DISCONNECTED: 
     296        { 
     297            char buf[100]; 
     298 
     299            snprintf(buf, sizeof(buf), "SIP transport %s is disconnected from %s", 
     300                     tp->type_name, host_port); 
     301            pjsua_perror(THIS_FILE, buf, info->status); 
     302        } 
     303        break; 
     304 
     305    default: 
     306        break; 
    307307    } 
    308308 
     
    310310 
    311311    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))) 
     312        state == PJSIP_TP_STATE_CONNECTED)  
    314313    { 
    315314        pjsip_tls_state_info *tls_info = (pjsip_tls_state_info*)info->ext_info; 
     
    325324 
    326325#endif 
    327     return PJ_TRUE; 
    328326} 
    329327 
Note: See TracChangeset for help on using the changeset viewer.