1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

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

This commit is contained in:
winlin 2014-08-02 19:24:49 +08:00
parent 721acc350a
commit 84450e1588
4 changed files with 8 additions and 8 deletions

View file

@ -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);