From cb2967c967973a9faf80ca9e5d5d9418ef024367 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 29 Jun 2014 10:32:52 +0800 Subject: [PATCH] refine forward, use utility to generate the tcUrl --- trunk/src/app/srs_app_forward.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/trunk/src/app/srs_app_forward.cpp b/trunk/src/app/srs_app_forward.cpp index fce33a4fa..14c3686af 100644 --- a/trunk/src/app/srs_app_forward.cpp +++ b/trunk/src/app/srs_app_forward.cpp @@ -100,14 +100,7 @@ int SrsForwarder::on_publish(SrsRequest* req, std::string forward_server) port = ::atoi(s_port.c_str()); // generate tcUrl - tc_url = "rtmp://"; - if (vhost == RTMP_VHOST_DEFAULT) { - tc_url += forward_server; - } else { - tc_url += vhost; - } - tc_url += "/"; - tc_url += req->app; + tc_url = srs_generate_tc_url(forward_server, vhost, req->app, s_port); // dead loop check std::string source_ep = "rtmp://";