trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jplev...@apache.org
Subject svn commit: r897010 [2/2] - in /incubator/trafficserver/traffic/branches/dev: iocore/cache/ iocore/cluster/ iocore/eventsystem/ iocore/net/ proxy/ proxy/http2/
Date Thu, 07 Jan 2010 20:49:38 GMT
Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VConnection.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VConnection.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VConnection.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VConnection.h Thu Jan
 7 20:48:43 2010
@@ -185,12 +185,12 @@
 
     @param c Continuation to be called back with events.
     @param nbytes Number of bytes to read. If unknown, nbytes must
-      be set to INT_MAX.
+      be set to INK64_MAX.
     @param buf buffer to read into.
     @return VIO representing the scheduled IO operation.
 
   */
-  virtual VIO *do_io_read(Continuation * c = NULL, int nbytes = INT_MAX, MIOBuffer * buf
= 0) = 0;
+  virtual VIO *do_io_read(Continuation *c = NULL, ink64 nbytes = INK64_MAX, MIOBuffer *buf
= 0) = 0;
 
   /**
     Write data to the VConnection.
@@ -234,14 +234,14 @@
 
     @param c Continuation to be called back with events.
     @param nbytes Number of bytes to write. If unknown, nbytes must
-      be set to INT_MAX.
+      be set to INK64_MAX.
     @param buf Reader whose data is to be read from.
     @param owner 
     @return VIO representing the scheduled IO operation.
 
   */
-  virtual VIO *do_io_write(Continuation * c = NULL,
-                           int nbytes = INT_MAX, IOBufferReader * buf = 0, bool owner = false)
= 0;
+  virtual VIO *do_io_write(Continuation *c = NULL,
+                           ink64 nbytes = INK64_MAX, IOBufferReader *buf = 0, bool owner
= false) = 0;
 
   /**
     Indicate that the VConnection is no longer needed.
@@ -303,23 +303,23 @@
   */
   virtual void do_io_shutdown(ShutdownHowTo_t howto) = 0;
 
-    VConnection(ProxyMutex * aMutex);
+    VConnection(ProxyMutex *aMutex);
 
 #if defined (_IOCORE_WIN32_WINNT)
-  virtual void set_nbytes(VIO * vio, int nbytes);
+  virtual void set_nbytes(VIO *vio, ink64 nbytes);
 #endif
 
   /** @deprecated */
-  VIO *do_io(int op, Continuation * c = NULL, int nbytes = INT_MAX, MIOBuffer * buf = 0,
int data = 0);
+  VIO *do_io(int op, Continuation *c = NULL, ink64 nbytes = INK64_MAX, MIOBuffer *buf = 0,
int data = 0);
 
   // Private
   // Set continuation on a given vio. The public interface
   // is through VIO::set_continuation()
-  virtual void set_continuation(VIO * vio, Continuation * cont);
+  virtual void set_continuation(VIO *vio, Continuation *cont);
 
   // Reenable a given vio.  The public interface is through VIO::reenable
-  virtual void reenable(VIO * vio);
-  virtual void reenable_re(VIO * vio);
+  virtual void reenable(VIO *vio);
+  virtual void reenable_re(VIO *vio);
 
   /**
     Convenience function to retreive information from VConnection.
@@ -380,7 +380,7 @@
 
 struct DummyVConnection:VConnection
 {
-  virtual VIO *do_io_write(Continuation * c = NULL, int nbytes = INT_MAX, IOBufferReader
* buf = 0, bool owner = false) {
+  virtual VIO *do_io_write(Continuation *c = NULL, ink64 nbytes = INK64_MAX, IOBufferReader
*buf = 0, bool owner = false) {
     (void) c;
     (void) nbytes;
     (void) buf;
@@ -388,7 +388,7 @@
     ink_debug_assert(!"VConnection::do_io_write -- " "cannot use default implementation");
     return NULL;
   }
-  virtual VIO *do_io_read(Continuation * c = NULL, int nbytes = INT_MAX, MIOBuffer * buf
= 0) {
+  virtual VIO *do_io_read(Continuation *c = NULL, ink64 nbytes = INK64_MAX, MIOBuffer *buf
= 0) {
     (void) c;
     (void) nbytes;
     (void) buf;
@@ -405,14 +405,14 @@
     ink_debug_assert(!"VConnection::do_io_shutdown -- " "cannot use default implementation");
   }
 #ifdef _IOCORE_WIN32_WINNT
-  virtual void set_nbytes(VIO * vio, int nbytes)
+  virtual void set_nbytes(VIO *vio, ink64 nbytes)
   {
     (void) vio;
     (void) nbytes;
     ink_debug_assert(!"DummyVConnection::set_nbytes -- " "cannot use default implementation");
   }
 #endif
-DummyVConnection(ProxyMutex * m):VConnection(m) {
+DummyVConnection(ProxyMutex *m):VConnection(m) {
   }
 };
 

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VIO.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VIO.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VIO.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/I_VIO.h Thu Jan  7 20:48:43
2010
@@ -169,7 +169,7 @@
     The total number of bytes this operation must complete.
 
   */
-  int nbytes;
+  ink64 nbytes;
 
   /**
     Number of bytes already completed.
@@ -179,7 +179,7 @@
     the lock.
 
   */
-  int ndone;
+  ink64 ndone;
 
   /**
     Type of operation.

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_IOBuffer.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_IOBuffer.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_IOBuffer.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_IOBuffer.h Thu Jan 
7 20:48:43 2010
@@ -33,32 +33,25 @@
 // +1 for each power of 2
 //
 //////////////////////////////////////////////////////////////
-inline int
-buffer_size_to_index(unsigned int size, int max = max_iobuffer_size)
+inline ink64
+buffer_size_to_index(ink64 size, ink64 max = max_iobuffer_size)
 {
   int r = max;
-  while (r && ((unsigned int) BUFFER_SIZE_FOR_INDEX(r - 1)) >= size)
+  while (r && BUFFER_SIZE_FOR_INDEX(r - 1) >= size)
     r--;
   return r;
 }
 
-inline int
-iobuffer_size_to_index(unsigned int size, int max)
+inline ink64
+iobuffer_size_to_index(ink64 size, ink64 max)
 {
-  if (size > (unsigned int)BUFFER_SIZE_FOR_INDEX(max)) {
-    ////////////////////////////////////////////////////
-    // BUFFER_SIZE_INDEX_FOR_XMALLOC_SIZE returns the //
-    // negative of its argument. The argument must be //
-    // a signed int, otherwise the returned value is  //
-    // also unsigned.                                 //
-    ////////////////////////////////////////////////////
-    return BUFFER_SIZE_INDEX_FOR_XMALLOC_SIZE((int) size);
-  }
+  if (size > BUFFER_SIZE_FOR_INDEX(max))
+    return BUFFER_SIZE_INDEX_FOR_XMALLOC_SIZE(size);
   return buffer_size_to_index(size, max);
 }
 
-inline int
-index_to_buffer_size(int idx)
+inline ink64
+index_to_buffer_size(ink64 idx)
 {
   if (BUFFER_SIZE_INDEX_IS_FAST_ALLOCATED(idx))
     return BUFFER_SIZE_FOR_INDEX(idx);
@@ -72,7 +65,7 @@
 }
 
 inline IOBufferBlock *
-iobufferblock_clone(IOBufferBlock * b, int offset, int len)
+iobufferblock_clone(IOBufferBlock * b, ink64 offset, ink64 len)
 {
 
   IOBufferBlock *start_buf = NULL;
@@ -81,14 +74,14 @@
   while (b && len >= 0) {
     char *start = b->_start;
     char *end = b->_end;
-    int max_bytes = end - start;
+    ink64 max_bytes = end - start;
     max_bytes -= offset;
     if (max_bytes <= 0) {
       offset = -max_bytes;
       b = b->next;
       continue;
     }
-    int bytes = len;
+    ink64 bytes = len;
     if (bytes >= max_bytes)
       bytes = max_bytes;
     IOBufferBlock *new_buf = b->clone();
@@ -109,12 +102,12 @@
 }
 
 inline IOBufferBlock *
-iobufferblock_skip(IOBufferBlock * b, int *poffset, int *plen, int write)
+iobufferblock_skip(IOBufferBlock * b, ink64 *poffset, ink64 *plen, ink64 write)
 {
-  int offset = *poffset;
-  int len = write;
+  ink64 offset = *poffset;
+  ink64 len = write;
   while (b && len >= 0) {
-    int max_bytes = b->read_avail();
+    ink64 max_bytes = b->read_avail();
     max_bytes -= offset;
     if (max_bytes <= 0) {
       offset = -max_bytes;
@@ -140,7 +133,7 @@
 extern Resource *res_lookup(const char *path);
 
 inline void
-iobuffer_mem_inc(const char *_loc, int _size_index)
+iobuffer_mem_inc(const char *_loc, ink64 _size_index)
 {
   if (!res_track_memory)
     return;
@@ -167,7 +160,7 @@
 }
 
 inline void
-iobuffer_mem_dec(const char *_loc, int _size_index)
+iobuffer_mem_dec(const char *_loc, ink64 _size_index)
 {
   if (!res_track_memory)
     return;
@@ -203,7 +196,7 @@
 //         inline functions definitions
 //
 //////////////////////////////////////////////////////////////////
-inline int
+inline ink64
 IOBufferData::block_size()
 {
   return index_to_buffer_size(_size_index);
@@ -214,7 +207,7 @@
 #ifdef TRACK_BUFFER_USER
                            const char *location,
 #endif
-                           void *b, int size, int asize_index)
+                           void *b, ink64 size, ink64 asize_index)
 {
   (void) size;
   IOBufferData *d = ioDataAllocator.alloc();
@@ -233,7 +226,7 @@
 #ifdef TRACK_BUFFER_USER
                                     const char *loc,
 #endif
-                                    void *b, int size)
+                                    void *b, ink64 size)
 {
   return new_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
@@ -247,7 +240,7 @@
 #ifdef TRACK_BUFFER_USER
                                    const char *location,
 #endif
-                                   void *b, int size)
+                                   void *b, ink64 size)
 {
   return new_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
@@ -261,7 +254,7 @@
 #ifdef TRACK_BUFFER_USER
                            const char *location,
 #endif
-                           void *b, int size)
+                           void *b, ink64 size)
 {
   return new_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
@@ -275,7 +268,7 @@
 #ifdef TRACK_BUFFER_USER
                            const char *loc,
 #endif
-                           int size_index, AllocType type)
+                           ink64 size_index, AllocType type)
 {
   IOBufferData *d = ioDataAllocator.alloc();
 #ifdef TRACK_BUFFER_USER
@@ -290,7 +283,7 @@
 // so it is DUPLICATED in IOBuffer.cc
 // ****** IF YOU CHANGE THIS FUNCTION change that one as well.
 inline void
-IOBufferData::alloc(int size_index, AllocType type)
+IOBufferData::alloc(ink64 size_index, AllocType type)
 {
   if (_data)
     dealloc();
@@ -303,7 +296,6 @@
   case MEMALIGNED:
     if (BUFFER_SIZE_INDEX_IS_FAST_ALLOCATED(size_index))
       _data = (char *) ioBufAllocator[size_index].alloc_void();
-    // This really can happen, since the above IF casts to an (unsigned int)
     // coverity[dead_error_condition]
     else if (BUFFER_SIZE_INDEX_IS_XMALLOCED(size_index))
       // coverity[dead_error_line]
@@ -380,7 +372,7 @@
 #ifdef TRACK_BUFFER_USER
                             const char *location,
 #endif
-                            IOBufferData * d, int len, int offset)
+                            IOBufferData * d, ink64 len, ink64 offset)
 {
   IOBufferBlock *b = ioBlockAllocator.alloc();
 #ifdef TRACK_BUFFER_USER
@@ -404,14 +396,14 @@
 }
 
 inline void
-IOBufferBlock::consume(int len)
+IOBufferBlock::consume(ink64 len)
 {
   _start += len;
   ink_assert(_start <= _end);
 }
 
 inline void
-IOBufferBlock::fill(int len)
+IOBufferBlock::fill(ink64 len)
 {
   _end += len;
   ink_assert(_end <= _buf_end);
@@ -425,7 +417,7 @@
 }
 
 inline void
-IOBufferBlock::alloc(int i)
+IOBufferBlock::alloc(ink64 i)
 {
   ink_debug_assert(BUFFER_SIZE_ALLOCATED(i));
 #ifdef TRACK_BUFFER_USER
@@ -488,7 +480,7 @@
 }
 
 inline void
-IOBufferBlock::set_internal(void *b, int len, int asize_index)
+IOBufferBlock::set_internal(void *b, ink64 len, ink64 asize_index)
 {
 #ifdef TRACK_BUFFER_USER
   data = new_IOBufferData_internal(_location, BUFFER_SIZE_NOT_ALLOCATED);
@@ -505,7 +497,7 @@
 }
 
 inline void
-IOBufferBlock::set(IOBufferData * d, int len, int offset)
+IOBufferBlock::set(IOBufferData * d, ink64 len, ink64 offset)
 {
   data = d;
   _start = buf() + offset;
@@ -514,9 +506,9 @@
 }
 
 inline void
-IOBufferBlock::realloc_set_internal(void *b, int buf_size, int asize_index)
+IOBufferBlock::realloc_set_internal(void *b, ink64 buf_size, ink64 asize_index)
 {
-  int data_size = size();
+  ink64 data_size = size();
   memcpy(b, _start, size());
   dealloc();
   set_internal(b, buf_size, asize_index);
@@ -524,29 +516,29 @@
 }
 
 inline void
-IOBufferBlock::realloc(void *b, int buf_size)
+IOBufferBlock::realloc(void *b, ink64 buf_size)
 {
   realloc_set_internal(b, buf_size, BUFFER_SIZE_NOT_ALLOCATED);
 }
 
 inline void
-IOBufferBlock::realloc_xmalloc(void *b, int buf_size)
+IOBufferBlock::realloc_xmalloc(void *b, ink64 buf_size)
 {
   realloc_set_internal(b, buf_size, -buf_size);
 }
 
 inline void
-IOBufferBlock::realloc_xmalloc(int buf_size)
+IOBufferBlock::realloc_xmalloc(ink64 buf_size)
 {
   realloc_set_internal(xmalloc(buf_size), buf_size, -buf_size);
 }
 
 inline void
-IOBufferBlock::realloc(int i)
+IOBufferBlock::realloc(ink64 i)
 {
   if (i == data->_size_index)
     return;
-  if (i >= (int) sizeof(ioBufAllocator))
+  if (i >= (ink64) sizeof(ioBufAllocator))
     return;
 
   ink_release_assert(i > data->_size_index && i != BUFFER_SIZE_NOT_ALLOCATED);
@@ -611,13 +603,13 @@
   return block->end();
 }
 
-inline int
+inline ink64
 IOBufferReader::block_read_avail()
 {
   if (block == 0)
     return (0);
   skip_empty_blocks();
-  return (int) (block->end() - (block->start() + start_offset));
+  return (ink64) (block->end() - (block->start() + start_offset));
 }
 
 inline int
@@ -632,32 +624,32 @@
   return count;
 }
 
-inline int
+inline ink64
 IOBufferReader::read_avail()
 {
-  int t = 0;
+  ink64 t = 0;
   IOBufferBlock *b = block;
   while (b) {
     t += b->read_avail();
     b = b->next;
   }
   t -= start_offset;
-  if (size_limit != MAXINT && t > size_limit)
+  if (size_limit != INK64_MAX && t > size_limit)
     t = size_limit;
   return t;
 }
 
 inline void
-IOBufferReader::consume(int n)
+IOBufferReader::consume(ink64 n)
 {
   start_offset += n;
-  if (size_limit != MAXINT)
+  if (size_limit != INK64_MAX)
     size_limit -= n;
   ink_assert(size_limit >= 0);
   if (block == 0)
     return;
-  int r = block->read_avail();
-  int s = start_offset;
+  ink64 r = block->read_avail();
+  ink64 s = start_offset;
   while (r <= s && block->next && block->next->read_avail())
{
     s -= r;
     start_offset = s;
@@ -668,7 +660,7 @@
 }
 
 inline char &
-IOBufferReader::operator[] (int i)
+IOBufferReader::operator[] (ink64 i)
 {
   static char
     _error = '\0';
@@ -677,8 +669,7 @@
     b = block;
   i += start_offset;
   while (b) {
-    int
-      bytes = b->read_avail();
+    ink64 bytes = b->read_avail();
     if (bytes > i)
       return b->start()[i];
     i -= bytes;
@@ -699,7 +690,7 @@
   block = NULL;
   mbuf = NULL;
   start_offset = 0;
-  size_limit = MAXINT;
+  size_limit = INK64_MAX;
 }
 
 inline void
@@ -707,7 +698,7 @@
 {
   block = mbuf->_writer;
   start_offset = 0;
-  size_limit = MAXINT;
+  size_limit = INK64_MAX;
 }
 
 ////////////////////////////////////////////////////////////////
@@ -731,7 +722,7 @@
 //
 ////////////////////////////////////////////////////////////////
 inline
-MIOBuffer::MIOBuffer(void *b, int bufsize, int aWater_mark)
+MIOBuffer::MIOBuffer(void *b, ink64 bufsize, ink64 aWater_mark)
 {
   set(b, bufsize);
   water_mark = aWater_mark;
@@ -743,7 +734,7 @@
 }
 
 inline
-MIOBuffer::MIOBuffer(int default_size_index)
+MIOBuffer::MIOBuffer(ink64 default_size_index)
 {
   clear();
   size_index = default_size_index;
@@ -775,7 +766,7 @@
 #ifdef TRACK_BUFFER_USER
                                                const char *location,
 #endif
-                                               int size_index)
+                                               ink64 size_index)
 {
   MIOBuffer *b = ioAllocator.alloc();
 #ifdef TRACK_BUFFER_USER
@@ -797,7 +788,7 @@
 #ifdef TRACK_BUFFER_USER
                                                      const char *location,
 #endif
-                                                     int size_index)
+                                                     ink64 size_index)
 {
   MIOBuffer *b = ioAllocator.alloc();
   b->size_index = size_index;
@@ -851,7 +842,7 @@
   return e;
 }
 
-inline int
+inline ink64
 MIOBuffer::block_size()
 {
   return index_to_buffer_size(size_index);
@@ -878,7 +869,7 @@
   return e;
 }
 
-inline int
+inline ink64
 MIOBuffer::block_write_avail()
 {
   IOBufferBlock *b = first_write_block();
@@ -939,7 +930,7 @@
 //
 ////////////////////////////////////////////////////////////////
 inline void
-MIOBuffer::append_block(int asize_index)
+MIOBuffer::append_block(ink64 asize_index)
 {
   ink_debug_assert(BUFFER_SIZE_ALLOCATED(asize_index));
 #ifdef TRACK_BUFFER_USER
@@ -981,10 +972,10 @@
 //  or below the watermark space available.
 //
 //////////////////////////////////////////////////////////////////
-inline int
+inline ink64
 MIOBuffer::current_write_avail()
 {
-  int t = 0;
+  ink64 t = 0;
   IOBufferBlock *b = _writer;
   while (b) {
     t += b->write_avail();
@@ -1002,7 +993,7 @@
 //  the current block then a new block is appended.
 //
 //////////////////////////////////////////////////////////////////
-inline int
+inline ink64
 MIOBuffer::write_avail()
 {
   check_add_block();
@@ -1010,9 +1001,9 @@
 }
 
 inline void
-MIOBuffer::fill(int len)
+MIOBuffer::fill(ink64 len)
 {
-  int f = _writer->write_avail();
+  ink64 f = _writer->write_avail();
   while (f < len) {
     _writer->fill(f);
     len -= f;
@@ -1038,14 +1029,14 @@
   return maxb;
 }
 
-inline int
+inline ink64
 MIOBuffer::max_read_avail()
 {
-  int s = 0;
+  ink64 s = 0;
   int found = 0;
   for (int i = 0; i < MAX_MIOBUFFER_READERS; i++) {
     if (readers[i].allocated()) {
-      int ss = readers[i].read_avail();
+      ink64 ss = readers[i].read_avail();
       if (ss > s) {
         s = ss;
       }
@@ -1058,7 +1049,7 @@
 }
 
 inline void
-MIOBuffer::set(void *b, int len)
+MIOBuffer::set(void *b, ink64 len)
 {
 #ifdef TRACK_BUFFER_USER
   _writer = new_IOBufferBlock_internal(_location);
@@ -1070,7 +1061,7 @@
 }
 
 inline void
-MIOBuffer::set_xmalloced(void *b, int len)
+MIOBuffer::set_xmalloced(void *b, ink64 len)
 {
 #ifdef TRACK_BUFFER_USER
   _writer = new_IOBufferBlock_internal(_location);
@@ -1082,7 +1073,7 @@
 }
 
 inline void
-MIOBuffer::append_xmalloced(void *b, int len)
+MIOBuffer::append_xmalloced(void *b, ink64 len)
 {
 #ifdef TRACK_BUFFER_USER
   IOBufferBlock *x = new_IOBufferBlock_internal(_location);
@@ -1094,7 +1085,7 @@
 }
 
 inline void
-MIOBuffer::append_fast_allocated(void *b, int len, int fast_size_index)
+MIOBuffer::append_fast_allocated(void *b, ink64 len, ink64 fast_size_index)
 {
 #ifdef TRACK_BUFFER_USER
   IOBufferBlock *x = new_IOBufferBlock_internal(_location);
@@ -1106,7 +1097,7 @@
 }
 
 inline void
-MIOBuffer::alloc(int i)
+MIOBuffer::alloc(ink64 i)
 {
 #ifdef TRACK_BUFFER_USER
   _writer = new_IOBufferBlock_internal(_location);
@@ -1119,7 +1110,7 @@
 }
 
 inline void
-MIOBuffer::alloc_xmalloc(int buf_size)
+MIOBuffer::alloc_xmalloc(ink64 buf_size)
 {
   char *b = (char *) xmalloc(buf_size);
   set_xmalloced(b, buf_size);
@@ -1157,7 +1148,7 @@
 }
 
 inline void
-MIOBuffer::set_size_index(int size)
+MIOBuffer::set_size_index(ink64 size)
 {
   size_index = iobuffer_size_to_index(size);
 }

Modified: incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_VConnection.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_VConnection.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_VConnection.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/eventsystem/P_VConnection.h Thu Jan
 7 20:48:43 2010
@@ -84,7 +84,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 static inline VIO *
-vc_do_io_write(VConnection * vc, Continuation * cont, int nbytes, MIOBuffer * buf, int offset)
+vc_do_io_write(VConnection * vc, Continuation * cont, ink64 nbytes, MIOBuffer * buf, ink64
offset)
 {
   IOBufferReader *reader = buf->alloc_reader();
 
@@ -95,7 +95,7 @@
 }
 
 inline VIO *
-VConnection::do_io(int op, Continuation * c, int nbytes, MIOBuffer * cb, int data)
+VConnection::do_io(int op, Continuation * c, ink64 nbytes, MIOBuffer * cb, int data)
 {
   switch (op) {
   case VIO::READ:

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/I_NetVConnection.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/I_NetVConnection.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/I_NetVConnection.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/I_NetVConnection.h Thu Jan  7
20:48:43 2010
@@ -160,7 +160,7 @@
     @return vio
 
   */
-  virtual VIO * do_io_read(Continuation * c, int nbytes, MIOBuffer * buf) = 0;
+  virtual VIO * do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf) = 0;
 
   /**
     Initiates write. Thread-safe, may be called when not handling
@@ -196,7 +196,7 @@
     @return vio pointer
 
   */
-  virtual VIO *do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner
= false) = 0;
+  virtual VIO *do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * buf, bool owner
= false) = 0;
 
   /**
     Closes the vconnection. A state machine MUST call do_io_close()

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetVConnection.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetVConnection.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetVConnection.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNetVConnection.h Thu Jan
 7 20:48:43 2010
@@ -86,8 +86,8 @@
 {
 public:
 
-  virtual VIO * do_io_read(Continuation * c, int nbytes, MIOBuffer * buf);
-  virtual VIO *do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner
= false);
+  virtual VIO * do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf);
+  virtual VIO *do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * buf, bool owner
= false);
 
   virtual Action *send_OOB(Continuation * cont, char *buf, int len);
   virtual void cancel_OOB();

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc Thu Jan
 7 20:48:43 2010
@@ -44,9 +44,7 @@
 //
 // Prototypes
 //
-void
-net_update_priority(NetHandler * nh, UnixNetVConnection * vc, NetState * ns, int ndone);
-
+void net_update_priority(NetHandler * nh, UnixNetVConnection * vc, NetState * ns, int ndone);
 
 //
 // Reschedule a UnixNetVConnection by moving VC 
@@ -535,7 +533,7 @@
 
 
 VIO *
-UnixNetVConnection::do_io_read(Continuation * c, int nbytes, MIOBuffer * buf)
+UnixNetVConnection::do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf)
 {
   ink_assert(!closed);
   if (buf)
@@ -551,14 +549,13 @@
   if (buf) {
     if (!read.enabled)
       read.vio.reenable();
-  } else {
+  } else
     disable_read(this);
-  }
   return &read.vio;
 }
 
 VIO *
-UnixNetVConnection::do_io_write(Continuation * acont, int anbytes, IOBufferReader * abuffer,
bool owner)
+UnixNetVConnection::do_io_write(Continuation * acont, ink64 anbytes, IOBufferReader * abuffer,
bool owner)
 {
   addLogMessage("do_io_write");
   ink_assert(!closed);
@@ -576,9 +573,8 @@
   if (abuffer) {
     if (!write.enabled)
       write.vio.reenable();
-  } else {
+  } else
     disable_write(this);
-  }
   return &write.vio;
 }
 
@@ -607,11 +603,10 @@
   INK_WRITE_MEMORY_BARRIER;
   if (alerrno && alerrno != -1)
     this->lerrno = alerrno;
-  if (alerrno == -1) {
+  if (alerrno == -1)
     closed = 1;
-  } else {
+  else
     closed = -1;
-  }
 }
 
 void
@@ -914,8 +909,6 @@
   net_activity(this, lthread);
 }
 
-
-
 int
 UnixNetVConnection::startEvent(int event, Event * e)
 {

Modified: incubator/trafficserver/traffic/branches/dev/proxy/CoreUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/CoreUtils.cc?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/CoreUtils.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/CoreUtils.cc Thu Jan  7 20:48:43 2010
@@ -1154,7 +1154,7 @@
   // These might not be 64-bit correct. /leif
   printf("      enabled: %d\n", n->enabled);
   printf("      op: %d  _cont: 0x%p\n", n->vio.op, n->vio._cont);
-  printf("      nbytes: %d  done: %d\n", n->vio.nbytes, n->vio.ndone);
+  printf("      nbytes: %d  done: %d\n", (int)n->vio.nbytes, (int)n->vio.ndone);
   printf("      vc_server: 0x%p   mutex: 0x%p\n\n", n->vio.vc_server, n->vio.mutex.m_ptr);
 }
 

Modified: incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.cc?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.cc Thu Jan  7 20:48:43 2010
@@ -219,7 +219,7 @@
 }
 
 VIO *
-PluginVC::do_io_read(Continuation * c, int nbytes, MIOBuffer * buf)
+PluginVC::do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf)
 {
 
   ink_assert(!closed);
@@ -251,7 +251,7 @@
 }
 
 VIO *
-PluginVC::do_io_write(Continuation * c, int nbytes, IOBufferReader * abuffer, bool owner)
+PluginVC::do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * abuffer, bool owner)
 {
 
   ink_assert(!closed);

Modified: incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/PluginVC.h Thu Jan  7 20:48:43 2010
@@ -83,9 +83,9 @@
     PluginVC();
    ~PluginVC();
 
-  virtual VIO *do_io_read(Continuation * c = NULL, int nbytes = INT_MAX, MIOBuffer * buf
= 0);
+  virtual VIO *do_io_read(Continuation * c = NULL, ink64 nbytes = INK64_MAX, MIOBuffer *
buf = 0);
 
-  virtual VIO *do_io_write(Continuation * c = NULL, int nbytes = INT_MAX, IOBufferReader
* buf = 0, bool owner = false);
+  virtual VIO *do_io_write(Continuation * c = NULL, ink64 nbytes = INK64_MAX, IOBufferReader
* buf = 0, bool owner = false);
 
   virtual bool is_over_ssl()
   {

Modified: incubator/trafficserver/traffic/branches/dev/proxy/Transform.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/Transform.cc?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/Transform.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/Transform.cc Thu Jan  7 20:48:43 2010
@@ -92,7 +92,7 @@
   -------------------------------------------------------------------------*/
 
 VConnection *
-TransformProcessor::open(Continuation * cont, APIHook * hooks)
+TransformProcessor::open(Continuation *cont, APIHook *hooks)
 {
   if (hooks) {
     return NEW(new TransformVConnection(cont, hooks));
@@ -105,7 +105,7 @@
   -------------------------------------------------------------------------*/
 
 INKVConnInternal *
-TransformProcessor::null_transform(ProxyMutex * mutex)
+TransformProcessor::null_transform(ProxyMutex *mutex)
 {
   return NEW(new NullTransform(mutex));
 }
@@ -114,8 +114,8 @@
   -------------------------------------------------------------------------*/
 
 INKVConnInternal *
-TransformProcessor::ftp_list_transform(ProxyMutex * mutex,
-                                       HTTPHdr * req, IOBufferReader * ftp_message, const
char *currentdir)
+TransformProcessor::ftp_list_transform(ProxyMutex *mutex,
+                                       HTTPHdr *req, IOBufferReader *ftp_message, const char
*currentdir)
 {
   return NEW(new FtpListTransform(mutex, req, ftp_message, currentdir));
 }
@@ -125,8 +125,8 @@
   -------------------------------------------------------------------------*/
 
 INKVConnInternal *
-TransformProcessor::range_transform(ProxyMutex * mut,
-                                    MIMEField * range_field, HTTPInfo * cache_obj, HTTPHdr
* transform_resp, bool & b)
+TransformProcessor::range_transform(ProxyMutex *mut,
+                                    MIMEField *range_field, HTTPInfo *cache_obj, HTTPHdr
*transform_resp, bool & b)
 {
   RangeTransform *range_transform = NEW(new RangeTransform(mut, range_field, cache_obj, transform_resp));
 
@@ -144,7 +144,7 @@
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
-TransformTerminus::TransformTerminus(TransformVConnection * tvc)
+TransformTerminus::TransformTerminus(TransformVConnection *tvc)
 :VConnection(tvc->mutex),
 m_tvc(tvc), m_read_vio(), m_write_vio(), m_event_count(0), m_deletable(0), m_closed(0), m_called_user(0)
 {
@@ -155,7 +155,7 @@
   -------------------------------------------------------------------------*/
 
 static inline void
-dump_buffer(IOBufferReader * reader)
+dump_buffer(IOBufferReader *reader)
 {
   IOBufferBlock *b = reader->get_current_block();
   int offset = reader->start_offset;
@@ -345,7 +345,7 @@
   -------------------------------------------------------------------------*/
 
 VIO *
-TransformTerminus::do_io_read(Continuation * c, int nbytes, MIOBuffer * buf)
+TransformTerminus::do_io_read(Continuation *c, ink64 nbytes, MIOBuffer *buf)
 {
   m_read_vio.buffer.writer_for(buf);
   m_read_vio.op = VIO::READ;
@@ -368,7 +368,7 @@
   -------------------------------------------------------------------------*/
 
 VIO *
-TransformTerminus::do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner)
+TransformTerminus::do_io_write(Continuation *c, ink64 nbytes, IOBufferReader *buf, bool owner)
 {
   // In the process of eliminating 'owner' mode so asserting against it
   ink_assert(!owner);
@@ -438,7 +438,7 @@
   -------------------------------------------------------------------------*/
 
 void
-TransformTerminus::reenable(VIO * vio)
+TransformTerminus::reenable(VIO *vio)
 {
   ink_assert((vio == &m_read_vio) || (vio == &m_write_vio));
 
@@ -458,7 +458,7 @@
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
-TransformVConnection::TransformVConnection(Continuation * cont, APIHook * hooks)
+TransformVConnection::TransformVConnection(Continuation *cont, APIHook *hooks)
 :VConnection(cont->mutex), m_cont(cont), m_terminus(this), m_closed(0)
 {
   INKVConnInternal *xform;
@@ -506,7 +506,7 @@
   -------------------------------------------------------------------------*/
 
 VIO *
-TransformVConnection::do_io_read(Continuation * c, int nbytes, MIOBuffer * buf)
+TransformVConnection::do_io_read(Continuation *c, ink64 nbytes, MIOBuffer *buf)
 {
   Debug("transform", "TransformVConnection do_io_read: 0x%lx [0x%lx]", (long) c, (long) this);
 
@@ -517,7 +517,7 @@
   -------------------------------------------------------------------------*/
 
 VIO *
-TransformVConnection::do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool
owner)
+TransformVConnection::do_io_write(Continuation *c, ink64 nbytes, IOBufferReader *buf, bool
owner)
 {
   Debug("transform", "TransformVConnection do_io_write: 0x%lx [0x%lx]", (long) c, (long)
this);
 
@@ -558,7 +558,7 @@
   -------------------------------------------------------------------------*/
 
 void
-TransformVConnection::reenable(VIO * vio)
+TransformVConnection::reenable(VIO *vio)
 {
   ink_assert(!"not reached");
 }
@@ -645,7 +645,7 @@
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
-NullTransform::NullTransform(ProxyMutex * _mutex)
+NullTransform::NullTransform(ProxyMutex *_mutex)
 :INKVConnInternal(NULL, _mutex), m_output_buf(NULL), m_output_reader(NULL), m_output_vio(NULL)
 {
   SET_HANDLER(&NullTransform::handle_event);
@@ -770,8 +770,8 @@
   b) are somewhat hard to overcome.
   -------------------------------------------------------------------------*/
 
-FtpListTransform::FtpListTransform(ProxyMutex * _mutex,
-                                   HTTPHdr * req, IOBufferReader * ftp_message, const char
*currentdir)
+FtpListTransform::FtpListTransform(ProxyMutex *_mutex,
+                                   HTTPHdr *req, IOBufferReader *ftp_message, const char
*currentdir)
 :INKVConnInternal(NULL, _mutex),
 m_req(req),
 m_ftp_message(ftp_message),
@@ -1791,8 +1791,8 @@
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
-RangeTransform::RangeTransform(ProxyMutex * mut, MIMEField * range_field,
-                               HTTPInfo * cache_obj, HTTPHdr * transform_resp)
+RangeTransform::RangeTransform(ProxyMutex *mut, MIMEField *range_field,
+                               HTTPInfo *cache_obj, HTTPHdr *transform_resp)
 :INKVConnInternal(NULL, mut),
 m_output_buf(NULL),
 m_output_reader(NULL),

Modified: incubator/trafficserver/traffic/branches/dev/proxy/TransformInternal.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/TransformInternal.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/TransformInternal.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/TransformInternal.h Thu Jan  7 20:48:43
2010
@@ -41,18 +41,15 @@
 
   int handle_event(int event, void *edata);
 
-  VIO *do_io_read(Continuation * c, int nbytes, MIOBuffer * buf);
-
-  VIO *do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner = false);
-
+  VIO *do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf);
+  VIO *do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * buf, bool owner = false);
   void do_io_close(int lerrno = -1);
-
   void do_io_shutdown(ShutdownHowTo_t howto);
 
   void reenable(VIO * vio);
 
 public:
-    TransformVConnection * m_tvc;
+  TransformVConnection * m_tvc;
   VIO m_read_vio;
   VIO m_write_vio;
   volatile int m_event_count;
@@ -70,18 +67,15 @@
 
   int handle_event(int event, void *edata);
 
-  VIO *do_io_read(Continuation * c, int nbytes, MIOBuffer * buf);
-
-  VIO *do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner = false);
-
+  VIO *do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf);
+  VIO *do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * buf, bool owner = false);
   void do_io_close(int lerrno = -1);
-
   void do_io_shutdown(ShutdownHowTo_t howto);
 
   void reenable(VIO * vio);
 
 public:
-    VConnection * m_transform;
+  VConnection * m_transform;
   Continuation *m_cont;
   TransformTerminus m_terminus;
   volatile int m_closed;
@@ -96,7 +90,7 @@
   int handle_event(int event, void *edata);
 
 public:
-    APIHooks m_hooks;
+  APIHooks m_hooks;
   VConnection *m_tvc;
   IOBufferReader *m_read_buf;
   MIOBuffer *m_write_buf;
@@ -112,7 +106,7 @@
   int handle_event(int event, void *edata);
 
 public:
-    MIOBuffer * m_output_buf;
+  MIOBuffer * m_output_buf;
   IOBufferReader *m_output_reader;
   VIO *m_output_vio;
 };
@@ -139,7 +133,7 @@
                        const char *ne, const char *ns, struct tm *tp, int size);
 
 public:
-    HTTPHdr * m_req;
+  HTTPHdr * m_req;
   IOBufferReader *m_ftp_message;
   IOBufferReader *m_output_reader;
   MIOBuffer *m_output_buf;

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.cc?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.cc Thu Jan
 7 20:48:43 2010
@@ -238,13 +238,13 @@
 }
 
 VIO *
-HttpClientSession::do_io_read(Continuation * c, int nbytes, MIOBuffer * buf)
+HttpClientSession::do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf)
 {
   return client_vc->do_io_read(c, nbytes, buf);
 }
 
 VIO *
-HttpClientSession::do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner)
+HttpClientSession::do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * buf, bool
owner)
 {
   return client_vc->do_io_write(c, nbytes, buf, owner);
 }

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpClientSession.h Thu Jan 
7 20:48:43 2010
@@ -58,9 +58,9 @@
 public:
   void new_connection(NetVConnection * new_vc, bool backdoor);
 
-  virtual VIO *do_io_read(Continuation * c, int nbytes = INT_MAX, MIOBuffer * buf = 0);
+  virtual VIO *do_io_read(Continuation * c, ink64 nbytes = INK64_MAX, MIOBuffer * buf = 0);
 
-  virtual VIO *do_io_write(Continuation * c = NULL, int nbytes = INT_MAX, IOBufferReader
* buf = 0, bool owner = false);
+  virtual VIO *do_io_write(Continuation * c = NULL, ink64 nbytes = INK64_MAX, IOBufferReader
* buf = 0, bool owner = false);
 
   virtual void do_io_close(int lerrno = -1);
   virtual void do_io_shutdown(ShutdownHowTo_t howto);

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.cc?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.cc Thu Jan
 7 20:48:43 2010
@@ -119,13 +119,13 @@
 }
 
 VIO *
-HttpServerSession::do_io_read(Continuation * c, int nbytes, MIOBuffer * buf)
+HttpServerSession::do_io_read(Continuation * c, ink64 nbytes, MIOBuffer * buf)
 {
   return server_vc->do_io_read(c, nbytes, buf);
 }
 
 VIO *
-HttpServerSession::do_io_write(Continuation * c, int nbytes, IOBufferReader * buf, bool owner)
+HttpServerSession::do_io_write(Continuation * c, ink64 nbytes, IOBufferReader * buf, bool
owner)
 {
   return server_vc->do_io_write(c, nbytes, buf, owner);
 }

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.h?rev=897010&r1=897009&r2=897010&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/HttpServerSession.h Thu Jan 
7 20:48:43 2010
@@ -86,9 +86,9 @@
     return buf_reader;
   };
 
-  virtual VIO *do_io_read(Continuation * c, int nbytes = INT_MAX, MIOBuffer * buf = 0);
+  virtual VIO *do_io_read(Continuation * c, ink64 nbytes = INK64_MAX, MIOBuffer * buf = 0);
 
-  virtual VIO *do_io_write(Continuation * c = NULL, int nbytes = INT_MAX, IOBufferReader
* buf = 0, bool owner = false);
+  virtual VIO *do_io_write(Continuation * c = NULL, ink64 nbytes = INK64_MAX, IOBufferReader
* buf = 0, bool owner = false);
 
   virtual void do_io_close(int lerrno = -1);
   virtual void do_io_shutdown(ShutdownHowTo_t howto);



Mime
View raw message