winlin

remove the on_reload_vhost_http_remux_updated for vhost added.

@@ -852,18 +852,6 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root) @@ -852,18 +852,6 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
852 } 852 }
853 } 853 }
854 854
855 - // TODO: reload new http_remux in on_vhost_add  
856 - // http_remux, only one per vhost.  
857 - if (get_vhost_http_remux_enabled(vhost)) {  
858 - for (it = subscribes.begin(); it != subscribes.end(); ++it) {  
859 - ISrsReloadHandler* subscribe = *it;  
860 - if ((ret = subscribe->on_reload_vhost_http_remux_updated(vhost)) != ERROR_SUCCESS) {  
861 - srs_error("vhost %s notify subscribes http_remux failed. ret=%d", vhost.c_str(), ret);  
862 - return ret;  
863 - }  
864 - }  
865 - srs_trace("vhost %s reload http_remux success.", vhost.c_str());  
866 - }  
867 srs_trace("reload new vhost %s success.", vhost.c_str()); 855 srs_trace("reload new vhost %s success.", vhost.c_str());
868 continue; 856 continue;
869 } 857 }
@@ -863,6 +863,17 @@ void SrsHttpStreamServer::http_unmount(SrsSource* s, SrsRequest* r) @@ -863,6 +863,17 @@ void SrsHttpStreamServer::http_unmount(SrsSource* s, SrsRequest* r)
863 entry->stream->entry->enabled = false; 863 entry->stream->entry->enabled = false;
864 } 864 }
865 865
  866 +int SrsHttpStreamServer::on_reload_vhost_added(string vhost)
  867 +{
  868 + int ret = ERROR_SUCCESS;
  869 +
  870 + if ((ret = on_reload_vhost_http_remux_updated(vhost)) != ERROR_SUCCESS) {
  871 + return ret;
  872 + }
  873 +
  874 + return ret;
  875 +}
  876 +
866 int SrsHttpStreamServer::on_reload_vhost_http_remux_updated(string vhost) 877 int SrsHttpStreamServer::on_reload_vhost_http_remux_updated(string vhost)
867 { 878 {
868 int ret = ERROR_SUCCESS; 879 int ret = ERROR_SUCCESS;