Changeset 368 for pjproject/trunk
- Timestamp:
- Mar 30, 2006 4:46:36 PM (19 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/util.h
r361 r368 135 135 static void dump_pool_usage( const char *app_name, pj_caching_pool *cp ) 136 136 { 137 #if !defined(PJ_HAS_POOL_ALT_API) || PJ_HAS_POOL_ALT_API==0 137 138 pj_pool_t *p; 138 139 unsigned total_alloc = 0; … … 150 151 total_alloc / 1000, 151 152 total_used / 1000)); 153 #endif 152 154 } -
pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
r315 r368 940 940 941 941 /* Dumping pool factory. */ 942 (*endpt->pf->dump_status)(endpt->pf, detail);942 pj_pool_factory_dump(endpt->pf, detail); 943 943 944 944 /* Pool health. */ -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r350 r368 99 99 100 100 /* Close and reopen socket. */ 101 static pj_status_t reopen_sock( pj_sock_t *sock) 102 { 103 pj_sockaddr_in addr; 104 int addrlen; 101 static pj_status_t reopen_sock( pj_sock_t *sock, pj_sockaddr_in *addr) 102 { 105 103 pj_status_t status; 106 107 addrlen = sizeof(pj_sockaddr_in);108 status = pj_sock_getsockname(*sock, &addr, &addrlen);109 if (status != PJ_SUCCESS) {110 pjsua_perror(THIS_FILE, "Error getting RTP/RTCP socket name", status);111 return status;112 }113 114 pj_sock_close(*sock);115 104 116 105 status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, sock); … … 120 109 } 121 110 122 status = pj_sock_bind(*sock, &addr, sizeof(pj_sockaddr_in));111 status = pj_sock_bind(*sock, addr, sizeof(pj_sockaddr_in)); 123 112 if (status != PJ_SUCCESS) { 124 113 pjsua_perror(THIS_FILE, "Unable to re-bind RTP/RTCP socket", status); … … 142 131 143 132 if (call->session) { 133 pj_sockaddr_in rtp_addr, rtcp_addr; 134 int addrlen; 135 136 addrlen = sizeof(rtp_addr); 137 pj_sock_getsockname(call->skinfo.rtp_sock, &rtp_addr, &addrlen); 138 139 addrlen = sizeof(rtcp_addr); 140 pj_sock_getsockname(call->skinfo.rtcp_sock, &rtcp_addr, &addrlen); 141 142 /* Destroy session (this will also close RTP/RTCP sockets). */ 143 pjmedia_session_destroy(call->session); 144 144 145 145 /* Close and reopen RTP socket. … … 147 147 * when IOCompletionPort is used. 148 148 */ 149 reopen_sock(&call->skinfo.rtp_sock );149 reopen_sock(&call->skinfo.rtp_sock, &rtp_addr); 150 150 151 151 /* Close and reopen RTCP socket too. */ 152 reopen_sock(&call->skinfo.rtcp_sock); 153 154 /* Must destroy session after socket is closed. */ 155 pjmedia_session_destroy(call->session); 152 reopen_sock(&call->skinfo.rtcp_sock, &rtcp_addr); 153 156 154 call->session = NULL; 157 155
Note: See TracChangeset
for help on using the changeset viewer.