trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mas...@apache.org
Subject [trafficserver] branch master updated: fixed datatype in example plugin
Date Tue, 30 Jul 2019 03:43:48 GMT
This is an automated email from the ASF dual-hosted git repository.

maskit 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 ee6df3d  fixed datatype in example plugin
ee6df3d is described below

commit ee6df3d591f76d590b19b0ef84b0fe86092062d1
Author: czhang01 <carl.zhang@verizonmedia.com>
AuthorDate: Mon Jul 29 16:06:44 2019 -0500

    fixed datatype in example plugin
---
 example/plugins/c-api/bnull_transform/bnull_transform.c   | 4 ++--
 example/plugins/c-api/server_transform/server_transform.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/example/plugins/c-api/bnull_transform/bnull_transform.c b/example/plugins/c-api/bnull_transform/bnull_transform.c
index 55dd7fd..8cb2c44 100644
--- a/example/plugins/c-api/bnull_transform/bnull_transform.c
+++ b/example/plugins/c-api/bnull_transform/bnull_transform.c
@@ -81,7 +81,7 @@ static int
 handle_buffering(TSCont contp, MyData *data)
 {
   TSVIO write_vio;
-  int towrite;
+  int64_t towrite;
 
   /* Get the write VIO for the write operation that was performed on
      ourself. This VIO contains the buffer that we are to read from
@@ -117,7 +117,7 @@ handle_buffering(TSCont contp, MyData *data)
     /* The amount of data left to read needs to be truncated by
        the amount of data actually in the read buffer. */
 
-    int avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio));
+    int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio));
     if (towrite > avail) {
       towrite = avail;
     }
diff --git a/example/plugins/c-api/server_transform/server_transform.c b/example/plugins/c-api/server_transform/server_transform.c
index 825c1fe..67f2693 100644
--- a/example/plugins/c-api/server_transform/server_transform.c
+++ b/example/plugins/c-api/server_transform/server_transform.c
@@ -284,7 +284,7 @@ static int
 transform_buffer_event(TSCont contp, TransformData *data, TSEvent event ATS_UNUSED, void
*edata ATS_UNUSED)
 {
   TSVIO write_vio;
-  int towrite;
+  int64_t towrite;
 
   if (!data->input_buf) {
     data->input_buf    = TSIOBufferCreate();
@@ -313,7 +313,7 @@ transform_buffer_event(TSCont contp, TransformData *data, TSEvent event
ATS_UNUS
   if (towrite > 0) {
     /* The amount of data left to read needs to be truncated by
        the amount of data actually in the read buffer. */
-    int avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio));
+    int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio));
     if (towrite > avail) {
       towrite = avail;
     }


Mime
View raw message