trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wei...@apache.org
Subject trafficserver git commit: TS-3655 fix the bug that forget close the netvc in regression test
Date Tue, 02 Jun 2015 08:09:56 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master b2651964f -> 36630960c


TS-3655 fix the bug that forget close the netvc in regression test


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/36630960
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/36630960
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/36630960

Branch: refs/heads/master
Commit: 36630960ccb15d7d8363d4fcf32a56d65851d55b
Parents: b265196
Author: weijin <weijin@apache.org>
Authored: Tue Jun 2 16:04:51 2015 +0800
Committer: 魏晋 <weijin@letv.com>
Committed: Tue Jun 2 16:08:01 2015 +0800

----------------------------------------------------------------------
 CHANGES             | 2 ++
 proxy/InkAPITest.cc | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/36630960/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2a44ed9..cf40563 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 6.0.0
 
+  *) [TS-3655] Forget to close netvc in regression test.
+
   *) [TS-3632] Add OPENSSL_INCLUDE and OPENSSL_LIBS in Makefile.am.
 
   *) [TS-3653] Add the ability to exclude by regex to url_sig plugin.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/36630960/proxy/InkAPITest.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index 468df97..c8c4a96 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -249,7 +249,7 @@ REGRESSION_TEST(SDK_API_TSConfig)(RegressionTest *test, int /* atype ATS_UNUSED
 //////////////////////////////////////////////
 
 struct SDK_NetVConn_Params {
-  SDK_NetVConn_Params(const char *_a, RegressionTest *_t, int *_p) : buffer(NULL), api(_a),
port(0), test(_t), pstatus(_p)
+  SDK_NetVConn_Params(const char *_a, RegressionTest *_t, int *_p) : buffer(NULL), api(_a),
port(0), test(_t), pstatus(_p), vc(NULL)
   {
     this->status.client = this->status.server = REGRESSION_TEST_INPROGRESS;
   }
@@ -259,6 +259,9 @@ struct SDK_NetVConn_Params {
     if (this->buffer) {
       TSIOBufferDestroy(this->buffer);
     }
+    if (this->vc) {
+      TSVConnClose(this->vc);
+    }
   }
 
   TSIOBuffer buffer;
@@ -266,6 +269,7 @@ struct SDK_NetVConn_Params {
   unsigned short port;
   RegressionTest *test;
   int *pstatus;
+  TSVConn vc;
   struct {
     int client;
     int server;
@@ -281,6 +285,7 @@ server_handler(TSCont contp, TSEvent event, void *data)
     // Kick off a read so that we can receive an EOS event.
     SDK_RPRINT(params->test, params->api, "ServerEvent NET_ACCEPT", TC_PASS, "ok");
     params->buffer = TSIOBufferCreate();
+    params->vc = (TSVConn)data;
     TSVConnRead((TSVConn)data, contp, params->buffer, 100);
   } else if (event == TS_EVENT_VCONN_EOS) {
     // The server end of the test passes if it receives an EOF event. This means that it
must have


Mime
View raw message