From 84450e1588be3465c5dca6f774589f150b441e66 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 2 Aug 2014 19:24:49 +0800 Subject: [PATCH] fix #138, fix http hooks bug, regression bug. 0.9.184. --- README.md | 1 + trunk/conf/http.hooks.callback.conf | 1 - trunk/src/app/srs_app_rtmp_conn.cpp | 12 ++++++------ trunk/src/core/srs_core.hpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 57c66a2f0..2489035cc 100755 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## 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 diff --git a/trunk/conf/http.hooks.callback.conf b/trunk/conf/http.hooks.callback.conf index 6e4838aa9..06d636569 100644 --- a/trunk/conf/http.hooks.callback.conf +++ b/trunk/conf/http.hooks.callback.conf @@ -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; } } diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index 3c7cb3981..d459de8e1 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -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); diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 56bea7ab8..8740eb8d7 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -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"