8 Star 0 Fork 17

src-anolis-os/rsyslog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rsyslog-8.2102.0-rhbz2192955-es-0.patch 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
Zhao Hang 提交于 2023-12-05 16:30 . update to rsyslog-8.2102.0-15.src.rpm
diff -up rsyslog-8.2102.0/plugins/omelasticsearch/omelasticsearch.c.orig rsyslog-8.2102.0/plugins/omelasticsearch/omelasticsearch.c
--- rsyslog-8.2102.0/plugins/omelasticsearch/omelasticsearch.c.orig 2023-05-11 14:14:39.778187570 +0200
+++ rsyslog-8.2102.0/plugins/omelasticsearch/omelasticsearch.c 2023-05-11 14:15:36.254234445 +0200
@@ -232,7 +232,11 @@ static rsRetVal curlSetup(wrkrInstanceDa
BEGINcreateInstance
CODESTARTcreateInstance
pData->fdErrFile = -1;
- pthread_mutex_init(&pData->mutErrFile, NULL);
+ if(pthread_mutex_init(&pData->mutErrFile, NULL) != 0) {
+ LogError(errno, RS_RET_ERR, "omelasticsearch: cannot create "
+ "error file mutex, failing this action");
+ ABORT_FINALIZE(RS_RET_ERR);
+ }
pData->caCertFile = NULL;
pData->myCertFile = NULL;
pData->myPrivKeyFile = NULL;
@@ -240,6 +244,7 @@ CODESTARTcreateInstance
pData->retryRulesetName = NULL;
pData->retryRuleset = NULL;
pData->rebindInterval = DEFAULT_REBIND_INTERVAL;
+finalize_it:
ENDcreateInstance
BEGINcreateWrkrInstance
@@ -2165,10 +2170,12 @@ ENDfreeCnf
BEGINdoHUP
CODESTARTdoHUP
+ pthread_mutex_lock(&pData->mutErrFile);
if(pData->fdErrFile != -1) {
close(pData->fdErrFile);
pData->fdErrFile = -1;
}
+ pthread_mutex_unlock(&pData->mutErrFile);
ENDdoHUP
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/rsyslog.git
[email protected]:src-anolis-os/rsyslog.git
src-anolis-os
rsyslog
rsyslog
a8

搜索帮助