You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/09/21 22:14:41 UTC
trafficserver git commit: TS-3928: Make TSRemapNewInstance not
required in remap plugins
Repository: trafficserver
Updated Branches:
refs/heads/master 0a58767f7 -> 90432575b
TS-3928: Make TSRemapNewInstance not required in remap plugins
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/90432575
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/90432575
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/90432575
Branch: refs/heads/master
Commit: 90432575baed23aa9e01f87cb8d8c5cedad4eb40
Parents: 0a58767
Author: Phil Sorber <so...@apache.org>
Authored: Mon Sep 21 14:07:58 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Sep 21 14:07:58 2015 -0600
----------------------------------------------------------------------
proxy/http/remap/RemapConfig.cc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/90432575/proxy/http/remap/RemapConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/http/remap/RemapConfig.cc b/proxy/http/remap/RemapConfig.cc
index 2013009..7715282 100644
--- a/proxy/http/remap/RemapConfig.cc
+++ b/proxy/http/remap/RemapConfig.cc
@@ -786,9 +786,6 @@ remap_load_plugin(const char **argv, int argc, url_mapping *mp, char *errbuf, in
if (!pi->fp_tsremap_init) {
snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_INIT, c);
retcode = -10;
- } else if (!pi->fp_tsremap_new_instance) {
- snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_NEW_INSTANCE, c);
- retcode = -11;
} else if (!pi->fp_tsremap_do_remap) {
snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_DO_REMAP, c);
retcode = -12;
@@ -862,8 +859,10 @@ remap_load_plugin(const char **argv, int argc, url_mapping *mp, char *errbuf, in
Debug("remap_plugin", "creating new plugin instance");
- TSReturnCode res = TS_ERROR;
- res = pi->fp_tsremap_new_instance(parc, parv, &ih, tmpbuf, sizeof(tmpbuf) - 1);
+ TSReturnCode res = TS_SUCCESS;
+ if (pi->fp_tsremap_new_instance) {
+ res = pi->fp_tsremap_new_instance(parc, parv, &ih, tmpbuf, sizeof(tmpbuf) - 1);
+ }
Debug("remap_plugin", "done creating new plugin instance");
Re: trafficserver git commit: TS-3928: Make TSRemapNewInstance not required in remap plugins
Posted by James Peach <jp...@apache.org>.
Phil, can you please update the man page for TSRemapNewInstance?
https://docs.trafficserver.apache.org/en/latest/reference/api/TSRemap.en.html
thanks!
> On Sep 21, 2015, at 1:14 PM, sorber@apache.org wrote:
>
> Repository: trafficserver
> Updated Branches:
> refs/heads/master 0a58767f7 -> 90432575b
>
>
> TS-3928: Make TSRemapNewInstance not required in remap plugins
>
>
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/90432575
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/90432575
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/90432575
>
> Branch: refs/heads/master
> Commit: 90432575baed23aa9e01f87cb8d8c5cedad4eb40
> Parents: 0a58767
> Author: Phil Sorber <so...@apache.org>
> Authored: Mon Sep 21 14:07:58 2015 -0600
> Committer: Phil Sorber <so...@apache.org>
> Committed: Mon Sep 21 14:07:58 2015 -0600
>
> ----------------------------------------------------------------------
> proxy/http/remap/RemapConfig.cc | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/90432575/proxy/http/remap/RemapConfig.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/http/remap/RemapConfig.cc b/proxy/http/remap/RemapConfig.cc
> index 2013009..7715282 100644
> --- a/proxy/http/remap/RemapConfig.cc
> +++ b/proxy/http/remap/RemapConfig.cc
> @@ -786,9 +786,6 @@ remap_load_plugin(const char **argv, int argc, url_mapping *mp, char *errbuf, in
> if (!pi->fp_tsremap_init) {
> snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_INIT, c);
> retcode = -10;
> - } else if (!pi->fp_tsremap_new_instance) {
> - snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_NEW_INSTANCE, c);
> - retcode = -11;
> } else if (!pi->fp_tsremap_do_remap) {
> snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_DO_REMAP, c);
> retcode = -12;
> @@ -862,8 +859,10 @@ remap_load_plugin(const char **argv, int argc, url_mapping *mp, char *errbuf, in
>
> Debug("remap_plugin", "creating new plugin instance");
>
> - TSReturnCode res = TS_ERROR;
> - res = pi->fp_tsremap_new_instance(parc, parv, &ih, tmpbuf, sizeof(tmpbuf) - 1);
> + TSReturnCode res = TS_SUCCESS;
> + if (pi->fp_tsremap_new_instance) {
> + res = pi->fp_tsremap_new_instance(parc, parv, &ih, tmpbuf, sizeof(tmpbuf) - 1);
> + }
>
> Debug("remap_plugin", "done creating new plugin instance");
>
>
Re: trafficserver git commit: TS-3928: Make TSRemapNewInstance not required in remap plugins
Posted by James Peach <jp...@apache.org>.
Phil, can you please update the man page for TSRemapNewInstance?
https://docs.trafficserver.apache.org/en/latest/reference/api/TSRemap.en.html
thanks!
> On Sep 21, 2015, at 1:14 PM, sorber@apache.org wrote:
>
> Repository: trafficserver
> Updated Branches:
> refs/heads/master 0a58767f7 -> 90432575b
>
>
> TS-3928: Make TSRemapNewInstance not required in remap plugins
>
>
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/90432575
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/90432575
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/90432575
>
> Branch: refs/heads/master
> Commit: 90432575baed23aa9e01f87cb8d8c5cedad4eb40
> Parents: 0a58767
> Author: Phil Sorber <so...@apache.org>
> Authored: Mon Sep 21 14:07:58 2015 -0600
> Committer: Phil Sorber <so...@apache.org>
> Committed: Mon Sep 21 14:07:58 2015 -0600
>
> ----------------------------------------------------------------------
> proxy/http/remap/RemapConfig.cc | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/90432575/proxy/http/remap/RemapConfig.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/http/remap/RemapConfig.cc b/proxy/http/remap/RemapConfig.cc
> index 2013009..7715282 100644
> --- a/proxy/http/remap/RemapConfig.cc
> +++ b/proxy/http/remap/RemapConfig.cc
> @@ -786,9 +786,6 @@ remap_load_plugin(const char **argv, int argc, url_mapping *mp, char *errbuf, in
> if (!pi->fp_tsremap_init) {
> snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_INIT, c);
> retcode = -10;
> - } else if (!pi->fp_tsremap_new_instance) {
> - snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_NEW_INSTANCE, c);
> - retcode = -11;
> } else if (!pi->fp_tsremap_do_remap) {
> snprintf(errbuf, errbufsize, "Can't find \"%s\" function in remap plugin \"%s\"", TSREMAP_FUNCNAME_DO_REMAP, c);
> retcode = -12;
> @@ -862,8 +859,10 @@ remap_load_plugin(const char **argv, int argc, url_mapping *mp, char *errbuf, in
>
> Debug("remap_plugin", "creating new plugin instance");
>
> - TSReturnCode res = TS_ERROR;
> - res = pi->fp_tsremap_new_instance(parc, parv, &ih, tmpbuf, sizeof(tmpbuf) - 1);
> + TSReturnCode res = TS_SUCCESS;
> + if (pi->fp_tsremap_new_instance) {
> + res = pi->fp_tsremap_new_instance(parc, parv, &ih, tmpbuf, sizeof(tmpbuf) - 1);
> + }
>
> Debug("remap_plugin", "done creating new plugin instance");
>
>