You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2018/06/29 21:52:42 UTC
[trafficserver] branch master updated: fix coredump for ts.fetch
This is an automated email from the ASF dual-hosted git repository.
kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 3074778 fix coredump for ts.fetch
3074778 is described below
commit 3074778a14c0c19bc0453f844898a75205ac717e
Author: sdavu <sd...@delightedinvited.corp.ne1.yahoo.com>
AuthorDate: Wed Jun 27 21:27:25 2018 +0000
fix coredump for ts.fetch
---
plugins/lua/ts_lua_fetch.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/plugins/lua/ts_lua_fetch.c b/plugins/lua/ts_lua_fetch.c
index 337a451..f60f759 100644
--- a/plugins/lua/ts_lua_fetch.c
+++ b/plugins/lua/ts_lua_fetch.c
@@ -419,8 +419,9 @@ ts_lua_fetch_handler(TSCont contp, TSEvent ev, void *edata ATS_UNUSED)
break;
}
- if (fi->over || fi->failed) {
+ if (fmi && (fi->over || fi->failed)) {
TSContCall(fmi->contp, TS_LUA_EVENT_FETCH_OVER, fi); // error exist
+ ts_lua_destroy_fetch_multi_info(fmi);
}
return 0;
@@ -519,7 +520,7 @@ ts_lua_fetch_multi_handler(TSCont contp, TSEvent event ATS_UNUSED, void *edata)
fmi->done++;
- if (fmi->done != fmi->total) {
+ if (fi->fmi != fmi && fmi->done != fmi->total) {
return 0;
}
@@ -541,8 +542,6 @@ ts_lua_fetch_multi_handler(TSCont contp, TSEvent event ATS_UNUSED, void *edata)
TSContCall(ci->contp, TS_LUA_EVENT_COROUTINE_CONT, (void *)1);
}
- ts_lua_fetch_multi_cleanup(ai);
-
TSMutexUnlock(lmutex);
return 0;
}
@@ -591,12 +590,12 @@ ts_lua_fetch_multi_cleanup(ts_lua_async_item *ai)
if (ai->data) {
fmi = (ts_lua_fetch_multi_info *)ai->data;
- ts_lua_destroy_fetch_multi_info(fmi);
ai->data = NULL;
+ TSContDestroy(ai->contp);
+ ai->contp = NULL;
}
- TSContDestroy(ai->contp);
ai->deleted = 1;
return 0;