diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-03-17 16:05:35 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-03-17 16:05:35 +0000 |
commit | 0e602ccdd09d4e09556b93dbdd63841865d08388 (patch) | |
tree | 469548248ae7c70d6e2c7284b5ac2725efd0b95c /pjmedia/include | |
parent | df316c166181fd58ebc4efad3d4a2f5bfdf86e9e (diff) |
More ticket #479: bug in pjmedia_transport_get_info(), the info should be initialized by caller
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1873 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/transport.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia/transport.h b/pjmedia/include/pjmedia/transport.h index fcf120da..19869a9b 100644 --- a/pjmedia/include/pjmedia/transport.h +++ b/pjmedia/include/pjmedia/transport.h @@ -405,7 +405,7 @@ struct pjmedia_transport }; /** - * This structure describes buffer storage of transport specific info. + * This structure describes storage buffer of transport specific info. * The actual transport specific info contents will be defined by transport * implementation. Note that some transport implementations do not need to * provide specific info, since the general socket info is enough. @@ -456,10 +456,23 @@ struct pjmedia_transport_info /** - * Get media socket info from the specified transport. The socket info - * contains information about the local address of this transport, and - * would be needed for example to fill in the "c=" and "m=" line of local - * SDP. + * Initialize transport info. + * + * @param info Transport info to be initialized. + */ +PJ_INLINE(void) pjmedia_transport_info_init(pjmedia_transport_info *info) +{ + pj_bzero(&info->sock_info, sizeof(pjmedia_sock_info)); + info->sock_info.rtp_sock = info->sock_info.rtcp_sock = PJ_INVALID_SOCKET; + info->specific_info_cnt = 0; +} + + +/** + * Get media transport info from the specified transport and all underlying + * transports if any. The transport also contains information about socket info + * which describes the local address of the transport, and would be needed + * for example to fill in the "c=" and "m=" line of local SDP. * * @param tp The transport. * @param info Media socket info to be initialized. |