Changeset 5664


Ignore:
Timestamp:
Sep 28, 2017 2:56:36 AM (7 years ago)
Author:
ming
Message:

Re #2045 (misc): Fixed assertion in pcaputil sample app if using SRTP.

The assertion is caused by passing NULL as tp parameter.

Thanks to Stefan Hörnqvist for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/pcaputil.c

    r5170 r5664  
    288288    if (srtp_crypto->slen) { 
    289289        pjmedia_srtp_crypto crypto; 
     290        pjmedia_transport *tp; 
    290291 
    291292        pj_bzero(&crypto, sizeof(crypto)); 
    292293        crypto.key = *srtp_key; 
    293294        crypto.name = *srtp_crypto; 
    294         T( pjmedia_transport_srtp_create(app.mept, NULL, NULL, &app.srtp) ); 
     295        T( pjmedia_transport_loop_create(app.mept, &tp) ); 
     296        T( pjmedia_transport_srtp_create(app.mept, tp, NULL, &app.srtp) ); 
    295297        T( pjmedia_transport_srtp_start(app.srtp, &crypto, &crypto) ); 
    296298    } 
Note: See TracChangeset for help on using the changeset viewer.