@@ -463,6 +463,11 @@ ngx_rtmp_oclp_create_event(ngx_conf_t *cf, ngx_rtmp_oclp_event_t *event,
463463
464464 event -> url .len = values [i ].len ;
465465 event -> url .data = values [i ].data ;
466+ if (values [i ].data [values [i ].len - 1 ] != '/' ) {
467+ event -> url .data = ngx_pcalloc (cf -> pool , values [i ].len + 1 );
468+ event -> url .len = values [i ].len + 1 ;
469+ ngx_snprintf (event -> url .data , event -> url .len , "%V/" , & values [i ]);
470+ }
466471
467472 if (ngx_parse_request_url (& ru , & event -> url ) != NGX_OK ) {
468473 ngx_conf_log_error (NGX_LOG_WARN , cf , 0 , "request url format error" );
@@ -738,13 +743,17 @@ ngx_rtmp_oclp_common_url(ngx_str_t *url, ngx_rtmp_session_t *s,
738743 buf = p ;
739744
740745 if (ru .args .len ) { // url already has args
741- p = ngx_snprintf (buf , len , "&call=%s&act=%s&domain=%V&app=%V&name=%V" ,
746+ p = ngx_snprintf (buf , len ,
747+ "&call=%s&act=%s&domain=%V&app=%V&name=%V&clientid=%D" ,
742748 ngx_rtmp_oclp_app_type [nctx -> type ],
743- ngx_rtmp_oclp_stage [stage ], & s -> domain , & s -> app , & s -> name );
749+ ngx_rtmp_oclp_stage [stage ],
750+ & s -> domain , & s -> app , & s -> name , s -> number );
744751 } else {
745- p = ngx_snprintf (buf , len , "?call=%s&act=%s&domain=%V&app=%V&name=%V" ,
752+ p = ngx_snprintf (buf , len ,
753+ "?call=%s&act=%s&domain=%V&app=%V&name=%V&clientid=%D" ,
746754 ngx_rtmp_oclp_app_type [nctx -> type ],
747- ngx_rtmp_oclp_stage [stage ], & s -> domain , & s -> app , & s -> name );
755+ ngx_rtmp_oclp_stage [stage ],
756+ & s -> domain , & s -> app , & s -> name , s -> number );
748757 }
749758 len -= p - buf ;
750759 buf = p ;
0 commit comments