You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/04/17 18:44:33 UTC
[34/50] git commit: patch for TS-2719 - atscppapi: Check for error
state in intercept
patch for TS-2719 - atscppapi: Check for error state in intercept
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/32ea4b15
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/32ea4b15
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/32ea4b15
Branch: refs/heads/5.0.x
Commit: 32ea4b1529e7e4664932c0e61304375e9519a40d
Parents: ec24119
Author: Manjesh Nilange <ma...@yahoo.com>
Authored: Tue Apr 15 10:59:13 2014 -0700
Committer: Manjesh Nilange <ma...@yahoo.com>
Committed: Tue Apr 15 10:59:13 2014 -0700
----------------------------------------------------------------------
lib/atscppapi/src/InterceptPlugin.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/32ea4b15/lib/atscppapi/src/InterceptPlugin.cc
----------------------------------------------------------------------
diff --git a/lib/atscppapi/src/InterceptPlugin.cc b/lib/atscppapi/src/InterceptPlugin.cc
index b9aaa7c..cac8f0b 100644
--- a/lib/atscppapi/src/InterceptPlugin.cc
+++ b/lib/atscppapi/src/InterceptPlugin.cc
@@ -161,8 +161,8 @@ InterceptPlugin::~InterceptPlugin() {
bool InterceptPlugin::produce(const void *data, int data_size) {
ScopedSharedMutexLock scopedLock(getMutex());
- if (!state_->net_vc_) {
- LOG_ERROR("Intercept not operational yet");
+ if (!state_->net_vc_ || state_->shut_down_) {
+ LOG_ERROR("Intercept not operational");
return false;
}
if (!state_->output_.buffer_) {
@@ -184,8 +184,8 @@ bool InterceptPlugin::produce(const void *data, int data_size) {
bool InterceptPlugin::setOutputComplete() {
ScopedSharedMutexLock scopedLock(getMutex());
- if (!state_->net_vc_) {
- LOG_ERROR("Intercept not operational yet");
+ if (!state_->net_vc_ || state_->shut_down_) {
+ LOG_ERROR("Intercept not operational");
return false;
}
if (!state_->output_.buffer_) {