Changeset 5746


Ignore:
Timestamp:
Feb 26, 2018 7:50:18 AM (18 months ago)
Author:
nanang
Message:

Fixe #2096:

  • Fixed re-INVITE scenario: always generate SRTP attr in SDP re-offer/answer as both offerer/answerer (as long as SRTP is not disabled of course), currently it does not generate SRTP attr if active session does not use SRTP.
  • Fixed bug in retrieving video stream info from SDP that caused DTLS transport (UDP/TLS/RTP/SAVP) getting rejected.
  • Added pjsua app param '--srtp-keying=0/1' to choose SRTP keying to be used in the outgoing offer (0=SDES (default), 1=DTLS-SRTP).
  • Few minors, e.g: adding transport_srtp_dtls/sdes.c to pjmedia MSVC2015 project.
Location:
pjproject/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/build/pjmedia.vcxproj

    r5547 r5746  
    200200  <PropertyGroup> 
    201201    <PlatformToolset>$(BuildToolset)</PlatformToolset> 
    202     <CharacterSet Condition="'$(API_Family)'!='WinDesktop'"></CharacterSet> 
    203   </PropertyGroup>   
     202    <CharacterSet Condition="'$(API_Family)'!='WinDesktop'"> 
     203    </CharacterSet> 
     204  </PropertyGroup> 
    204205  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> 
    205206  <ImportGroup Label="ExtensionSettings"> 
     
    297298  <PropertyGroup Label="UserMacros" /> 
    298299  <PropertyGroup> 
    299     <_ProjectFileVersion>14.0.22823.1</_ProjectFileVersion>     
     300    <_ProjectFileVersion>14.0.22823.1</_ProjectFileVersion> 
    300301  </PropertyGroup> 
    301302  <!-- Compile and link option definition --> 
     
    513514    <ClCompile Include="..\src\pjmedia\transport_loop.c" /> 
    514515    <ClCompile Include="..\src\pjmedia\transport_srtp.c" /> 
     516    <ClCompile Include="..\src\pjmedia\transport_srtp_dtls.c"> 
     517      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|Win32'">true</ExcludedFromBuild> 
     518      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> 
     519      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Dynamic|Win32'">true</ExcludedFromBuild> 
     520      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 
     521      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Static|Win32'">true</ExcludedFromBuild> 
     522      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Dynamic|Win32'">true</ExcludedFromBuild> 
     523      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|ARM'">true</ExcludedFromBuild> 
     524      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild> 
     525      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Dynamic|ARM'">true</ExcludedFromBuild> 
     526      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild> 
     527      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Static|ARM'">true</ExcludedFromBuild> 
     528      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Dynamic|ARM'">true</ExcludedFromBuild> 
     529      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|x64'">true</ExcludedFromBuild> 
     530      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> 
     531      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Dynamic|x64'">true</ExcludedFromBuild> 
     532      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> 
     533      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Static|x64'">true</ExcludedFromBuild> 
     534      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Dynamic|x64'">true</ExcludedFromBuild> 
     535    </ClCompile> 
     536    <ClCompile Include="..\src\pjmedia\transport_srtp_sdes.c"> 
     537      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|Win32'">true</ExcludedFromBuild> 
     538      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> 
     539      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Dynamic|Win32'">true</ExcludedFromBuild> 
     540      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 
     541      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Static|Win32'">true</ExcludedFromBuild> 
     542      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Dynamic|Win32'">true</ExcludedFromBuild> 
     543      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|ARM'">true</ExcludedFromBuild> 
     544      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild> 
     545      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Dynamic|ARM'">true</ExcludedFromBuild> 
     546      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild> 
     547      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Static|ARM'">true</ExcludedFromBuild> 
     548      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Dynamic|ARM'">true</ExcludedFromBuild> 
     549      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|x64'">true</ExcludedFromBuild> 
     550      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> 
     551      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Dynamic|x64'">true</ExcludedFromBuild> 
     552      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> 
     553      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-Static|x64'">true</ExcludedFromBuild> 
     554      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Dynamic|x64'">true</ExcludedFromBuild> 
     555    </ClCompile> 
    515556    <ClCompile Include="..\src\pjmedia\transport_udp.c" /> 
    516557    <ClCompile Include="..\src\pjmedia\types.c" /> 
  • pjproject/trunk/pjmedia/build/pjmedia.vcxproj.filters

    r5432 r5746  
    216216      <Filter>Source Files</Filter> 
    217217    </ClCompile> 
     218    <ClCompile Include="..\src\pjmedia\transport_srtp_dtls.c"> 
     219      <Filter>Source Files</Filter> 
     220    </ClCompile> 
     221    <ClCompile Include="..\src\pjmedia\transport_srtp_sdes.c"> 
     222      <Filter>Source Files</Filter> 
     223    </ClCompile> 
    218224  </ItemGroup> 
    219225  <ItemGroup> 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r5725 r5746  
    120120#endif 
    121121 
     122/* Maximum number of SRTP keying method */ 
     123#define MAX_KEYING                  2 
     124 
    122125static const pj_str_t ID_RTP_AVP  = { "RTP/AVP", 7 }; 
    123126static const pj_str_t ID_RTP_SAVP = { "RTP/SAVP", 8 }; 
     
    284287     * method, any other keying methods will be stopped and destroyed. 
    285288     */ 
     289    unsigned             all_keying_cnt; 
     290    pjmedia_transport   *all_keying[MAX_KEYING]; 
     291 
     292    /* Current active SRTP keying methods. */ 
    286293    unsigned             keying_cnt; 
    287     pjmedia_transport   *keying[2]; 
     294    pjmedia_transport   *keying[MAX_KEYING]; 
    288295 
    289296    /* If not zero, keying nego is ongoing (async-ly, e.g: by DTLS-SRTP). 
     
    718725 
    719726    /* Initialize SRTP keying method. */ 
    720     for (i = 0; i < srtp->setting.keying_count; ++i) { 
     727    for (i = 0; i < srtp->setting.keying_count && i < MAX_KEYING; ++i) { 
    721728        switch(srtp->setting.keying[i]) { 
    722729 
    723730        case PJMEDIA_SRTP_KEYING_SDES: 
    724731#if defined(PJMEDIA_SRTP_HAS_SDES) && (PJMEDIA_SRTP_HAS_SDES != 0) 
    725             sdes_create(srtp, &srtp->keying[srtp->keying_cnt++]); 
     732            sdes_create(srtp, &srtp->all_keying[srtp->all_keying_cnt++]); 
    726733#endif 
    727734            break; 
     
    729736        case PJMEDIA_SRTP_KEYING_DTLS_SRTP: 
    730737#if defined(PJMEDIA_SRTP_HAS_DTLS) && (PJMEDIA_SRTP_HAS_DTLS != 0) 
    731             dtls_create(srtp, &srtp->keying[srtp->keying_cnt++]); 
     738            dtls_create(srtp, &srtp->all_keying[srtp->all_keying_cnt++]); 
    732739#endif 
    733740            break; 
     
    10391046              sizeof(srtp_info)); 
    10401047 
    1041     /* Invoke get_info() of all keying methods */ 
     1048    /* Invoke get_info() from any active keying method */ 
    10421049    for (i=0; i < srtp->keying_cnt; i++) 
    10431050        pjmedia_transport_get_info(srtp->keying[i], info); 
     
    13721379    struct transport_srtp *srtp = (struct transport_srtp*) tp; 
    13731380    unsigned member_tp_option; 
    1374     pj_status_t last_err_st = PJ_EBUG; 
     1381    pj_status_t keying_status = PJ_SUCCESS; 
    13751382    pj_status_t status; 
    13761383    unsigned i; 
     
    13841391    srtp->offerer_side = (sdp_remote == NULL); 
    13851392 
    1386     if (srtp->offerer_side && srtp->setting.use == PJMEDIA_SRTP_DISABLED) 
     1393    if (srtp->offerer_side && srtp->setting.use == PJMEDIA_SRTP_DISABLED) { 
    13871394        srtp->bypass_srtp = PJ_TRUE; 
    1388     else 
     1395        srtp->keying_cnt = 0; 
     1396    } else { 
     1397        srtp->bypass_srtp = PJ_FALSE; 
     1398        srtp->keying_cnt = srtp->all_keying_cnt; 
     1399        for (i = 0; i < srtp->all_keying_cnt; ++i) 
     1400            srtp->keying[i] = srtp->all_keying[i]; 
     1401 
    13891402        member_tp_option |= PJMEDIA_TPMED_NO_TRANSPORT_CHECKING; 
     1403    } 
    13901404 
    13911405    status = pjmedia_transport_media_create(srtp->member_tp, sdp_pool, 
    13921406                                            member_tp_option, sdp_remote, 
    13931407                                            media_index); 
    1394     if (status != PJ_SUCCESS || srtp->bypass_srtp) 
     1408    if (status != PJ_SUCCESS) 
    13951409        return status; 
    13961410 
     
    14061420                           srtp->keying_cnt, i); 
    14071421            srtp->keying_cnt--; 
    1408             last_err_st = st; 
     1422            keying_status = st; 
    14091423            continue; 
    14101424        } else if (srtp->offerer_side) { 
     
    14201434    /* All keying method failed to process remote SDP? */ 
    14211435    if (srtp->keying_cnt == 0) 
    1422         return last_err_st; 
     1436        return keying_status; 
    14231437 
    14241438    return PJ_SUCCESS; 
     
    14321446{ 
    14331447    struct transport_srtp *srtp = (struct transport_srtp*) tp; 
    1434     pj_status_t last_err_st = PJ_EBUG; 
     1448    pj_status_t keying_status = PJ_SUCCESS; 
    14351449    pj_status_t status; 
    14361450    unsigned i; 
     
    14451459    status = pjmedia_transport_encode_sdp(srtp->member_tp, sdp_pool, 
    14461460                                          sdp_local, sdp_remote, media_index); 
    1447     if (status != PJ_SUCCESS || srtp->bypass_srtp) 
     1461    if (status != PJ_SUCCESS) 
    14481462        return status; 
    14491463 
     
    14591473                           srtp->keying_cnt, i); 
    14601474            srtp->keying_cnt--; 
    1461             last_err_st = st; 
     1475            keying_status = st; 
    14621476            continue; 
    14631477        } 
     
    14831497    /* All keying method failed to process remote SDP? */ 
    14841498    if (srtp->keying_cnt == 0) 
    1485         return last_err_st; 
     1499        return keying_status; 
    14861500 
    14871501    return PJ_SUCCESS; 
     
    14961510{ 
    14971511    struct transport_srtp *srtp = (struct transport_srtp*) tp; 
    1498     pj_status_t last_err_st = PJ_EBUG; 
     1512    pj_status_t keying_status = PJ_SUCCESS; 
    14991513    pj_status_t status; 
    15001514    unsigned i; 
     
    15051519                                           sdp_local, sdp_remote, 
    15061520                                           media_index); 
    1507     if (status != PJ_SUCCESS || srtp->bypass_srtp) 
     1521    if (status != PJ_SUCCESS) 
    15081522        return status; 
    15091523 
     
    15181532                           srtp->keying_cnt, i); 
    15191533            srtp->keying_cnt--; 
    1520             last_err_st = status; 
     1534            keying_status = status; 
    15211535            continue; 
    15221536        } 
     
    15421556    /* All keying method failed to process remote SDP? */ 
    15431557    if (srtp->keying_cnt == 0) 
    1544         return last_err_st; 
     1558        return keying_status; 
    15451559 
    15461560    /* If SRTP key is being negotiated, just return now. 
     
    16241638 
    16251639#endif 
    1626  
    1627  
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_dtls.c

    r5635 r5746  
    375375    unsigned i; 
    376376    int mode, rc; 
    377          
     377 
     378    /* Check if it is already instantiated */ 
     379    if (ds->ossl_ssl) 
     380        return PJ_SUCCESS; 
     381 
    378382    /* Create DTLS context */ 
    379383    ctx = SSL_CTX_new(DTLS_method()); 
     
    685689    pj_status_t status; 
    686690    int err; 
     691 
     692    /* Init DTLS (if not yet) */ 
     693    status = ssl_create(ds); 
     694    if (status != PJ_SUCCESS) 
     695        return status; 
    687696 
    688697    /* Check if handshake has been initiated or even completed */ 
     
    10141023    } 
    10151024 
    1016     /* Init DTLS */ 
    1017     if (!ds->ossl_ssl) { 
    1018         status = ssl_create(ds); 
    1019         if (status != PJ_SUCCESS) 
    1020             goto on_return; 
    1021     } 
    1022  
    10231025    /* Set remote cert fingerprint verification status to PJ_EPENDING */ 
    10241026    ds->rem_fprint_status = PJ_EPENDING; 
     
    11001102            ds->nego_started = PJ_FALSE; 
    11011103            ds->got_keys = PJ_FALSE; 
    1102  
    1103             status = ssl_create(ds); 
    1104             if (status != PJ_SUCCESS) 
    1105                 goto on_return; 
    1106         } 
    1107     } 
    1108  
    1109     /* Set media transport to UDP/TLS/RTP/SAVP */ 
    1110     m_loc->desc.transport = ID_TP_DTLS_SRTP; 
     1104            ds->rem_fprint_status = PJ_EPENDING; 
     1105        } 
     1106    } 
     1107 
     1108    /* Set media transport to UDP/TLS/RTP/SAVP if we are the offerer, 
     1109     * otherwise just match it to the offer (currently we only accept 
     1110     * UDP/TLS/RTP/SAVP in remote offer though). 
     1111     */ 
     1112    if (ds->srtp->offerer_side) { 
     1113        m_loc->desc.transport = ID_TP_DTLS_SRTP; 
     1114    } else { 
     1115        m_loc->desc.transport =  
     1116                            sdp_remote->media[media_index]->desc.transport; 
     1117    } 
    11111118 
    11121119    /* Add a=fingerprint attribute, fingerprint of our TLS certificate */ 
     
    11701177        use_ice = ice_info && ice_info->comp_cnt; 
    11711178        if (!use_ice) { 
     1179            /* Start SSL nego */ 
    11721180            status = ssl_handshake(ds); 
    11731181            if (status != PJ_SUCCESS) 
     
    12231231            ds->nego_started = PJ_FALSE; 
    12241232            ds->got_keys = PJ_FALSE; 
    1225  
    1226             status = ssl_create(ds); 
    1227             if (status != PJ_SUCCESS) 
    1228                 goto on_return; 
     1233            ds->rem_fprint_status = PJ_EPENDING; 
    12291234        } 
    12301235    } else { 
     
    13871392 
    13881393    /* Find DTLS keying and destroy any other keying. */ 
    1389     for (j = 0; j < srtp->keying_cnt; ++j) { 
    1390         if (srtp->keying[j]->op == &dtls_op) 
    1391             ds = (dtls_srtp*)srtp->keying[j]; 
     1394    for (j = 0; j < srtp->all_keying_cnt; ++j) { 
     1395        if (srtp->all_keying[j]->op == &dtls_op) 
     1396            ds = (dtls_srtp*)srtp->all_keying[j]; 
    13921397        else 
    1393             pjmedia_transport_close(srtp->keying[j]); 
     1398            pjmedia_transport_close(srtp->all_keying[j]); 
    13941399    } 
    13951400 
     
    14011406    srtp->keying_cnt = 1; 
    14021407    srtp->keying[0] = &ds->base; 
    1403     srtp->keying_pending_cnt = 1; 
     1408    srtp->keying_pending_cnt = 0; 
    14041409 
    14051410    /* Apply param to DTLS-SRTP internal states */ 
     
    14131418    ds->pending_start = PJ_TRUE; 
    14141419    srtp->keying_pending_cnt++; 
    1415  
    1416     /* Create SSL */ 
    1417     status = ssl_create(ds); 
    1418     if (status != PJ_SUCCESS) 
    1419         goto on_return; 
    14201420 
    14211421    /* Attach member transport, so we can send/receive DTLS init packets */ 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_sdes.c

    r5725 r5746  
    280280    /* Validations */ 
    281281    if (srtp->offerer_side) { 
    282         if (srtp->setting.use == PJMEDIA_SRTP_DISABLED) 
    283             srtp->bypass_srtp = PJ_TRUE; 
     282        /* As offerer: do nothing. */ 
    284283    } else { 
    285284        pjmedia_sdp_media *m_rem = sdp_remote->media[media_index]; 
  • pjproject/trunk/pjmedia/src/pjmedia/vid_stream_info.c

    r5436 r5746  
    243243        si->proto = PJMEDIA_TP_PROTO_RTP_AVP; 
    244244 
    245     } else if (pj_stricmp(&local_m->desc.transport, &ID_RTP_SAVP) == 0) { 
     245    } else if (pj_stristr(&local_m->desc.transport, &ID_RTP_SAVP)) { 
    246246 
    247247        si->proto = PJMEDIA_TP_PROTO_RTP_SAVP; 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r5677 r5746  
    10111011} 
    10121012 
     1013/* 
     1014 * This callback is called when media transport SRTP needs to be created. 
     1015 */ 
     1016static void on_create_media_transport_srtp(pjsua_call_id call_id, 
     1017                                           unsigned media_idx, 
     1018                                           pjmedia_srtp_setting *srtp_opt) 
     1019{ 
     1020    PJ_UNUSED_ARG(call_id); 
     1021    PJ_UNUSED_ARG(media_idx); 
     1022 
     1023    /* Set SRTP keying to use DTLS over SDES */ 
     1024    if (app_config.srtp_keying == 1) { 
     1025        srtp_opt->keying_count = 2; 
     1026        srtp_opt->keying[0] = PJMEDIA_SRTP_KEYING_DTLS_SRTP; 
     1027        srtp_opt->keying[1] = PJMEDIA_SRTP_KEYING_SDES; 
     1028    } 
     1029} 
     1030 
     1031 
    10131032#ifdef TRANSPORT_ADAPTER_SAMPLE 
    10141033/* 
     
    13441363    app_config.cfg.cb.on_snd_dev_operation = &on_snd_dev_operation; 
    13451364    app_config.cfg.cb.on_call_media_event = &on_call_media_event; 
     1365    app_config.cfg.cb.on_create_media_transport_srtp = 
     1366                                            &on_create_media_transport_srtp; 
    13461367#ifdef TRANSPORT_ADAPTER_SAMPLE 
    13471368    app_config.cfg.cb.on_create_media_transport = &on_create_media_transport; 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_common.h

    r4489 r5746  
    8585    pjsua_transport_config  rtp_cfg; 
    8686    pjsip_redirect_op       redir_op; 
     87    int                     srtp_keying; 
    8788 
    8889    unsigned                acc_cnt; 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_config.c

    r5701 r5746  
    192192    puts  ("  --turn-user         TURN username"); 
    193193    puts  ("  --turn-passwd       TURN password"); 
     194#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
     195    puts  ("  --srtp-keying       SRTP keying method for outgoing SDP offer."); 
     196    puts  ("                      0=SDES (default), 1=DTLS"); 
     197#endif 
    194198 
    195199    puts  (""); 
     
    356360           OPT_USE_ICE, OPT_ICE_REGULAR, OPT_USE_SRTP, OPT_SRTP_SECURE, 
    357361           OPT_USE_TURN, OPT_ICE_MAX_HOSTS, OPT_ICE_NO_RTCP, OPT_TURN_SRV, 
    358            OPT_TURN_TCP, OPT_TURN_USER, OPT_TURN_PASSWD, 
     362           OPT_TURN_TCP, OPT_TURN_USER, OPT_TURN_PASSWD, OPT_SRTP_KEYING, 
    359363           OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC, 
    360364           OPT_ILBC_MODE, OPT_REC_FILE, OPT_AUTO_REC, 
     
    453457        { "use-srtp",   1, 0, OPT_USE_SRTP}, 
    454458        { "srtp-secure",1, 0, OPT_SRTP_SECURE}, 
     459        { "srtp-keying",1, 0, OPT_SRTP_KEYING}, 
    455460#endif 
    456461        { "add-codec",  1, 0, OPT_ADD_CODEC}, 
     
    10421047            cur_acc->srtp_secure_signaling = app_config.cfg.srtp_secure_signaling; 
    10431048            break; 
     1049        case OPT_SRTP_KEYING: 
     1050            app_config.srtp_keying = my_atoi(pj_optarg); 
     1051            if (!pj_isdigit(*pj_optarg) || app_config.srtp_keying < 0 || 
     1052                app_config.srtp_keying > 1) 
     1053            { 
     1054                PJ_LOG(1,(THIS_FILE, "Invalid value for --srtp-keying option")); 
     1055                return -1; 
     1056            } 
     1057            break; 
    10441058#endif 
    10451059 
     
    19261940        pj_strcat2(&cfg, line); 
    19271941    } 
     1942    if (app_config.srtp_keying >= 0 && app_config.srtp_keying <= 1) 
     1943    { 
     1944        pj_ansi_sprintf(line, "--srtp-keying %d\n", 
     1945                        app_config.srtp_keying); 
     1946        pj_strcat2(&cfg, line); 
     1947    } 
    19281948#endif 
    19291949 
Note: See TracChangeset for help on using the changeset viewer.