winlin

fix #79, fix the reload remove edge assert bug. 0.9.189.

... ... @@ -207,6 +207,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.<br/>
## History
* v1.0, 2014-08-03, fix [#79](https://github.com/winlinvip/simple-rtmp-server/issues/79), fix the reload remove edge assert bug. 0.9.189.
* v1.0, 2014-08-03, fix [#57](https://github.com/winlinvip/simple-rtmp-server/issues/57), use lock(acquire/release publish) to avoid duplicated publishing. 0.9.188.
* v1.0, 2014-08-03, fix [#85](https://github.com/winlinvip/simple-rtmp-server/issues/85), fix the segment-dvr sequence header missing. 0.9.187.
* v1.0, 2014-08-03, fix [#145](https://github.com/winlinvip/simple-rtmp-server/issues/145), refine ffmpeg log, check abitrate for libaacplus. 0.9.186.
... ...
... ... @@ -279,7 +279,15 @@ int SrsEdgeIngester::connect_server()
close_underlayer_socket();
SrsConfDirective* conf = _srs_config->get_vhost_edge_origin(_req->vhost);
srs_assert(conf);
// @see https://github.com/winlinvip/simple-rtmp-server/issues/79
// when origin is error, for instance, server is shutdown,
// then user remove the vhost then reload, the conf is empty.
if (!conf) {
ret = ERROR_EDGE_VHOST_REMOVED;
srs_warn("vhost %s removed. ret=%d", _req->vhost.c_str(), ret);
return ret;
}
// select the origin.
std::string server = conf->args.at(origin_index % conf->args.size());
... ...
... ... @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "188"
#define VERSION_REVISION "189"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
... ...
... ... @@ -180,6 +180,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ERROR_KERNEL_FLV_HEADER 3036
#define ERROR_KERNEL_FLV_STREAM_CLOSED 3037
#define ERROR_KERNEL_STREAM_INIT 3038
#define ERROR_EDGE_VHOST_REMOVED 3039
/**
* whether the error code is an system control error.
... ...