Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8fa7038e
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8fa7038e
编写于
12月 08, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TBASE-1297]
上级
a20f3ef1
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
src/modules/http/src/httpServer.c
src/modules/http/src/httpServer.c
+3
-3
src/modules/http/src/tgHandle.c
src/modules/http/src/tgHandle.c
+2
-2
未找到文件。
src/modules/http/src/httpServer.c
浏览文件 @
8fa7038e
...
@@ -106,7 +106,7 @@ void httpCleanUpContextTimer(HttpContext *pContext) {
...
@@ -106,7 +106,7 @@ void httpCleanUpContextTimer(HttpContext *pContext) {
}
}
}
}
void
httpCleanUpContext
(
HttpContext
*
pContext
)
{
void
httpCleanUpContext
(
HttpContext
*
pContext
,
void
*
unused
)
{
httpTrace
(
"context:%p, start the clean up operation, sig:%p"
,
pContext
,
pContext
->
signature
);
httpTrace
(
"context:%p, start the clean up operation, sig:%p"
,
pContext
,
pContext
->
signature
);
void
*
sig
=
atomic_val_compare_exchange_ptr
(
&
pContext
->
signature
,
pContext
,
0
);
void
*
sig
=
atomic_val_compare_exchange_ptr
(
&
pContext
->
signature
,
pContext
,
0
);
if
(
sig
==
NULL
)
{
if
(
sig
==
NULL
)
{
...
@@ -184,7 +184,7 @@ bool httpInitContext(HttpContext *pContext) {
...
@@ -184,7 +184,7 @@ bool httpInitContext(HttpContext *pContext) {
void
httpCloseContext
(
HttpThread
*
pThread
,
HttpContext
*
pContext
)
{
void
httpCloseContext
(
HttpThread
*
pThread
,
HttpContext
*
pContext
)
{
taosTmrReset
(
httpCleanUpContext
,
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
,
pThread
->
pServer
->
timerHandle
,
&
pContext
->
timer
);
taosTmrReset
(
(
TAOS_TMR_CALLBACK
)
httpCleanUpContext
,
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
,
pThread
->
pServer
->
timerHandle
,
&
pContext
->
timer
);
httpTrace
(
"context:%p, fd:%d, ip:%s, state:%s will be closed after:%d ms, timer:%p"
,
httpTrace
(
"context:%p, fd:%d, ip:%s, state:%s will be closed after:%d ms, timer:%p"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
httpContextStateStr
(
pContext
->
state
),
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
->
timer
);
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
httpContextStateStr
(
pContext
->
state
),
HTTP_DELAY_CLOSE_TIME_MS
,
pContext
->
timer
);
}
}
...
@@ -273,7 +273,7 @@ void httpCleanUpConnect(HttpServer *pServer) {
...
@@ -273,7 +273,7 @@ void httpCleanUpConnect(HttpServer *pServer) {
taosCloseSocket
(
pThread
->
pollFd
);
taosCloseSocket
(
pThread
->
pollFd
);
while
(
pThread
->
pHead
)
{
while
(
pThread
->
pHead
)
{
httpCleanUpContext
(
pThread
->
pHead
);
httpCleanUpContext
(
pThread
->
pHead
,
0
);
}
}
pthread_cancel
(
pThread
->
thread
);
pthread_cancel
(
pThread
->
thread
);
...
...
src/modules/http/src/tgHandle.c
浏览文件 @
8fa7038e
...
@@ -215,7 +215,7 @@ ParseEnd:
...
@@ -215,7 +215,7 @@ ParseEnd:
}
}
}
}
int
tgParseSchema
(
char
*
content
,
char
*
fileName
)
{
int
tgParseSchema
(
c
onst
c
har
*
content
,
char
*
fileName
)
{
cJSON
*
root
=
cJSON_Parse
(
content
);
cJSON
*
root
=
cJSON_Parse
(
content
);
if
(
root
==
NULL
)
{
if
(
root
==
NULL
)
{
httpError
(
"failed to parse telegraf schema file:%s, invalid json format, content:%s"
,
fileName
,
content
);
httpError
(
"failed to parse telegraf schema file:%s, invalid json format, content:%s"
,
fileName
,
content
);
...
@@ -248,7 +248,7 @@ int tgParseSchema(char *content, char*fileName) {
...
@@ -248,7 +248,7 @@ int tgParseSchema(char *content, char*fileName) {
return
size
;
return
size
;
}
}
int
tgReadSchema
(
c
onst
c
har
*
fileName
)
{
int
tgReadSchema
(
char
*
fileName
)
{
FILE
*
fp
=
fopen
(
fileName
,
"r"
);
FILE
*
fp
=
fopen
(
fileName
,
"r"
);
if
(
fp
==
NULL
)
{
if
(
fp
==
NULL
)
{
return
-
1
;
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录