mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Merge branch '4.0release' into merge/develop
This commit is contained in:
commit
98cd8145cc
5 changed files with 44 additions and 13 deletions
10
AUTHORS.txt
10
AUTHORS.txt
|
@ -1,5 +1,6 @@
|
||||||
CONTRIBUTORS ordered by first contribution.
|
CONTRIBUTORS ordered by first contribution.
|
||||||
* winlin<winlin@vip.126.com>
|
* winlin<winlin@vip.126.com>
|
||||||
|
* chengli.ycl<chengli.ycl@alibaba-inc.com>
|
||||||
* wenjie.zhao<740936897@qq.com>
|
* wenjie.zhao<740936897@qq.com>
|
||||||
* xiangcheng.liu<liuxc0116@foxmail.com>
|
* xiangcheng.liu<liuxc0116@foxmail.com>
|
||||||
* naijia.liu<youngcow@youngcow.net>
|
* naijia.liu<youngcow@youngcow.net>
|
||||||
|
@ -58,13 +59,16 @@ CONTRIBUTORS ordered by first contribution.
|
||||||
* XiaLixin<xialx@yuntongxun.com>
|
* XiaLixin<xialx@yuntongxun.com>
|
||||||
* xiaozhihong<xiaozhihong8@gmail.com>
|
* xiaozhihong<xiaozhihong8@gmail.com>
|
||||||
* HuyaJohn<xiaozhihong@huya.com>
|
* HuyaJohn<xiaozhihong@huya.com>
|
||||||
|
* xiaozhihong<hondaxiao@tencent.com>
|
||||||
* yanghuiwen<cainiaodj@qq.com>
|
* yanghuiwen<cainiaodj@qq.com>
|
||||||
* Bepartofyou<309554135@qq.com>
|
* Bepartofyou<309554135@qq.com>
|
||||||
|
* pengqiang.wpq<pengqiang.wpq@alibaba-inc.com>
|
||||||
* l<22312935+lam2003@users.noreply.github.com>
|
* l<22312935+lam2003@users.noreply.github.com>
|
||||||
* xfalcon<x-falcon@users.noreply.github.com>
|
* xfalcon<x-falcon@users.noreply.github.com>
|
||||||
* cgh<jinxue.cgh@alibaba-inc.com>
|
* chengh_math<chengh_math@126.com>
|
||||||
* LiPeng<mozhan.lp@alibaba-inc.com>
|
* jinxue.cgh<jinxue.cgh@alibaba-inc.com>
|
||||||
* xiaozhihong<hondaxiao@tencent.com>
|
* lipeng19811218<lipeng19811218@gmail.com>
|
||||||
|
* mozhan.lp<mozhan.lp@alibaba-inc.com>
|
||||||
* yajun18<yajun18@staff.sina.com.cn>
|
* yajun18<yajun18@staff.sina.com.cn>
|
||||||
* liulichuan<liulichuan@kuaishou.com>
|
* liulichuan<liulichuan@kuaishou.com>
|
||||||
* yapingcat<caoyapingneu@163.com>
|
* yapingcat<caoyapingneu@163.com>
|
||||||
|
|
|
@ -33,7 +33,7 @@ ff_log_level info;
|
||||||
# if console, print log to console.
|
# if console, print log to console.
|
||||||
# if file, write log to file. requires srs_log_file if log to file.
|
# if file, write log to file. requires srs_log_file if log to file.
|
||||||
# default: file.
|
# default: file.
|
||||||
srs_log_tank file;
|
srs_log_tank console;
|
||||||
# the log level, for all log tanks.
|
# the log level, for all log tanks.
|
||||||
# can be: verbose, info, trace, warn, error
|
# can be: verbose, info, trace, warn, error
|
||||||
# default: trace
|
# default: trace
|
||||||
|
@ -48,7 +48,7 @@ max_connections 1000;
|
||||||
# whether start as daemon
|
# whether start as daemon
|
||||||
# @remark: do not support reload.
|
# @remark: do not support reload.
|
||||||
# default: on
|
# default: on
|
||||||
daemon on;
|
daemon off;
|
||||||
# whether use utc_time to generate the time struct,
|
# whether use utc_time to generate the time struct,
|
||||||
# if off, use localtime() to generate it,
|
# if off, use localtime() to generate it,
|
||||||
# if on, use gmtime() instead, which use UTC time.
|
# if on, use gmtime() instead, which use UTC time.
|
||||||
|
@ -2228,3 +2228,11 @@ vhost b.origin.cluster.srs.com {
|
||||||
coworkers 127.0.0.1:9090;
|
coworkers 127.0.0.1:9090;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#############################################################################################
|
||||||
|
# To prevent user to use full.conf
|
||||||
|
#############################################################################################
|
||||||
|
# To identify the full.conf
|
||||||
|
# @remark Should never use it directly, it's only a collections of all config items.
|
||||||
|
# Default: off
|
||||||
|
is_full on;
|
||||||
|
|
|
@ -7,14 +7,11 @@ authors=`git log --format='%ae'|grep -v localhost|grep -v demo|grep -v none|sort
|
||||||
if [[ $? -ne 0 ]]; then echo "no authors"; exit -1; fi
|
if [[ $? -ne 0 ]]; then echo "no authors"; exit -1; fi
|
||||||
|
|
||||||
for author in $authors; do
|
for author in $authors; do
|
||||||
echo $author| grep 'winlin' >/dev/null 2>&1 && continue;
|
echo $author| grep -e "winlin" -e 'winterserver' \
|
||||||
echo $author| grep 'winterserver' >/dev/null 2>&1 && continue;
|
-e 'zhaowenjie' >/dev/null 2>&1 && continue;
|
||||||
echo $author| grep 'chengli.ycl' >/dev/null 2>&1 && continue;
|
|
||||||
echo $author| grep 'wenjie.zhao' >/dev/null 2>&1 && continue;
|
|
||||||
echo $author| grep 'zhaowenjie' >/dev/null 2>&1 && continue;
|
|
||||||
echo $author| grep 'pengqiang.wpq' >/dev/null 2>&1 && continue;
|
|
||||||
|
|
||||||
grep $author $AFILE 1>/dev/null 2>/dev/null && continue;
|
username=$(echo $author |awk -F '@' '{print $1}')
|
||||||
|
grep $username $AFILE 1>/dev/null 2>/dev/null && continue;
|
||||||
|
|
||||||
git log -1 --author="$author" --format='%an<%ae>'| sed 's/ //g'
|
git log -1 --author="$author" --format='%an<%ae>'| sed 's/ //g'
|
||||||
done
|
done
|
||||||
|
|
|
@ -3593,6 +3593,12 @@ srs_error_t SrsConfig::check_config()
|
||||||
if ((err = check_number_connections()) != srs_success) {
|
if ((err = check_number_connections()) != srs_success) {
|
||||||
return srs_error_wrap(err, "check connections");
|
return srs_error_wrap(err, "check connections");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If use the full.conf, fail.
|
||||||
|
if (is_full_config()) {
|
||||||
|
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID,
|
||||||
|
"never use full.conf(%s)", config_file.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -3625,7 +3631,7 @@ srs_error_t SrsConfig::check_normal_config()
|
||||||
&& n != "ff_log_level" && n != "grace_final_wait" && n != "force_grace_quit"
|
&& n != "ff_log_level" && n != "grace_final_wait" && n != "force_grace_quit"
|
||||||
&& n != "grace_start_wait" && n != "empty_ip_ok" && n != "disable_daemon_for_docker"
|
&& n != "grace_start_wait" && n != "empty_ip_ok" && n != "disable_daemon_for_docker"
|
||||||
&& n != "inotify_auto_reload" && n != "auto_reload_for_docker" && n != "tcmalloc_release_rate"
|
&& n != "inotify_auto_reload" && n != "auto_reload_for_docker" && n != "tcmalloc_release_rate"
|
||||||
&& n != "circuit_breaker"
|
&& n != "circuit_breaker" && n != "is_full"
|
||||||
) {
|
) {
|
||||||
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal directive %s", n.c_str());
|
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal directive %s", n.c_str());
|
||||||
}
|
}
|
||||||
|
@ -4146,6 +4152,18 @@ bool SrsConfig::get_daemon()
|
||||||
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SrsConfig::is_full_config()
|
||||||
|
{
|
||||||
|
static bool DEFAULT = false;
|
||||||
|
|
||||||
|
SrsConfDirective* conf = root->get("is_full");
|
||||||
|
if (!conf) {
|
||||||
|
return DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SRS_CONF_PERFER_FALSE(conf->arg0());
|
||||||
|
}
|
||||||
|
|
||||||
SrsConfDirective* SrsConfig::get_root()
|
SrsConfDirective* SrsConfig::get_root()
|
||||||
{
|
{
|
||||||
return root;
|
return root;
|
||||||
|
|
|
@ -442,6 +442,10 @@ public:
|
||||||
// If true, SRS will run in daemon mode, fork and fork to reap the
|
// If true, SRS will run in daemon mode, fork and fork to reap the
|
||||||
// grand-child process to init process.
|
// grand-child process to init process.
|
||||||
virtual bool get_daemon();
|
virtual bool get_daemon();
|
||||||
|
private:
|
||||||
|
// Whether user use full.conf
|
||||||
|
virtual bool is_full_config();
|
||||||
|
public:
|
||||||
// Get the max connections limit of system.
|
// Get the max connections limit of system.
|
||||||
// If exceed the max connection, SRS will disconnect the connection.
|
// If exceed the max connection, SRS will disconnect the connection.
|
||||||
// @remark, linux will limit the connections of each process,
|
// @remark, linux will limit the connections of each process,
|
||||||
|
|
Loading…
Reference in a new issue