Skip to content

Commit 198c2f8

Browse files
committed
Merge pull request apache#39 from Edge/es_5.3.x_rollback
Es 5.3.x rollback
2 parents 7754710 + b81c1c2 commit 198c2f8

5 files changed

Lines changed: 7 additions & 62 deletions

File tree

proxy/FetchSM.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ FetchSM::httpConnect()
6565

6666
Debug(DEBUG_TAG, "[%s] calling httpconnect write", __FUNCTION__);
6767
http_vc = reinterpret_cast<PluginVC *>(TSHttpConnectWithPluginId(&_addr.sa, tag, id));
68-
http_vc->setOwnerCont(contp);
6968

7069
/*
7170
* TS-2906: We need a way to unset internal request when using FetchSM, the use case for this
@@ -428,8 +427,8 @@ FetchSM::process_fetch_read(int event)
428427
Debug(DEBUG_TAG, "[%s] I am here read", __FUNCTION__);
429428
int64_t bytes;
430429
int bytes_used;
431-
int64_t total_bytes_copied = 0;
432-
430+
int64_t total_bytes_copied = 0;
431+
433432
switch (event) {
434433
case TS_EVENT_VCONN_READ_READY:
435434
// duplicate the bytes for backward compatibility with TSFetchUrl()
@@ -489,7 +488,6 @@ void
489488
FetchSM::process_fetch_write(int event)
490489
{
491490
Debug(DEBUG_TAG, "[%s] calling process write", __FUNCTION__);
492-
493491
switch (event) {
494492
case TS_EVENT_VCONN_WRITE_COMPLETE:
495493
req_finished = true;

proxy/PluginVC.cc

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
#include "P_EventSystem.h"
7676
#include "P_Net.h"
7777
#include "Regression.h"
78-
#include "HttpClientSession.h"
7978

8079
#define PVC_LOCK_RETRY_TIME HRTIME_MSECONDS(10)
8180
#define PVC_DEFAULT_MAX_BYTES 32768
@@ -87,8 +86,8 @@
8786
#define PVC_TYPE ((vc_type == PLUGIN_VC_ACTIVE) ? "Active" : "Passive")
8887

8988
PluginVC::PluginVC(PluginVCCore *core_obj)
90-
: NetVConnection(), magic(PLUGIN_VC_MAGIC_ALIVE), vc_type(PLUGIN_VC_UNKNOWN), core_obj(core_obj), other_side(NULL),
91-
owner_cont(NULL), read_state(), write_state(), need_read_process(false), need_write_process(false), closed(false), sm_lock_retry_event(NULL),
89+
: NetVConnection(), magic(PLUGIN_VC_MAGIC_ALIVE), vc_type(PLUGIN_VC_UNKNOWN), core_obj(core_obj), other_side(NULL), read_state(),
90+
write_state(), need_read_process(false), need_write_process(false), closed(false), sm_lock_retry_event(NULL),
9291
core_lock_retry_event(NULL), deletable(false), reentrancy_count(0), active_timeout(0), active_event(NULL), inactive_timeout(0),
9392
inactive_timeout_at(0), inactive_event(NULL), plugin_tag(NULL), plugin_id(0)
9493
{
@@ -248,18 +247,6 @@ PluginVC::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
248247
read_state.vio.op = VIO::READ;
249248

250249
Debug("pvc", "[%u] %s: do_io_read for %" PRId64 " bytes", core_obj->id, PVC_TYPE, nbytes);
251-
252-
HttpClientSession *client_session = NULL;
253-
Continuation *cont = NULL;
254-
if ((cont = read_state.vio._cont)) {
255-
client_session = dynamic_cast<HttpClientSession *>(cont);
256-
}
257-
// added to give the child HttpClientSession access to its SpdyClientSession parent for logging purposes
258-
// kind of hacky, not my favorite impl
259-
if (client_session && core_obj && core_obj->active_vc.owner_cont) {
260-
client_session->set_parent_cont(core_obj->active_vc.owner_cont);
261-
Debug("pvc", "[%u] %s: Setting HttpClientSession parent cont=%p", core_obj->id, PVC_TYPE, core_obj->active_vc.owner_cont);
262-
}
263250

264251
// Since reentrant callbacks are not allowed on from do_io
265252
// functions schedule ourselves get on a different stack

proxy/PluginVC.h

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,7 @@ class PluginVC : public NetVConnection, public PluginIdentity
113113
{
114114
return other_side;
115115
}
116-
117-
virtual PluginVCState *
118-
get_read_state()
119-
{
120-
return &read_state;
121-
}
122-
123-
virtual PluginVCState *
124-
get_write_state()
125-
{
126-
return &write_state;
127-
}
128-
129-
virtual PluginVCCore *
130-
get_core_obj()
131-
{
132-
return core_obj;
133-
}
116+
134117
//@{ @name Plugin identity.
135118
/// Override for @c PluginIdentity.
136119
virtual char const *
@@ -158,12 +141,6 @@ class PluginVC : public NetVConnection, public PluginIdentity
158141
plugin_id = id;
159142
}
160143
//@}
161-
/// Setter for PluginVC owner continuation
162-
virtual void
163-
setOwnerCont(Continuation *c)
164-
{
165-
owner_cont = c;
166-
}
167144

168145
int main_handler(int event, void *data);
169146

@@ -183,7 +160,6 @@ class PluginVC : public NetVConnection, public PluginIdentity
183160
PluginVCCore *core_obj;
184161

185162
PluginVC *other_side;
186-
Continuation *owner_cont;
187163

188164
PluginVCState read_state;
189165
PluginVCState write_state;

proxy/ProxyClientSession.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "libts.h"
2828
#include "P_Net.h"
2929
#include "InkAPIInternal.h"
30-
#include "I_Continuation.h"
3130

3231
// Emit a debug message conditional on whether this particular client session
3332
// has debugging enabled. This should only be called from within a client session
@@ -95,19 +94,6 @@ class ProxyClientSession : public VConnection
9594
return this->api_hooks.has_hooks() || http_global_hooks->has_hooks();
9695
}
9796

98-
// pointer to parent session. as cont for now
99-
Continuation *
100-
get_parent_cont()
101-
{
102-
return parent_cont;
103-
}
104-
105-
void
106-
set_parent_cont(Continuation *c)
107-
{
108-
parent_cont = c;
109-
}
110-
11197
// Initiate an API hook invocation.
11298
void do_api_callout(TSHttpHookID id);
11399

@@ -129,8 +115,6 @@ class ProxyClientSession : public VConnection
129115
APIHook *api_current;
130116
HttpAPIHooks api_hooks;
131117
void *user_args[HTTP_SSN_TXN_MAX_USER_ARG];
132-
// TODO continuation for now pending susan's change making SpdyClientSession a child of ProxyClientSession
133-
Continuation *parent_cont;
134118

135119
ProxyClientSession(ProxyClientSession &); // noncopyable
136120
ProxyClientSession &operator=(const ProxyClientSession &); // noncopyable

proxy/http/HttpSessionAccept.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
limitations under the License.
2222
*/
2323

24-
#ifndef _HTTP_SESSION_ACCEPT_H_
25-
#define _HTTP_SESSION_ACCEPT_H_
24+
#if !defined(_HttpSessionAccept_h_)
25+
#define _HttpSessionAccept_h_
2626

2727
#include "libts.h"
2828
#include "records/I_RecHttp.h"

0 commit comments

Comments
 (0)