This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  26fef51   TS-4976: Regularize plugins - file
26fef51 is described below

commit 26fef5101d18ba684215b676fc82f116ec4f1840
Author: Alan M. Carroll <[email protected]>
AuthorDate: Tue Mar 14 16:13:22 2017 -0500

    TS-4976: Regularize plugins - file
---
 example/Makefile.am                          |  4 ++--
 example/{file-1/file-1.c => file_1/file_1.c} | 16 +++++++++-------
 example/{file-1 => file_1}/readme.txt        |  2 +-
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/example/Makefile.am b/example/Makefile.am
index 494c5cd..55727b1 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -30,7 +30,7 @@ example_Plugins = \
        blacklist_1.la \
        bnull_transform.la \
        cache_scan.la \
-       file-1.la \
+       file_1.la \
        hello.la \
        intercept.la \
        lifecycle-plugin.la \
@@ -94,7 +94,7 @@ blacklist_0_la_SOURCES = blacklist_0/blacklist_0.c
 blacklist_1_la_SOURCES = blacklist_1/blacklist_1.c
 bnull_transform_la_SOURCES = bnull_transform/bnull_transform.c
 cache_scan_la_SOURCES = cache_scan/cache_scan.cc
-file_1_la_SOURCES = file-1/file-1.c
+file_1_la_SOURCES = file_1/file_1.c
 hello_la_SOURCES = hello/hello.c
 intercept_la_SOURCES = intercept/intercept.cc
 lifecycle_plugin_la_SOURCES = lifecycle-plugin/lifecycle-plugin.c
diff --git a/example/file-1/file-1.c b/example/file_1/file_1.c
similarity index 78%
rename from example/file-1/file-1.c
rename to example/file_1/file_1.c
index dae5e6a..30eff6f 100644
--- a/example/file-1/file-1.c
+++ b/example/file_1/file_1.c
@@ -21,12 +21,12 @@
   limitations under the License.
  */
 
-/* file-1.c:  an example program that opens files and reads them
+/* file_1.c:  an example program that opens files and reads them
  *            into a buffer
  *
  *
  *     Usage:
- *       file-1.so <filename1> <filename2> ...
+ *       file_1.so <filename1> <filename2> ...
  *
  *              <filenamei> is the name of the ith file to
  *              be read.
@@ -36,6 +36,8 @@
 #include <stdio.h>
 #include <ts/ts.h>
 
+#define PLUGIN_NAME "file_1"
+
 void
 TSPluginInit(int argc, const char *argv[])
 {
@@ -44,12 +46,12 @@ TSPluginInit(int argc, const char *argv[])
   int i;
   TSPluginRegistrationInfo info;
 
-  info.plugin_name   = "file_plugin";
-  info.vendor_name   = "MyCompany";
-  info.support_email = "[email protected]";
+  info.plugin_name   = PLUGIN_NAME;
+  info.vendor_name   = "Apache Software Foundation";
+  info.support_email = "[email protected]";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[file-1] Plugin registration failed.");
+    TSError("[%s] Plugin registration failed.", PLUGIN_NAME);
   }
 
   for (i = 1; i < argc; i++) {
@@ -59,7 +61,7 @@ TSPluginInit(int argc, const char *argv[])
     }
 
     while (TSfgets(filep, buf, 4096)) {
-      TSDebug("debug-file", "%s", buf);
+      TSDebug(PLUGIN_NAME, "%s", buf);
     }
 
     TSfclose(filep);
diff --git a/example/file-1/readme.txt b/example/file_1/readme.txt
similarity index 96%
rename from example/file-1/readme.txt
rename to example/file_1/readme.txt
index c53013f..410ac08 100644
--- a/example/file-1/readme.txt
+++ b/example/file_1/readme.txt
@@ -14,7 +14,7 @@ append-transform.c).
 To use this plugin, you would need a line like this in
 plugin.config:
 
-       file-1.so path/to/file.text
+       file_1.so path/to/file.text
 
 Enter either an absolute or a relative pathname for the file.
 If you use a relative pathname, the path must be specified with

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to