trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject trafficserver git commit: TS-3984: CID 1328817: Resource leaks (CTOR_DTOR_LEAK) in multiplexer plugin Put back const for the assignment operator
Date Tue, 10 Nov 2015 05:01:59 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 0f8236763 -> 9f4d1d1e3


TS-3984: CID 1328817: Resource leaks (CTOR_DTOR_LEAK) in multiplexer plugin
Put back const for the assignment operator


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

Branch: refs/heads/master
Commit: 9f4d1d1e3d13ae3af59b3fb483a419c3ddb4a56d
Parents: 0f82367
Author: Bryan Call <bcall@apache.org>
Authored: Mon Nov 9 21:01:22 2015 -0800
Committer: Bryan Call <bcall@apache.org>
Committed: Mon Nov 9 21:01:22 2015 -0800

----------------------------------------------------------------------
 plugins/experimental/multiplexer/dispatch.cc | 4 ++--
 plugins/experimental/multiplexer/dispatch.h  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9f4d1d1e/plugins/experimental/multiplexer/dispatch.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/multiplexer/dispatch.cc b/plugins/experimental/multiplexer/dispatch.cc
index 585b2cf..a57256c 100644
--- a/plugins/experimental/multiplexer/dispatch.cc
+++ b/plugins/experimental/multiplexer/dispatch.cc
@@ -55,11 +55,11 @@ Request::Request(const Request &r) : host(r.host), length(r.length),
io(const_ca
   assert(r.io.get() != NULL);
 }
 
-Request &Request::operator=(Request &r)
+Request &Request::operator=(const Request &r)
 {
   host = r.host;
   length = r.length;
-  io = r.io;
+  io = const_cast<Request &>(r).io;
   assert(!host.empty());
   assert(length > 0);
   assert(io.get() != NULL);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9f4d1d1e/plugins/experimental/multiplexer/dispatch.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/multiplexer/dispatch.h b/plugins/experimental/multiplexer/dispatch.h
index 61c79a8..03173a8 100644
--- a/plugins/experimental/multiplexer/dispatch.h
+++ b/plugins/experimental/multiplexer/dispatch.h
@@ -55,7 +55,7 @@ struct Request {
 
   Request(const std::string &, const TSMBuffer, const TSMLoc);
   Request(const Request &);
-  Request &operator=(Request &);
+  Request &operator=(const Request &);
 };
 
 typedef std::vector<Request> Requests;


Mime
View raw message