Changeset 4658


Ignore:
Timestamp:
Nov 27, 2013 10:18:18 AM (11 years ago)
Author:
nanang
Message:

Re #1519: Minor fix on TransportInfo?, use fromPj() method to import data from pjsua_transport_info.

Location:
pjproject/branches/projects/pjsua2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/pjsua2.i

    r4657 r4658  
    6868%include "pjsua2/persistent.hpp" 
    6969 
    70 %ignore pj::TransportInfo::TransportInfo(const pjsua_transport_info &info); 
    7170%include "pjsua2/siptypes.hpp" 
    7271 
  • pjproject/branches/projects/pjsua2/pjsip/include/pjsua2/siptypes.hpp

    r4657 r4658  
    394394    unsigned                usageCount; 
    395395 
    396     /** Construct from pjsip */ 
    397     TransportInfo(const pjsua_transport_info &info); 
    398  
     396    /** Construct from pjsua_transport_info */ 
     397    void fromPj(const pjsua_transport_info &info); 
    399398}; 
    400399 
  • pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/endpoint.cpp

    r4657 r4658  
    950950TransportInfo Endpoint::transportGetInfo(TransportId id) throw(Error) 
    951951{ 
    952     pjsua_transport_info tinfo; 
    953  
    954     PJSUA2_CHECK_EXPR( pjsua_transport_get_info(id, &tinfo) ); 
    955  
    956     return TransportInfo(tinfo); 
     952    pjsua_transport_info pj_tinfo; 
     953    TransportInfo tinfo; 
     954 
     955    PJSUA2_CHECK_EXPR( pjsua_transport_get_info(id, &pj_tinfo) ); 
     956    tinfo.fromPj(pj_tinfo); 
     957 
     958    return tinfo; 
    957959} 
    958960 
  • pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/siptypes.cpp

    r4657 r4658  
    300300/////////////////////////////////////////////////////////////////////////////// 
    301301 
    302 TransportInfo::TransportInfo(const pjsua_transport_info &info) 
     302void TransportInfo::fromPj(const pjsua_transport_info &info) 
    303303{ 
    304304    this->id = info.id; 
Note: See TracChangeset for help on using the changeset viewer.