diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-11-25 08:46:48 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-11-25 08:46:48 +0000 |
commit | 152fa151e076d84f8a8b7d7962b053f47608cfaf (patch) | |
tree | d624bc34becb80fd0d034624e5bb4da2269192cf /pjsip-apps | |
parent | 207a333708124e35494ca9294742483240df9976 (diff) |
Fixed bug in siprtp: media transport was incorrectly NULL-ed after end of call, causing next call to fail
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@829 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/samples/siprtp.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c index 10d796e7..65b71608 100644 --- a/pjsip-apps/src/samples/siprtp.c +++ b/pjsip-apps/src/samples/siprtp.c @@ -292,6 +292,7 @@ static pj_status_t init_sip() { pj_sockaddr_in addr; pjsip_host_port addrname; + pjsip_transport *tp; pj_bzero(&addr, sizeof(addr)); addr.sin_family = PJ_AF_INET; @@ -313,11 +314,15 @@ static pj_status_t init_sip() status = pjsip_udp_transport_start( app.sip_endpt, &addr, (app.local_addr.slen ? &addrname:NULL), - 1, NULL); + 1, &tp); if (status != PJ_SUCCESS) { app_perror(THIS_FILE, "Unable to start UDP transport", status); return status; } + + PJ_LOG(3,(THIS_FILE, "SIP UDP listening on %.*s:%d", + (int)tp->local_name.host.slen, tp->local_name.host.ptr, + tp->local_name.port)); } /* @@ -380,9 +385,6 @@ static void destroy_sip() app.sip_endpt = NULL; } - /* Shutdown PJLIB */ - pj_shutdown(); - } @@ -1457,10 +1459,7 @@ static void destroy_call_media(unsigned call_index) audio->thread_quit_flag = 0; } - if (audio->transport) { - pjmedia_transport_detach(audio->transport, audio); - audio->transport = NULL; - } + pjmedia_transport_detach(audio->transport, audio); } } @@ -2119,6 +2118,8 @@ int main(int argc, char *argv[]) app_logging_shutdown(); + /* Shutdown PJLIB */ + pj_shutdown(); return 0; } |