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 2013/08/06 21:59:22 UTC
[1/4] git commit: fix indentation
Updated Branches:
refs/heads/3.3.x e413f12ce -> 5dec26764
fix indentation
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bacb9234
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bacb9234
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bacb9234
Branch: refs/heads/3.3.x
Commit: bacb923495222803986eaa47d92460f9e2ece4fd
Parents: fe62a34
Author: Igor Galić <i....@brainsware.org>
Authored: Tue Aug 6 13:02:41 2013 +0200
Committer: Igor Galić <i....@brainsware.org>
Committed: Tue Aug 6 13:02:41 2013 +0200
----------------------------------------------------------------------
proxy/ClassH.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bacb9234/proxy/ClassH.txt
----------------------------------------------------------------------
diff --git a/proxy/ClassH.txt b/proxy/ClassH.txt
index 2471d46..95fbfc7 100644
--- a/proxy/ClassH.txt
+++ b/proxy/ClassH.txt
@@ -41,8 +41,8 @@
/ \ \
/ \ \
\ \
-DiskIOVConnection \ \
- NetIOVConnection \
+DiskIOVConnection \ \
+ NetIOVConnection \
DNSIOVConnection
[2/4] git commit: TS-1953: close this by adding an example & CHANGES
Posted by zw...@apache.org.
TS-1953: close this by adding an example & CHANGES
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a7708dfe
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a7708dfe
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a7708dfe
Branch: refs/heads/3.3.x
Commit: a7708dfe1f65f5ff0e2fe273c0165347e544c49c
Parents: bacb923
Author: Igor Galić <i....@brainsware.org>
Authored: Tue Aug 6 13:12:16 2013 +0200
Committer: Igor Galić <i....@brainsware.org>
Committed: Tue Aug 6 13:12:16 2013 +0200
----------------------------------------------------------------------
CHANGES | 3 ++
example/Makefile.am | 4 ++-
example/version/version.c | 67 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 73 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a7708dfe/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 4fe41e3..9cdb0f6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.3.5
+ *) [TS-1953] remove version checks from plugins that don't use it and
+ add an example showing off the version API and partial compilation.
+
*) [TS-2100] Initialize the SSL/NPN registration mutex.
* [TS-1987, TS-2097]: Remove duplicate and unused string functions
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a7708dfe/example/Makefile.am
----------------------------------------------------------------------
diff --git a/example/Makefile.am b/example/Makefile.am
index a5593ff..024edd0 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -38,7 +38,8 @@ noinst_LTLIBRARIES = \
replace-header.la \
response-header-1.la \
server-transform.la \
- thread-1.la
+ thread-1.la \
+ version.la
add_header_la_SOURCES = add-header/add-header.c
append_transform_la_SOURCES = append-transform/append-transform.c
@@ -60,6 +61,7 @@ response_header_1_la_SOURCES = response-header-1/response-header-1.c
server_transform_la_SOURCES = server-transform/server-transform.c
thread_1_la_SOURCES = thread-1/thread-1.c
psi_la_SOURCES = thread-pool/psi.c thread-pool/thread.c
+version_la_SOURCES = version/version.c
# The following examples do not build:
#
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a7708dfe/example/version/version.c
----------------------------------------------------------------------
diff --git a/example/version/version.c b/example/version/version.c
new file mode 100644
index 0000000..5512858
--- /dev/null
+++ b/example/version/version.c
@@ -0,0 +1,67 @@
+/** @file
+
+ an example plugin showing off how to use versioning
+
+ @section license License
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#include <stdio.h>
+
+#include "ts/ts.h"
+#include "ink_defs.h"
+
+void
+TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
+{
+ TSPluginRegistrationInfo info;
+
+ // Get the version:
+ const char *ts_version = TSTrafficServerVersionGet();
+
+ if (!ts_version) {
+ TSError("Can't get Traffic Server verion.\n");
+ return;
+ }
+
+ // Split it in major, minor, patch:
+ int major_ts_version = 0;
+ int minor_ts_version = 0;
+ int patch_ts_version = 0;
+
+ if (sscanf(ts_version, "%d.%d.%d", &major_ts_version, &minor_ts_version, &patch_ts_version) != 3) {
+ TSError("Can't extract verions.\n");
+ return;
+ }
+
+ info.plugin_name = "version-plugin";
+ info.vendor_name = "MyCompany";
+ info.support_email = "ts-api-support@MyCompany.com";
+
+ // partial compilation
+#if (TS_VERSION_NUMBER < 3000000)
+ if (TSPluginRegister(TS_SDK_VERSION_2_0, &info) != TS_SUCCESS) {
+#else
+ if (TSPluginRegister(TS_SDK_VERSION_3_0, &info) != TS_SUCCESS) {
+#endif
+ TSError("Plugin registration failed. \n");
+ }
+
+ TSDebug("debug-version-plugin", "Running in Apache Traffic Server: v%d.%d.%d\n", major_ts_version, minor_ts_version, patch_ts_version);
+}
+
[4/4] git commit: Merge branch 'master' into 3.3.x
Posted by zw...@apache.org.
Merge branch 'master' into 3.3.x
* master:
TS-2102 SPDY plugin tries to setup protocol handler too early.
TS-1953: close this by adding an example & CHANGES
fix indentation
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5dec2676
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5dec2676
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5dec2676
Branch: refs/heads/3.3.x
Commit: 5dec26764e98ac48dd0f2f54125920c370e390b7
Parents: e413f12 c1c963e
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Aug 6 13:59:12 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Aug 6 13:59:12 2013 -0600
----------------------------------------------------------------------
CHANGES | 5 +++
example/Makefile.am | 4 +-
example/version/version.c | 67 ++++++++++++++++++++++++++++++++++
plugins/experimental/spdy/spdy.cc | 24 +++++++++---
proxy/ClassH.txt | 4 +-
5 files changed, 95 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
[3/4] git commit: TS-2102 SPDY plugin tries to setup protocol handler
too early.
Posted by zw...@apache.org.
TS-2102 SPDY plugin tries to setup protocol handler too early.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c1c963ef
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c1c963ef
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c1c963ef
Branch: refs/heads/3.3.x
Commit: c1c963efad8b7f7773c19c6720845d6c34daddcf
Parents: a7708df
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Aug 6 13:47:11 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Aug 6 13:47:11 2013 -0600
----------------------------------------------------------------------
CHANGES | 2 ++
plugins/experimental/spdy/spdy.cc | 24 ++++++++++++++++++------
2 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c1c963ef/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 9cdb0f6..c358bb5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.3.5
+ *) [TS-2102] SPDY plugin tries to setup protocol handler too early.
+
*) [TS-1953] remove version checks from plugins that don't use it and
add an example showing off the version API and partial compilation.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c1c963ef/plugins/experimental/spdy/spdy.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/spdy/spdy.cc b/plugins/experimental/spdy/spdy.cc
index f7fbed8..1a83e2a 100644
--- a/plugins/experimental/spdy/spdy.cc
+++ b/plugins/experimental/spdy/spdy.cc
@@ -339,6 +339,23 @@ spdy_accept_io(TSCont contp, TSEvent ev, void * edata)
return TS_EVENT_NONE;
}
+static int
+spdy_setup_protocol(TSCont /* contp ATS_UNUSED */, TSEvent ev, void * /* edata ATS_UNUSED */)
+{
+ switch (ev) {
+ case TS_EVENT_LIFECYCLE_PORTS_INITIALIZED:
+ TSReleaseAssert(TSNetAcceptNamedProtocol(TSContCreate(spdy_accept_io, TSMutexCreate()),
+ TS_NPN_PROTOCOL_SPDY_2) == TS_SUCCESS);
+ debug_plugin("registered named protocol endpoint for %s", TS_NPN_PROTOCOL_SPDY_2);
+ break;
+ default:
+ TSError("[spdy] Protocol registration failed");
+ break;
+ }
+
+ return TS_EVENT_NONE;
+}
+
extern "C" void
TSPluginInit(int argc, const char * argv[])
{
@@ -372,12 +389,7 @@ TSPluginInit(int argc, const char * argv[])
}
init:
- TSReleaseAssert(
- TSNetAcceptNamedProtocol(TSContCreate(spdy_accept_io, TSMutexCreate()),
- TS_NPN_PROTOCOL_SPDY_2) == TS_SUCCESS);
-
- debug_plugin("registered named protocol endpoint for %s",
- TS_NPN_PROTOCOL_SPDY_2);
+ TSLifecycleHookAdd(TS_LIFECYCLE_PORTS_INITIALIZED_HOOK, TSContCreate(spdy_setup_protocol, NULL));
}
/* vim: set sw=4 tw=79 ts=4 et ai : */