fix #138, fix http hooks bug, regression bug. 0.9.184.

pull/133/head
winlin 11 years ago
parent 721acc350a
commit 84450e1588

@ -207,6 +207,7 @@ Supported operating systems and hardware:
* 2013-10-17, Created.<br/>
## History
* v1.0, 2014-08-02, fix [#138](https://github.com/winlinvip/simple-rtmp-server/issues/138), fix http hooks bug, regression bug. 0.9.184.
* v1.0, 2014-08-02, fix [#142](https://github.com/winlinvip/simple-rtmp-server/issues/142), fix tcp stat slow bug, use /proc/net/sockstat instead, refer to 'ss -s'. 0.9.183.
* v1.0, 2014-07-31, fix [#141](https://github.com/winlinvip/simple-rtmp-server/issues/141), support tun0(vpn network device) ip retrieve. 0.9.179.
* v1.0, 2014-07-27, support build on OSX(Darwin). 0.9.177

@ -14,6 +14,5 @@ vhost __defaultVhost__ {
on_unpublish http://127.0.0.1:8085/api/v1/streams http://localhost:8085/api/v1/streams;
on_play http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
on_stop http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
on_dvr_hss_reap_flv http://127.0.0.1:8085/api/v1/dvrs http://localhost:8085/api/v1/dvrs;
}
}

@ -984,7 +984,7 @@ int SrsRtmpConn::http_hooks_on_connect()
int ret = ERROR_SUCCESS;
#ifdef SRS_AUTO_HTTP_CALLBACK
if (!_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
if (_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
// HTTP: on_connect
SrsConfDirective* on_connect = _srs_config->get_vhost_on_connect(req->vhost);
if (!on_connect) {
@ -1009,7 +1009,7 @@ int SrsRtmpConn::http_hooks_on_connect()
void SrsRtmpConn::http_hooks_on_close()
{
#ifdef SRS_AUTO_HTTP_CALLBACK
if (!_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
if (_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
// whatever the ret code, notify the api hooks.
// HTTP: on_close
SrsConfDirective* on_close = _srs_config->get_vhost_on_close(req->vhost);
@ -1032,7 +1032,7 @@ int SrsRtmpConn::http_hooks_on_publish()
int ret = ERROR_SUCCESS;
#ifdef SRS_AUTO_HTTP_CALLBACK
if (!_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
if (_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
// HTTP: on_publish
SrsConfDirective* on_publish = _srs_config->get_vhost_on_publish(req->vhost);
if (!on_publish) {
@ -1057,7 +1057,7 @@ int SrsRtmpConn::http_hooks_on_publish()
void SrsRtmpConn::http_hooks_on_unpublish()
{
#ifdef SRS_AUTO_HTTP_CALLBACK
if (!_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
if (_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
// whatever the ret code, notify the api hooks.
// HTTP: on_unpublish
SrsConfDirective* on_unpublish = _srs_config->get_vhost_on_unpublish(req->vhost);
@ -1080,7 +1080,7 @@ int SrsRtmpConn::http_hooks_on_play()
int ret = ERROR_SUCCESS;
#ifdef SRS_AUTO_HTTP_CALLBACK
if (!_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
if (_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
// HTTP: on_play
SrsConfDirective* on_play = _srs_config->get_vhost_on_play(req->vhost);
if (!on_play) {
@ -1105,7 +1105,7 @@ int SrsRtmpConn::http_hooks_on_play()
void SrsRtmpConn::http_hooks_on_stop()
{
#ifdef SRS_AUTO_HTTP_CALLBACK
if (!_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
if (_srs_config->get_vhost_http_hooks_enabled(req->vhost)) {
// whatever the ret code, notify the api hooks.
// HTTP: on_stop
SrsConfDirective* on_stop = _srs_config->get_vhost_on_stop(req->vhost);

@ -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 "183"
#define VERSION_REVISION "184"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"

Loading…
Cancel
Save