@@ -172,7 +172,7 @@ srs_error_t SrsRtmpConn::do_cycle()
172
172
173
173
rtmp->set_recv_timeout (SRS_CONSTS_RTMP_TMMS);
174
174
rtmp->set_send_timeout (SRS_CONSTS_RTMP_TMMS);
175
-
175
+
176
176
if ((err = rtmp->handshake ()) != srs_success) {
177
177
return srs_error_wrap (err, " rtmp handshake" );
178
178
}
@@ -472,28 +472,28 @@ srs_error_t SrsRtmpConn::stream_service_cycle()
472
472
req->strip ();
473
473
srs_trace (" client identified, type=%s, vhost=%s, app=%s, stream_name=%s, duration=%.2f" ,
474
474
srs_client_type_string (info->type ).c_str (), req->vhost .c_str (), req->app .c_str (), req->stream .c_str (), req->duration );
475
-
475
+
476
476
// discovery vhost, resolve the vhost from config
477
477
SrsConfDirective* parsed_vhost = _srs_config->get_vhost (req->vhost );
478
478
if (parsed_vhost) {
479
479
req->vhost = parsed_vhost->arg0 ();
480
480
}
481
-
481
+
482
482
if (req->schema .empty () || req->vhost .empty () || req->port == 0 || req->app .empty ()) {
483
483
return srs_error_new (ERROR_RTMP_REQ_TCURL, " discovery tcUrl failed, tcUrl=%s, schema=%s, vhost=%s, port=%d, app=%s" ,
484
484
req->tcUrl .c_str (), req->schema .c_str (), req->vhost .c_str (), req->port , req->app .c_str ());
485
485
}
486
-
486
+
487
487
// check vhost, allow default vhost.
488
488
if ((err = check_vhost (true )) != srs_success) {
489
489
return srs_error_wrap (err, " check vhost" );
490
490
}
491
-
491
+
492
492
srs_trace (" connected stream, tcUrl=%s, pageUrl=%s, swfUrl=%s, schema=%s, vhost=%s, port=%d, app=%s, stream=%s, args=%s" ,
493
493
req->tcUrl .c_str (), req->pageUrl .c_str (), req->swfUrl .c_str (),
494
494
req->schema .c_str (), req->vhost .c_str (), req->port ,
495
495
req->app .c_str (), req->stream .c_str (), (req->args ? " (obj)" :" null" ));
496
-
496
+
497
497
// do token traverse before serve it.
498
498
// @see https://github.com/ossrs/srs/pull/239
499
499
if (true ) {
@@ -505,7 +505,7 @@ srs_error_t SrsRtmpConn::stream_service_cycle()
505
505
}
506
506
}
507
507
}
508
-
508
+
509
509
// security check
510
510
if ((err = security->check (info->type , ip, req)) != srs_success) {
511
511
return srs_error_wrap (err, " rtmp: security check" );
0 commit comments