trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1056194 - in /trafficserver/traffic/trunk: ./ example/null-transform/ iocore/cache/ iocore/cluster/ iocore/eventsystem/ iocore/net/ iocore/utils/ lib/ts/ proxy/ proxy/hdrs/ proxy/http2/ proxy/logging/ proxy/mgmt2/api2/ proxy/mgmt2/cop/ tes...
Date Fri, 07 Jan 2011 05:40:32 GMT
Author: zwoop
Date: Fri Jan  7 05:40:30 2011
New Revision: 1056194

URL: http://svn.apache.org/viewvc?rev=1056194&view=rev
Log:
TS-620 And even more 64-bit fixes to the SM

Modified:
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/example/null-transform/null-transform.c
    trafficserver/traffic/trunk/iocore/cache/CacheTest.cc
    trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc
    trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc
    trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc
    trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h
    trafficserver/traffic/trunk/iocore/cluster/P_ClusterInternal.h
    trafficserver/traffic/trunk/iocore/cluster/P_ClusterLib.h
    trafficserver/traffic/trunk/iocore/eventsystem/P_IOBuffer.h
    trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h
    trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h
    trafficserver/traffic/trunk/iocore/net/NetVCTest.cc
    trafficserver/traffic/trunk/iocore/net/P_UDPConnection.h
    trafficserver/traffic/trunk/iocore/net/P_UDPPacket.h
    trafficserver/traffic/trunk/iocore/net/SSLNetVConnection.cc
    trafficserver/traffic/trunk/iocore/net/UnixNetVConnection.cc
    trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc
    trafficserver/traffic/trunk/iocore/utils/OneWayMultiTunnel.cc
    trafficserver/traffic/trunk/iocore/utils/OneWayTunnel.cc
    trafficserver/traffic/trunk/lib/ts/ink_string.h
    trafficserver/traffic/trunk/proxy/FetchSM.cc
    trafficserver/traffic/trunk/proxy/FetchSM.h
    trafficserver/traffic/trunk/proxy/ICP.cc
    trafficserver/traffic/trunk/proxy/ICP.h
    trafficserver/traffic/trunk/proxy/InkAPI.cc
    trafficserver/traffic/trunk/proxy/InkAPITestTool.cc
    trafficserver/traffic/trunk/proxy/MuxVC.cc
    trafficserver/traffic/trunk/proxy/Prefetch.cc
    trafficserver/traffic/trunk/proxy/Prefetch.h
    trafficserver/traffic/trunk/proxy/SocksProxy.cc
    trafficserver/traffic/trunk/proxy/Stuffer.cc
    trafficserver/traffic/trunk/proxy/Stuffer.h
    trafficserver/traffic/trunk/proxy/Transform.cc
    trafficserver/traffic/trunk/proxy/Update.cc
    trafficserver/traffic/trunk/proxy/hdrs/HTTP.h
    trafficserver/traffic/trunk/proxy/hdrs/HdrTSOnly.cc
    trafficserver/traffic/trunk/proxy/hdrs/MIME.h
    trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
    trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
    trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
    trafficserver/traffic/trunk/proxy/http2/HttpTunnel.cc
    trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc
    trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc
    trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc
    trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
    trafficserver/traffic/trunk/test/deft/sio_buffer.cc

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Fri Jan  7 05:40:30 2011
@@ -551,6 +551,8 @@ case $host_os in
       release_opt="-g $common_opt -O2 -axsse4.2 -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
     else # gcc
+    # This is useful for finding odd conversions
+    #    common_opt="-pipe -Wall -Werror -Wconversion -Wno-sign-conversion"
       common_opt="-pipe -Wall -Werror"
       debug_opt="-ggdb3 $common_opt"
       release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"

Modified: trafficserver/traffic/trunk/example/null-transform/null-transform.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/null-transform/null-transform.c?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/null-transform/null-transform.c (original)
+++ trafficserver/traffic/trunk/example/null-transform/null-transform.c Fri Jan  7 05:40:30 2011
@@ -171,8 +171,11 @@ handle_transform(TSCont contp)
         TSError("[null-plugin] unable to copy IO buffers\n");
         goto Lerror;
       }
+      /* For testing bad 64-bit */
+#if 0
       printf("wrote %d\n", (int)towrite);
       sleep(1);
+#endif
 
       /* Tell the read buffer that we have read the data and are no
        * longer interested in it.

Modified: trafficserver/traffic/trunk/iocore/cache/CacheTest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheTest.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheTest.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheTest.cc Fri Jan  7 05:40:30 2011
@@ -213,8 +213,10 @@ void CacheTestSM::fill_buffer() {
     int64_t l = avail;
     if (l > sk)
       l = sk;
+
     int64_t pos = cvio->ndone +  buffer_reader->read_avail();
-    int o = pos % sk;
+    int64_t o = pos % sk;
+
     if (l > sk - o)
       l = sk - o;
     k.b[0] = pos / sk;
@@ -236,7 +238,7 @@ int CacheTestSM::check_buffer() {
     int64_t l = avail;
     if (l > sk)
       l = sk;
-    int o = pos % sk;
+    int64_t o = pos % sk;
     if (l > sk - o)
       l = sk - o;
     k.b[0] = pos / sk;

Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterCache.cc Fri Jan  7 05:40:30 2011
@@ -245,6 +245,7 @@ ClusterVConnectionCache::MD5ToIndex(INK_
 {
   uint64_t i = p->fold();
   int32_t h, l;
+
   h = i >> 32;
   l = i & 0xFFFFFFFF;
   return ((h ^ l) % MAX_TABLE_ENTRIES) & (MAX_TABLE_ENTRIES - 1);
@@ -1824,7 +1825,7 @@ CacheContinuation::setupReadBufTunnel(VC
   tunnel_cont->mutex = this->mutex;
   SET_CONTINUATION_HANDLER(tunnel_cont, (CacheContHandler)
                            & CacheContinuation::tunnelClosedEvent);
-  int ravail = bytes_IOBufferBlockList(readahead_data, 1);
+  int64_t ravail = bytes_IOBufferBlockList(readahead_data, 1);
 
   tunnel_mutex = tunnel_cont->mutex;
   tunnel_closed = false;
@@ -2725,10 +2726,9 @@ CacheContinuation::replyLookupEvent(int 
 
 int32_t CacheContinuation::getObjectSize(VConnection * vc, int opcode, CacheHTTPInfo * ret_ci)
 {
-  CacheHTTPInfo *
-    ci = 0;
-  int32_t
-    object_size = 0;
+  CacheHTTPInfo *ci = 0;
+  int64_t object_size = 0;
+
   if ((opcode == CACHE_OPEN_READ_LONG)
       || (opcode == CACHE_OPEN_READ_BUFFER_LONG)) {
 

Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterHandler.cc Fri Jan  7 05:40:30 2011
@@ -609,8 +609,7 @@ bool ClusterHandler::build_initial_vecto
             if (vc_ok_write(vc) || remote_write_fill) {
               if (remote_write_fill) {
                 s.iov[new_n_iov].iov_base = 0;
-                ink_release_assert((int) s.msg.descriptor[i].length ==
-                                   bytes_IOBufferBlockList(vc->remote_write_block, 1));
+                ink_release_assert((int) s.msg.descriptor[i].length == bytes_IOBufferBlockList(vc->remote_write_block, 1));
                 s.block[new_n_iov] = vc->remote_write_block;
 
               } else {
@@ -769,8 +768,8 @@ bool ClusterHandler::get_read_locks()
       }
       // Lock acquire success, move read bytes into VC
 
-      int
-        read_avail = vc->read_block->read_avail();
+      int64_t read_avail = vc->read_block->read_avail();
+
       if (!vc->pending_remote_fill && read_avail) {
         Debug("cluster_vc_xfer", "Deferred fill ch %d 0x%x %d bytes", vc->channel, vc, read_avail);
 
@@ -1249,7 +1248,7 @@ ClusterHandler::update_channels_partial_
   // amount read in the associated VC read buffer data structures.
   //
   int i;
-  int res = read.bytes_xfered;
+  int64_t res = read.bytes_xfered;
 
   if (!res) {
     return;
@@ -1258,9 +1257,9 @@ ClusterHandler::update_channels_partial_
 
   // how much of the iov was done
 
-  int iov_done[MAX_TCOUNT];
-  int total = 0;
-  int already_read = read.did - read.bytes_xfered;
+  int64_t iov_done[MAX_TCOUNT];
+  int64_t total = 0;
+  int64_t already_read = read.did - read.bytes_xfered;
 
   for (i = 0; i < read.n_iov; i++) {
     ink_release_assert(already_read >= 0);
@@ -1302,6 +1301,7 @@ ClusterHandler::update_channels_partial_
           ClusterVConnState *s = &vc->read;
           ink_assert(vc->iov_map < read.n_iov);
           int len = iov_done[vc->iov_map];
+
           if (len) {
             if (!read_all_large_control_msgs) {
               //
@@ -1480,9 +1480,9 @@ ClusterHandler::update_channels_written(
 
           if (vc_ok_write(vc)) {
             vc->last_activity_time = current_time;      // note activity time
-            int n = vc->was_closed()? 0 : s->vio.buffer.reader()->block_read_avail();
-            int nb = vc->was_closed()? 0 : s->vio.nbytes;
-            int ndone = vc->was_closed()? 0 : s->vio.ndone;
+            int64_t n = vc->was_closed()? 0 : s->vio.buffer.reader()->block_read_avail();
+            int64_t nb = vc->was_closed()? 0 : s->vio.nbytes;
+            int64_t ndone = vc->was_closed()? 0 : s->vio.ndone;
 
             if (ndone < vc->remote_free) {
               cluster_set_priority(this, s, 1); // next bucket
@@ -2028,8 +2028,9 @@ retry:
   //
   MIOBufferAccessor & buf = s->vio.buffer;
 
-  int towrite = buf.reader()->read_avail();
-  int ntodo = s->vio.ntodo();
+  int64_t towrite = buf.reader()->read_avail();
+  int64_t ntodo = s->vio.ntodo();
+
   if (towrite > ntodo)
     towrite = ntodo;
 
@@ -2201,8 +2202,8 @@ retry:
     return 0;
   }
 
-  int nb = s->vio.nbytes;
-  int ntodo = s->vio.ntodo();
+  int64_t nb = s->vio.nbytes;
+  int64_t ntodo = s->vio.ntodo();
   ink_assert(ntodo >= 0);
 
   if (ntodo <= 0) {
@@ -2212,7 +2213,7 @@ retry:
     return 0;
   }
 
-  int bytes_to_move = vc->initial_data_bytes;
+  int64_t bytes_to_move = vc->initial_data_bytes;
   if (vc->read_block && bytes_to_move) {
 
     // Push initial read data into VC
@@ -2271,7 +2272,8 @@ retry:
   // has been moved into the user VC.
   // Now allow send of freespace to receive additional data.
 
-  int nextfree = vc->read.vio.ndone;
+  int64_t nextfree = vc->read.vio.ndone;
+
   nextfree = (nextfree + DEFAULT_MAX_BUFFER_SIZE - 1) / DEFAULT_MAX_BUFFER_SIZE;
   nextfree *= DEFAULT_MAX_BUFFER_SIZE;
 

Modified: trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc (original)
+++ trafficserver/traffic/trunk/iocore/cluster/ClusterLib.cc Fri Jan  7 05:40:30 2011
@@ -131,7 +131,7 @@ cluster_disable(ClusterHandler * ch, Clu
 }
 
 void
-cluster_update_priority(ClusterHandler * ch, ClusterVConnection * vc, ClusterVConnState * ns, int ndone, int ntodo)
+cluster_update_priority(ClusterHandler * ch, ClusterVConnection * vc, ClusterVConnState * ns, int64_t ndone, int64_t ntodo)
 {
   //
   // Enable inactivity timeout, recompute priority based on latest transfer.
@@ -146,7 +146,9 @@ cluster_update_priority(ClusterHandler *
     if (vc->inactivity_timeout_in)
       vc->inactivity_timeout = vc->thread->schedule_in(vc, vc->inactivity_timeout_in);
   }
-  int tsize = ns->vio.buffer.total_size();
+
+  int64_t tsize = ns->vio.buffer.total_size();
+
   if (tsize > ntodo) {
     tsize = ntodo;
   }
@@ -169,6 +171,7 @@ cluster_bump(ClusterHandler * ch, Cluste
   // current bucket + CLUSTER_BUMP_LENGTH
   //
   int new_bucket = (ch->cur_vcs + CLUSTER_BUMP_LENGTH) % CLUSTER_BUCKETS;
+
   if (ns == &vc->read) {
     if (this_bucket != CLUSTER_BUMP_NO_REMOVE) {
       ClusterVC_remove_read(vc);
@@ -232,9 +235,9 @@ clone_IOBufferBlockList(IOBufferBlock * 
   // of all block read_avail is 'n'.  The given source list
   // must contain at least 'n' read avail bytes.
   ////////////////////////////////////////////////////////////////
-  int nbytes = n;
-  int block_read_avail;
-  int bytes_to_skip = start_off;
+  int64_t nbytes = n;
+  int64_t block_read_avail;
+  int64_t bytes_to_skip = start_off;
   IOBufferBlock *bsrc = b;
   IOBufferBlock *bclone = 0;
   IOBufferBlock *bclone_head = 0;
@@ -287,10 +290,10 @@ clone_IOBufferBlockList(IOBufferBlock * 
 }
 
 IOBufferBlock *
-consume_IOBufferBlockList(IOBufferBlock * b, int n)
+consume_IOBufferBlockList(IOBufferBlock * b, int64_t n)
 {
   IOBufferBlock *b_remainder = 0;
-  int nbytes = n;
+  int64_t nbytes = n;
 
   while (b) {
     nbytes -= b->read_avail();
@@ -318,10 +321,11 @@ consume_IOBufferBlockList(IOBufferBlock 
   return b_remainder;           // return remaining blocks
 }
 
-int
-bytes_IOBufferBlockList(IOBufferBlock * b, int read_avail_bytes)
+int64_t
+bytes_IOBufferBlockList(IOBufferBlock * b, int64_t read_avail_bytes)
 {
-  int n = 0;;
+  int64_t n = 0;;
+
   while (b) {
     if (read_avail_bytes) {
       n += b->read_avail();

Modified: trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h (original)
+++ trafficserver/traffic/trunk/iocore/cluster/P_ClusterHandler.h Fri Jan  7 05:40:30 2011
@@ -47,7 +47,7 @@ struct ClusterCalloutContinuation:public
 
 struct ClusterControl: public Continuation
 {
-  int len;
+  int len; // TODO: Should this be 64-bit ?
   char size_index;
   int64_t *real_data;
   char *data;

Modified: trafficserver/traffic/trunk/iocore/cluster/P_ClusterInternal.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/P_ClusterInternal.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/P_ClusterInternal.h (original)
+++ trafficserver/traffic/trunk/iocore/cluster/P_ClusterInternal.h Fri Jan  7 05:40:30 2011
@@ -494,14 +494,14 @@ extern void cluster_raise_priority(Clust
 extern void cluster_schedule(ClusterHandler *, ClusterVConnection *, ClusterVConnState *);
 extern void cluster_reschedule(ClusterHandler *, ClusterVConnection *, ClusterVConnState *);
 extern void cluster_disable(ClusterHandler *, ClusterVConnection *, ClusterVConnState *);
-extern void cluster_update_priority(ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int, int);
+extern void cluster_update_priority(ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int64_t, int64_t);
 #define CLUSTER_BUMP_NO_REMOVE    -1
 extern void cluster_bump(ClusterHandler *, ClusterVConnectionBase *, ClusterVConnState *, int);
 extern int iov_memcpy(IOVec *, int, int, char *);
 
 extern IOBufferBlock *clone_IOBufferBlockList(IOBufferBlock *, int, int, IOBufferBlock **);
-extern IOBufferBlock *consume_IOBufferBlockList(IOBufferBlock *, int);
-extern int bytes_IOBufferBlockList(IOBufferBlock *, int);
+extern IOBufferBlock *consume_IOBufferBlockList(IOBufferBlock *, int64_t);
+extern int64_t bytes_IOBufferBlockList(IOBufferBlock *, int64_t);
 
 // ClusterVConnection declarations
 extern void clusterVCAllocator_free(ClusterVConnection * vc);

Modified: trafficserver/traffic/trunk/iocore/cluster/P_ClusterLib.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cluster/P_ClusterLib.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cluster/P_ClusterLib.h (original)
+++ trafficserver/traffic/trunk/iocore/cluster/P_ClusterLib.h Fri Jan  7 05:40:30 2011
@@ -39,7 +39,7 @@ extern void cluster_raise_priority(Clust
 extern void cluster_schedule(ClusterHandler *, ClusterVConnection *, ClusterVConnState *);
 extern void cluster_reschedule(ClusterHandler *, ClusterVConnection *, ClusterVConnState *);
 extern void cluster_disable(ClusterHandler *, ClusterVConnection *, ClusterVConnState *);
-extern void cluster_update_priority(ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int, int);
+extern void cluster_update_priority(ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int64_t, int64_t);
 extern void cluster_bump(ClusterHandler *, ClusterVConnectionBase *, ClusterVConnState *, int);
 extern int iov_memcpy(IOVec *, int, int, char *);
 

Modified: trafficserver/traffic/trunk/iocore/eventsystem/P_IOBuffer.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/P_IOBuffer.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/P_IOBuffer.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/P_IOBuffer.h Fri Jan  7 05:40:30 2011
@@ -39,7 +39,8 @@
 TS_INLINE int64_t
 buffer_size_to_index(int64_t size, int64_t max = max_iobuffer_size)
 {
-  int r = max;
+  int64_t r = max;
+
   while (r && BUFFER_SIZE_FOR_INDEX(r - 1) >= size)
     r--;
   return r;
@@ -609,6 +610,7 @@ IOBufferReader::block_count()
 {
   int count = 0;
   IOBufferBlock *b = block;
+
   while (b) {
     count++;
     b = b->next;
@@ -621,6 +623,7 @@ IOBufferReader::read_avail()
 {
   int64_t t = 0;
   IOBufferBlock *b = block;
+
   while (b) {
     t += b->read_avail();
     b = b->next;

Modified: trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h (original)
+++ trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h Fri Jan  7 05:40:30 2011
@@ -55,9 +55,6 @@ public:
 
   void destroy();
   int shouldDestroy();
-
-  int get_ntodo();
-  int get_ndone();
   /* Returns the b/w allocated to this UDP connection in Mbps */
   double get_allocatedBandwidth();
   /**

Modified: trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h (original)
+++ trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h Fri Jan  7 05:40:30 2011
@@ -56,14 +56,13 @@ public:
   void setArrivalTime(ink_hrtime t);
   IOBufferBlock *getIOBlockChain();
   void setReliabilityPkt();
-  int getPktLength();
+  int64_t getPktLength();
   /**
      Add IOBufferBlock (chain) to end of packet.
      @param block block chain to add.
 
    */
   inkcoreapi void append_block(IOBufferBlock * block);
-  char *asBuf(int *len = NULL);
   virtual void UDPPacket_is_abstract() = 0;
 
   struct sockaddr_in from;    // what address came from

Modified: trafficserver/traffic/trunk/iocore/net/NetVCTest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/NetVCTest.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/NetVCTest.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/NetVCTest.cc Fri Jan  7 05:40:30 2011
@@ -231,7 +231,7 @@ NetVCTest::consume_and_check_bytes(IOBuf
   }
 
   while (r->read_avail() > 0) {
-    int b_avail = r->block_read_avail();
+    int64_t b_avail = r->block_read_avail();
 
     tmp = (uint8_t *) r->start();
     end = tmp + b_avail;

Modified: trafficserver/traffic/trunk/iocore/net/P_UDPConnection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/P_UDPConnection.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/P_UDPConnection.h (original)
+++ trafficserver/traffic/trunk/iocore/net/P_UDPConnection.h Fri Jan  7 05:40:30 2011
@@ -125,18 +125,6 @@ UDPConnection::getBinding(struct sockadd
   return p->binding_valid;
 }
 
-TS_INLINE int
-UDPConnection::get_ndone()
-{
-  return ((UDPConnectionInternal *) this)->nBytesDone;
-}
-
-TS_INLINE int
-UDPConnection::get_ntodo()
-{
-  return ((UDPConnectionInternal *) this)->nBytesTodo;
-}
-
 // return the b/w allocated to this UDPConnection in Mbps
 TS_INLINE double
 UDPConnection::get_allocatedBandwidth()

Modified: trafficserver/traffic/trunk/iocore/net/P_UDPPacket.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/P_UDPPacket.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/P_UDPPacket.h (original)
+++ trafficserver/traffic/trunk/iocore/net/P_UDPPacket.h Fri Jan  7 05:40:30 2011
@@ -55,7 +55,7 @@ public:
   // packet scheduling stuff: keep it a doubly linked list
   uint64_t pktSendStartTime;
   uint64_t pktSendFinishTime;
-  uint32_t pktLength;
+  uint64_t pktLength;
 
   bool isReliabilityPkt;
 
@@ -79,20 +79,10 @@ inkcoreapi extern ClassAllocator<UDPPack
 
 TS_INLINE
 UDPPacketInternal::UDPPacketInternal()
-  : pktSendStartTime(0)
-  , pktSendFinishTime(0)
-  , pktLength(0)
-  , isReliabilityPkt(false)
-  , reqGenerationNum(0)
-  , delivery_time(0)
-  , arrival_time(0)
-  , cont(NULL)
-  , conn(NULL)
+  : pktSendStartTime(0), pktSendFinishTime(0), pktLength(0), isReliabilityPkt(false),
+    reqGenerationNum(0), delivery_time(0), arrival_time(0), cont(NULL) , conn(NULL)
 #if defined(PACKETQUEUE_IMPL_AS_PQLIST) || defined(PACKETQUEUE_IMPL_AS_RING)
-,
-in_the_priority_queue(0)
-  ,
-in_heap(0)
+  ,in_the_priority_queue(0), in_heap(0)
 #endif
 {
   memset(&from, '\0', sizeof(from));
@@ -152,20 +142,7 @@ UDPPacket::append_block(IOBufferBlock * 
   }
 }
 
-TS_INLINE char *
-UDPPacket::asBuf(int *len)
-{
-  UDPPacketInternal *p = (UDPPacketInternal *) this;
-  if (p->chain) {
-    if (len)
-      *len = p->chain->size();
-    return p->chain->start();
-  } else {
-    return NULL;
-  }
-}
-
-TS_INLINE int
+TS_INLINE int64_t
 UDPPacket::getPktLength()
 {
   UDPPacketInternal *p = (UDPPacketInternal *) this;

Modified: trafficserver/traffic/trunk/iocore/net/SSLNetVConnection.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/SSLNetVConnection.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/SSLNetVConnection.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/SSLNetVConnection.cc Fri Jan  7 05:40:30 2011
@@ -275,7 +275,7 @@ SSLNetVConnection::net_read_io(NetHandle
     break;
   case SSL_READ_ERROR:
     this->read.triggered = 0;
-    readSignalError(nh, r);
+    readSignalError(nh, (int)r);
     Debug("ssl", "read_from_net, read finished - read error");
     break;
   }
@@ -331,7 +331,7 @@ SSLNetVConnection::load_buffer_and_write
       return (total_wrote);
     }
   } else {
-    int err = SSL_get_error(ssl, r);
+    int err = SSL_get_error(ssl, (int)r);
 
     switch (err) {
     case SSL_ERROR_NONE:

Modified: trafficserver/traffic/trunk/iocore/net/UnixNetVConnection.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/UnixNetVConnection.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/UnixNetVConnection.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/UnixNetVConnection.cc Fri Jan  7 05:40:30 2011
@@ -309,7 +309,7 @@ read_from_net(NetHandler *nh, UnixNetVCo
         return;
       }
       vc->read.triggered = 0;
-      read_signal_error(nh, vc, -r);
+      read_signal_error(nh, vc, (int)-r);
       return;
     }
     NET_SUM_DYN_STAT(net_read_bytes_stat, r);
@@ -486,7 +486,7 @@ write_to_net_io(NetHandler *nh, UnixNetV
       return;
     }
     vc->write.triggered = 0;
-    write_signal_error(nh, vc, -r);
+    write_signal_error(nh, vc, (int)-r);
     return;
   } else {
     NET_SUM_DYN_STAT(net_write_bytes_stat, r);

Modified: trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc (original)
+++ trafficserver/traffic/trunk/iocore/net/UnixUDPNet.cc Fri Jan  7 05:40:30 2011
@@ -825,7 +825,7 @@ UDPQueue::service(UDPNetHandler * nh)
   ink_hrtime pktSendTime;
   double minPktSpacing;
   uint32_t pktSize;
-  int32_t pktLen;
+  int64_t pktLen;
   int i;
   bool addToGuaranteedQ;
   (void) nh;
@@ -969,7 +969,7 @@ UDPQueue::SendPackets()
   ink_hrtime send_threshold_time = now + SLOT_TIME;
   int32_t bytesThisSlot = INT_MAX, bytesUsed = 0, reliabilityBytes = 0;
   int32_t bytesThisPipe, sentOne, i;
-  int32_t pktLen;
+  int64_t pktLen;
   ink_hrtime timeDelta = 0;
 
   if (now > last_service)

Modified: trafficserver/traffic/trunk/iocore/utils/OneWayMultiTunnel.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/utils/OneWayMultiTunnel.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/utils/OneWayMultiTunnel.cc (original)
+++ trafficserver/traffic/trunk/iocore/utils/OneWayMultiTunnel.cc Fri Jan  7 05:40:30 2011
@@ -75,7 +75,7 @@ OneWayMultiTunnel::init(VConnection * vc
 
   n_connections = n_vioTargets + 1;
 
-  int size_index = 0;
+  int64_t size_index = 0;
   if (size_estimate)
     size_index = buffer_size_to_index(size_estimate, default_large_iobuffer_size);
   else

Modified: trafficserver/traffic/trunk/iocore/utils/OneWayTunnel.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/utils/OneWayTunnel.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/utils/OneWayTunnel.cc (original)
+++ trafficserver/traffic/trunk/iocore/utils/OneWayTunnel.cc Fri Jan  7 05:40:30 2011
@@ -50,8 +50,9 @@ transfer_data(MIOBufferAccessor & in_buf
 {
   ink_release_assert(!"Not Implemented.");
 
-  int n = in_buf.reader()->read_avail();
-  int o = out_buf.writer()->write_avail();
+  int64_t n = in_buf.reader()->read_avail();
+  int64_t o = out_buf.writer()->write_avail();
+
   if (n > o)
     n = o;
   if (!n)
@@ -132,7 +133,8 @@ OneWayTunnel::init(VConnection * vcSourc
 
   SET_HANDLER(&OneWayTunnel::startEvent);
 
-  int size_index = 0;
+  int64_t size_index = 0;
+
   if (size_estimate)
     size_index = buffer_size_to_index(size_estimate);
   else

Modified: trafficserver/traffic/trunk/lib/ts/ink_string.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/ts/ink_string.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/ts/ink_string.h (original)
+++ trafficserver/traffic/trunk/lib/ts/ink_string.h Fri Jan  7 05:40:30 2011
@@ -698,7 +698,7 @@ ptr_len_pbrk(const char *p1, int l1, con
 // On error, we'll return 0, and nothing is written to the buffer.
 // TODO: Do these really need to be inline?
 inline int
-ink_small_itoa(int32_t val, char* buf, int buf_len)
+ink_small_itoa(int val, char* buf, int buf_len)
 {
   ink_assert(buf_len > 5);
   ink_assert((val >= 0) && (val < 100000));
@@ -750,7 +750,7 @@ ink_fast_itoa(int32_t val, char* buf, in
     return (ret >= 0 ? ret : 0);
   }
 
-  return ink_small_itoa(val, buf, buf_len);
+  return ink_small_itoa((int)val, buf, buf_len);
 }
 
 inline int
@@ -762,7 +762,7 @@ ink_fast_uitoa(uint32_t val, char* buf, 
     return (ret >= 0 ? ret : 0);
   }
 
-  return ink_small_itoa(val, buf, buf_len);
+  return ink_small_itoa((int)val, buf, buf_len);
 }
 
 inline int
@@ -774,7 +774,7 @@ ink_fast_ltoa(int64_t val, char* buf, in
     return (ret >= 0 ? ret : 0);
   }
 
-  return ink_small_itoa(val, buf, buf_len);
+  return ink_small_itoa((int)val, buf, buf_len);
 }
 
 #endif

Modified: trafficserver/traffic/trunk/proxy/FetchSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/FetchSM.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/FetchSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/FetchSM.cc Fri Jan  7 05:40:30 2011
@@ -84,7 +84,7 @@ FetchSM::get_info_from_buffer(TSIOBuffer
     return ;
 
   read_avail = TSIOBufferReaderAvail(the_reader);
-  Debug(DEBUG_TAG, "[%s] total avail %d", __FUNCTION__, read_avail);
+  Debug(DEBUG_TAG, "[%s] total avail " PRId64 , __FUNCTION__, read_avail);
   //size_t hdr_size = _headers.size();
   //info = (char *) xmalloc(sizeof(char) * (read_avail+1) + hdr_size);
   info = (char *) xmalloc(sizeof(char) * (read_avail+1));
@@ -113,9 +113,10 @@ FetchSM::process_fetch_read(int event)
 {
 
   Debug(DEBUG_TAG, "[%s] I am here read", __FUNCTION__);
-  int bytes;
+  int64_t bytes;
   int bytes_used;
-  int actual_bytes_copied = 0;
+  int64_t actual_bytes_copied = 0;
+
   switch (event) {
   case TS_EVENT_VCONN_READ_READY:
     bytes = resp_reader->read_avail();

Modified: trafficserver/traffic/trunk/proxy/FetchSM.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/FetchSM.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/FetchSM.h (original)
+++ trafficserver/traffic/trunk/proxy/FetchSM.h Fri Jan  7 05:40:30 2011
@@ -82,7 +82,8 @@ private:
     else
     req_buffer->write(headers,length);
   }
-  int getReqLen()
+
+  int64_t getReqLen()
   {
     return req_reader->read_avail();
   }

Modified: trafficserver/traffic/trunk/proxy/ICP.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ICP.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ICP.cc (original)
+++ trafficserver/traffic/trunk/proxy/ICP.cc Fri Jan  7 05:40:30 2011
@@ -166,7 +166,7 @@ PluginFreshnessCalcFunc pluginFreshnessC
 
 // Static data declarations
 //Allocator *ICPHandlerCont::IncomingICPDataBuf;
-int ICPHandlerCont::ICPDataBuf_IOBuffer_sizeindex;
+int64_t ICPHandlerCont::ICPDataBuf_IOBuffer_sizeindex;
 static ClassAllocator <ICPPeerReadCont::PeerReadData>PeerReadDataAllocator("PeerReadDataAllocator");
 static ClassAllocator<ICPPeerReadCont> ICPPeerReadContAllocator("ICPPeerReadContAllocator");
 

Modified: trafficserver/traffic/trunk/proxy/ICP.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ICP.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ICP.h (original)
+++ trafficserver/traffic/trunk/proxy/ICP.h Fri Jan  7 05:40:30 2011
@@ -1024,10 +1024,7 @@ public:
 #define RECORD_ICP_STATE_CHANGE(x,y,z)
 #endif
 
-  // Static declarations
-  // replaced with IOBufferBlock allocator
-  //    static Allocator *IncomingICPDataBuf;
-  static int ICPDataBuf_IOBuffer_sizeindex;
+  static int64_t ICPDataBuf_IOBuffer_sizeindex;
 };
 
 //------------------------------------------------------------------

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Fri Jan  7 05:40:30 2011
@@ -803,8 +803,8 @@ FileImpl::fclose()
 int
 FileImpl::fread(void *buf, int length)
 {
-  int amount;
-  int err;
+  int64_t amount;
+  int64_t err;
 
   if ((m_mode != READ) || (m_fd == -1)) {
     return -1;
@@ -857,7 +857,7 @@ int
 FileImpl::fwrite(const void *buf, int length)
 {
   const char *p, *e;
-  int avail;
+  int64_t avail;
 
   if ((m_mode != WRITE) || (m_fd == -1)) {
     return -1;
@@ -1752,7 +1752,7 @@ _TSrealloc(void *ptr, size_t size, const
 
 // length has to be int64_t and not size_t, since -1 means to call strlen() to get length
 char *
-_TSstrdup(const char *str, int64_t length, const char *path)
+_TSstrdup(const char *str, int length, const char *path)
 {
   return _xstrdup(str, length, path);
 }
@@ -5810,7 +5810,7 @@ TSHttpCurrentIdleClientConnectionsGet(in
   HTTP_READ_DYN_SUM(http_current_active_client_connections_stat, active);
 
   if (total >= active) {
-    *num_connections = total - active;
+    *num_connections = (int)(total - active);
     return 1;
   }
   return 0;

Modified: trafficserver/traffic/trunk/proxy/InkAPITestTool.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITestTool.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITestTool.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITestTool.cc Fri Jan  7 05:40:30 2011
@@ -499,6 +499,7 @@ static int
 synclient_txn_send_request(ClientTxn * txn, char *request)
 {
   TSCont cont;
+
   TSAssert(txn->magic == MAGIC_ALIVE);
   txn->request = strdup(request);
   SET_TEST_HANDLER(txn->current_handler, synclient_txn_connect_handler);

Modified: trafficserver/traffic/trunk/proxy/MuxVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/MuxVC.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/MuxVC.cc (original)
+++ trafficserver/traffic/trunk/proxy/MuxVC.cc Fri Jan  7 05:40:30 2011
@@ -96,7 +96,7 @@ mux_move_data(MIOBuffer * copy_to, IOBuf
 
     while (left > 0) {
       char *block_start = from->start();
-      int block_avail = from->block_read_avail();
+      int64_t block_avail = from->block_read_avail();
       int act_on = MIN(block_avail, left);
       int r = copy_to->write(block_start, act_on);
       ink_debug_assert(r == act_on);
@@ -747,8 +747,8 @@ int
 MuxClientVC::process_byte_bank()
 {
 
-  int bank_avail = byte_bank_reader->read_avail();
-  int vio_todo = read_state.vio.ntodo();
+  int64_t bank_avail = byte_bank_reader->read_avail();
+  int64_t vio_todo = read_state.vio.ntodotodo();
   int act_on = MIN(bank_avail, vio_todo);
 
   if (act_on > 0) {
@@ -798,7 +798,7 @@ MuxClientVC::process_write()
 
     ink_debug_assert(!closed);
 
-    int ntodo = write_state.vio.ntodo();
+    int64_t ntodo = write_state.vio.ntodo();
     if (ntodo == 0 || write_state.shutdown) {
       write_state.enabled = 0;
       return 0;
@@ -1609,7 +1609,7 @@ MuxVC::process_read_msg_body()
             //   client's buffer
             int left_in_msg = current_msg_hdr.msg_len - read_msg_ndone;
             int act_on = MIN(avail, left_in_msg);
-            int vio_todo = client->read_state.vio.ntodo();
+            int64_t vio_todo = client->read_state.vio.ntodo();
 
             // If available bytes execeeds amount the I/O requested
             //   on the local side, tell the other side to stop sending

Modified: trafficserver/traffic/trunk/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.cc (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.cc Fri Jan  7 05:40:30 2011
@@ -93,7 +93,7 @@ setup_udp_header(char *header, uint32_t 
 }
 
 static inline void
-setup_object_header(char *header, uint32_t size, bool url_promise)
+setup_object_header(char *header, int64_t size, bool url_promise)
 {
   uint32_t *hdr = (uint32_t *) header;
   hdr[0] = htonl(size);
@@ -414,10 +414,12 @@ PrefetchTransform::handle_event(int even
           return 0;
         }
 
-        int towrite = m_write_vio.ntodo();
+        int64_t towrite = m_write_vio.ntodo();
+
         if (towrite > 0) {
           IOBufferReader *buf_reader = m_write_vio.get_reader();
-          int avail = buf_reader->read_avail();
+          int64_t avail = buf_reader->read_avail();
+
           if (towrite > avail) {
             towrite = avail;
           }
@@ -886,8 +888,7 @@ PrefetchUrlBlaster::udpUrlBlaster(int ev
         IOBufferBlock *block = buf->get_current_block();
         ink_assert(reader->read_avail() == block->read_avail());
         setup_udp_header(block->start(), get_udp_seq_no(), 0, true);
-        setup_object_header(block->start() + PRELOAD_UDP_HEADER_LEN,
-                            block->read_avail() - PRELOAD_UDP_HEADER_LEN, true);
+        setup_object_header(block->start() + PRELOAD_UDP_HEADER_LEN, block->read_avail() - PRELOAD_UDP_HEADER_LEN, true);
 
         struct sockaddr_in saddr;
         saddr.sin_family = AF_INET;
@@ -1465,11 +1466,11 @@ static int
 copy_header(MIOBuffer * buf, HTTPHdr * hdr, const char *hdr_tail)
 {
   //copy the http header into to the buffer
-  int done = 0;
-  int offset = 0;
+  int64_t done = 0;
+  int64_t offset = 0;
 
   while (!done) {
-    int block_len = buf->block_write_avail();
+    int64_t block_len = buf->block_write_avail();
     int index = 0, temp = offset;
 
     done = hdr->print(buf->end(), block_len, &index, &temp);
@@ -1606,7 +1607,6 @@ PrefetchBlaster::bufferObject(int event,
 int
 PrefetchBlaster::blastObject(int event, void *data)
 {
-
   switch (event) {
 
   case EVENT_IMMEDIATE:
@@ -1662,16 +1662,16 @@ PrefetchBlaster::blastObject(int event, 
       io_block->reset();
       io_block->fill(PRELOAD_UDP_HEADER_LEN);
 
-      int nread_avail = reader->read_avail();
+      int64_t nread_avail = reader->read_avail();
 
       if (nread_avail <= 0) {
         free();
         break;
       }
 
-      int nwrite_avail = io_block->write_avail();
+      int64_t nwrite_avail = io_block->write_avail();
 
-      int towrite = (nread_avail < nwrite_avail) ? nread_avail : nwrite_avail;
+      int64_t towrite = (nread_avail < nwrite_avail) ? nread_avail : nwrite_avail;
 
       reader->read(io_block->end(), towrite);
       io_block->fill(towrite);
@@ -1689,8 +1689,7 @@ PrefetchBlaster::blastObject(int event, 
       //saddr.sin_addr.s_addr = htonl((209<<24)|(131<<16)|(60<<8)|243);
       //saddr.sin_addr.s_addr = htonl((209<<24)|(131<<16)|(48<<8)|52);
 
-      udpNet.sendto_re(this, NULL, prefetch_udp_fd, (sockaddr *) & saddr,
-                       sizeof(saddr), io_block, io_block->read_avail());
+      udpNet.sendto_re(this, NULL, prefetch_udp_fd, (sockaddr *) & saddr, sizeof(saddr), io_block, io_block->read_avail());
     }
     break;
 
@@ -1976,7 +1975,8 @@ KeepAliveConnTable::ip_hash(unsigned int
 inline int
 KeepAliveConn::append(IOBufferReader * rdr)
 {
-  int size = rdr->read_avail();
+  int64_t size = rdr->read_avail();
+
   nbytes_added += size;
 
   buf->write(rdr);

Modified: trafficserver/traffic/trunk/proxy/Prefetch.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.h (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.h Fri Jan  7 05:40:30 2011
@@ -358,9 +358,8 @@ class KeepAliveConn: public Continuation
 public:
 
   KeepAliveConn()
-  :Continuation(), ip(0), nbytes_added(0)
-  {
-  };
+    : Continuation(), ip(0), nbytes_added(0)
+  { }
 
   int init(unsigned int ip, MIOBuffer * buf, IOBufferReader * reader);
   void free();
@@ -380,7 +379,7 @@ public:
 
   KeepAliveConn *next;
 
-  unsigned int nbytes_added;
+  int64_t nbytes_added;
 };
 
 class KeepAliveConnTable

Modified: trafficserver/traffic/trunk/proxy/SocksProxy.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/SocksProxy.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/SocksProxy.cc (original)
+++ trafficserver/traffic/trunk/proxy/SocksProxy.cc Fri Jan  7 05:40:30 2011
@@ -127,7 +127,7 @@ SocksProxy::mainEvent(int event, void *d
   unsigned char *p;
 
   VIO *vio;
-  int n_read_avail;
+  int64_t n_read_avail;
   //int n_consume;
 
   recursion++;

Modified: trafficserver/traffic/trunk/proxy/Stuffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Stuffer.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Stuffer.cc (original)
+++ trafficserver/traffic/trunk/proxy/Stuffer.cc Fri Jan  7 05:40:30 2011
@@ -152,7 +152,7 @@ ClassAllocator<Stuffer> stufferAllocator
 ClassAllocator<StufferCacheWriter> stufferCacheWriterAllocator("stufferCacheWriterAllocator");
 
 inline void
-StufferCacheWriter::init(Stuffer * s, int ntowrite)
+StufferCacheWriter::init(Stuffer * s, int64_t ntowrite)
 {
   mutex = s->mutex;
   SET_HANDLER(&StufferCacheWriter::mainEvent);
@@ -204,7 +204,7 @@ inline int
 Stuffer::processInitialData()
 {
   cur_ntodo = -1;
-  int nbytes_avail = reader->read_avail();
+  int64_t nbytes_avail = reader->read_avail();
 
   if (nbytes_avail < KEEPALIVE_LEN_BYTES + 3)
     return STUFFER_START;
@@ -427,7 +427,7 @@ StufferCacheWriter::mainEvent(int event,
       //Debug("stuffer_keepalive", "Writer got READ_COMPLETE");
       got_read_complete = 1;
 
-      int nread_avail = reader->read_avail();
+      int64_t nread_avail = reader->read_avail();
       ink_assert(nread_avail <= ntodo);
       ntodo = nread_avail;
 
@@ -558,7 +558,7 @@ int
 StufferCacheWriter::parseHeaders()
 {
   int ret = PARSE_CONT;
-  int nbytes_used;
+  int64_t nbytes_used;
 
   if (parse_state == PARSE_START) {
     http_info.create();

Modified: trafficserver/traffic/trunk/proxy/Stuffer.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Stuffer.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Stuffer.h (original)
+++ trafficserver/traffic/trunk/proxy/Stuffer.h Fri Jan  7 05:40:30 2011
@@ -95,13 +95,14 @@ class Stuffer:public Continuation
 
 public:
 
-    Stuffer():Continuation(), state(STUFFER_START), buf(0), source_vc(0),
-    cur_ntodo(0), cache_writer(0), active_cache_writers(0), active_cache_buffer(0)
-  {
-  };
+  Stuffer()
+    : Continuation(), state(STUFFER_START), buf(0), source_vc(0),
+      cur_ntodo(0), cache_writer(0), active_cache_writers(0), active_cache_buffer(0)
+  {  }
+
   ~Stuffer() {
     mutex = NULL;
-  };
+  }
 
   int init(NetVConnection * netvc)
   {
@@ -128,7 +129,7 @@ public:
   NetVConnection *source_vc;
   VIO *source_vio;
 
-  int cur_ntodo;
+  int64_t cur_ntodo;
 
   StufferCacheWriter *cache_writer;
   int active_cache_writers;
@@ -165,7 +166,7 @@ public:
     http_parser_init(&http_parser);
   };
 
-  void init(Stuffer * s, int ntodo);
+  void init(Stuffer * s, int64_t ntodo);
   void free();
   int addData(int max);
 
@@ -176,7 +177,7 @@ public:
   unsigned int object_id;
   MIOBuffer *buf;
   IOBufferReader *reader;
-  int ntodo;
+  int64_t ntodo;
   int nadded;
 
   int state;

Modified: trafficserver/traffic/trunk/proxy/Transform.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Transform.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Transform.cc (original)
+++ trafficserver/traffic/trunk/proxy/Transform.cc Fri Jan  7 05:40:30 2011
@@ -147,10 +147,10 @@ static inline void
 dump_buffer(IOBufferReader *reader)
 {
   IOBufferBlock *b = reader->get_current_block();
-  int offset = reader->start_offset;
+  int64_t offset = reader->start_offset;
   char *s, *e;
-  int avail;
-  int err;
+  int64_t avail;
+  int64_t err;
 
   while (b) {
     avail = b->read_avail();
@@ -221,7 +221,7 @@ TransformTerminus::handle_event(int even
         m_tvc->m_cont->handleEvent(TRANSFORM_READ_READY, (void *)(intptr_t)m_write_vio.nbytes);
       }
     } else {
-      int towrite;
+      int64_t towrite;
 
       MUTEX_TRY_LOCK(trylock1, m_write_vio.mutex, this_ethread());
       if (!trylock1) {
@@ -251,12 +251,6 @@ TransformTerminus::handle_event(int even
         }
 
         if (towrite > 0) {
-          if (is_debug_tag_set("transform_data")) {
-            printf("transform data start: %d", towrite);
-            dump_buffer(m_write_vio.get_reader());
-            printf("\ntransform data end\n");
-          }
-
           m_read_vio.get_writer()->write(m_write_vio.get_reader(), towrite);
           m_read_vio.ndone += towrite;
 
@@ -681,8 +675,8 @@ NullTransform::handle_event(int event, v
       break;
     case VC_EVENT_WRITE_READY:
     default:{
-        int towrite;
-        int avail;
+        int64_t towrite;
+        int64_t avail;
 
         ink_assert(m_output_vc != NULL);
 
@@ -781,7 +775,7 @@ TransformTest::run()
   -------------------------------------------------------------------------*/
 
 inline static int
-num_chars_for_int(int i)
+num_chars_for_int(int64_t i)
 {
   int k = 1;
 
@@ -1021,7 +1015,7 @@ void
 RangeTransform::transform_to_range()
 {
   IOBufferReader *reader = m_write_vio.get_reader();
-  int toskip, tosend, avail;
+  int64_t toskip, tosend, avail;
   const int64_t *end, *start;
   int64_t prev_end = 0;
   int64_t *done_byte;

Modified: trafficserver/traffic/trunk/proxy/Update.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Update.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Update.cc (original)
+++ trafficserver/traffic/trunk/proxy/Update.cc Fri Jan  7 05:40:30 2011
@@ -2665,7 +2665,7 @@ ObjectReloadCont::ObjectReloadEvent(int 
             _caller_cont->handleEvent(event, _receive_data_reader);
 
           } else {
-            int read_bytes = _receive_data_reader->read_avail();
+            int64_t read_bytes = _receive_data_reader->read_avail();
             _receive_data_reader->consume(read_bytes);
             _read_vio->reenable();
           }

Modified: trafficserver/traffic/trunk/proxy/hdrs/HTTP.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/HTTP.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/HTTP.h (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/HTTP.h Fri Jan  7 05:40:30 2011
@@ -772,23 +772,16 @@ HTTPVersion::operator <=(const HTTPVersi
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
-inline HTTPHdr::HTTPHdr()
-  : MIMEHdr()
-  , m_http(NULL)
-  , m_url_cached()
-  , m_target_cached(false)
-{
-}
+inline
+HTTPHdr::HTTPHdr()
+  : MIMEHdr(), m_http(NULL), m_url_cached(), m_target_cached(false)
+{ }
 
-/*-------------------------------------------------------------------------
-  -------------------------------------------------------------------------*/
 
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
-
 inline
-HTTPHdr::~
-HTTPHdr()
+HTTPHdr::~HTTPHdr()
 {                               /* nop */
 }
 

Modified: trafficserver/traffic/trunk/proxy/hdrs/HdrTSOnly.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/HdrTSOnly.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/HdrTSOnly.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/HdrTSOnly.cc Fri Jan  7 05:40:30 2011
@@ -61,7 +61,7 @@ HTTPHdr::parse_req(HTTPParser * parser, 
 
 
   do {
-    int b_avail = r->block_read_avail();
+    int64_t b_avail = r->block_read_avail();
 
     if (b_avail <= 0 && eof == false) {
       break;
@@ -102,7 +102,7 @@ HTTPHdr::parse_resp(HTTPParser * parser,
   *bytes_used = 0;
 
   do {
-    int b_avail = r->block_read_avail();
+    int64_t b_avail = r->block_read_avail();
 
     if (b_avail <= 0 && eof == false) {
       break;

Modified: trafficserver/traffic/trunk/proxy/hdrs/MIME.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/MIME.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/MIME.h (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/MIME.h Fri Jan  7 05:40:30 2011
@@ -1252,7 +1252,7 @@ MIMEHdr::field_value_set_uint(MIMEField 
 inline void
 MIMEHdr::field_value_set_int64(MIMEField * field, int64_t value)
 {
-  field->value_set_uint(m_heap, m_mime, value);
+  field->value_set_uint(m_heap, m_mime, (uint32_t)value);
 }
 
 inline void

Modified: trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Fri Jan  7 05:40:30 2011
@@ -859,7 +859,8 @@ HttpSM::state_drain_client_request_body(
   case VC_EVENT_READ_COMPLETE:
     {
       // We've finished draing the POST body
-      int avail = ua_buffer_reader->read_avail();
+      int64_t avail = ua_buffer_reader->read_avail();
+
       ua_buffer_reader->consume(avail);
       client_request_body_bytes += avail;
       ink_debug_assert(client_request_body_bytes == t_state.hdr_info.request_content_length);
@@ -985,8 +986,9 @@ HttpSM::state_read_push_response_header(
   ink_assert(ua_entry->read_vio == (VIO *) data);
   ink_assert(t_state.current.server == NULL);
 
-  int data_size = 0;
-  int bytes_used = 0;
+  int64_t data_size = 0;
+  int64_t  bytes_used = 0;
+
   // Not used here.
   //bool parse_error = false;
   //VIO* vio = (VIO*) data;
@@ -3009,7 +3011,7 @@ HttpSM::is_bg_fill_necessary(HttpTunnelC
     int64_t ua_cl = t_state.hdr_info.client_response.get_content_length();
 
     if (ua_cl > 0) {
-      int ua_body_done = c->bytes_written - client_response_hdr_bytes;
+      int64_t ua_body_done = c->bytes_written - client_response_hdr_bytes;
       float pDone = (float) ua_body_done / ua_cl;
 
       // If we got a good content lenght.  Check to make sure that we haven't already
@@ -4886,7 +4888,7 @@ HttpSM::do_setup_post_tunnel(HttpVC_t to
     post_redirect = true;
     //copy the post data into a new producer buffer for static producer
     tunnel.postbuf->postdata_producer_buffer->write(tunnel.postbuf->postdata_copy_buffer_start);
-    int post_bytes = tunnel.postbuf->postdata_producer_reader->read_avail();
+    int64_t post_bytes = tunnel.postbuf->postdata_producer_reader->read_avail();
     transfered_bytes = post_bytes;
     p = tunnel.add_producer(HTTP_TUNNEL_STATIC_PRODUCER,
                             post_bytes,
@@ -4918,8 +4920,7 @@ HttpSM::do_setup_post_tunnel(HttpVC_t to
     //  header buffer into new buffer
     //
 
-    client_request_body_bytes =
-      post_buffer->write(ua_buffer_reader, chunked ? ua_buffer_reader->read_avail() : post_bytes);
+    client_request_body_bytes = post_buffer->write(ua_buffer_reader, chunked ? ua_buffer_reader->read_avail() : post_bytes);
     ua_buffer_reader->consume(client_request_body_bytes);
     p = tunnel.add_producer(ua_entry->vc,
                             post_bytes - transfered_bytes,
@@ -5583,7 +5584,7 @@ int
 HttpSM::find_http_resp_buffer_size(int64_t content_length)
 {
   int64_t buf_size;
-  int alloc_index;
+  int64_t alloc_index;
 
   if (content_length == HTTP_UNDEFINED_CL) {
     // Try use our configured default size.  Otherwise pick
@@ -5903,7 +5904,7 @@ HttpSM::setup_push_transfer_to_cache()
     // The ua has shutdown on us already so the only data
     //  we'll get is already in the buffer.  Make sure it
     //  fullfills the stated lenght
-    int avail = ua_buffer_reader->read_avail();
+    int64_t avail = ua_buffer_reader->read_avail();
 
     if (avail < nbytes) {
       // Client failed to send the body, it's gone.  Kill the

Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Fri Jan  7 05:40:30 2011
@@ -8735,8 +8735,8 @@ HttpTransact::update_size_and_time_stats
   switch (s->state_machine->background_fill) {
   case BACKGROUND_FILL_COMPLETED:
     {
-      int bg_size = origin_server_response_body_size - user_agent_response_body_size;
-      bg_size = max(0, bg_size);
+      int64_t bg_size = origin_server_response_body_size - user_agent_response_body_size;
+      bg_size = max((int64_t)0, bg_size);
       HTTP_SUM_TRANS_STAT(http_background_fill_bytes_completed_stat, bg_size);
       break;
     }
@@ -8971,6 +8971,7 @@ HttpTransact::is_connection_collapse_che
   bool match = true;
   URL *url = s->hdr_info.client_request.url_get();
   int rww_enabled = 0;
+
   TS_ReadConfigInteger(rww_enabled, "proxy.config.cache.enable_read_while_writer");
   match &= (url->scheme_get_wksidx() == URL_WKSIDX_HTTP);
   match &= HttpConfig::m_master.hashtable_enabled;

Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.h?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.h Fri Jan  7 05:40:30 2011
@@ -959,8 +959,8 @@ public:
     char *internal_msg_buffer;  // out
     char *internal_msg_buffer_type;     // out
     int64_t internal_msg_buffer_size;       // out
-    int internal_msg_buffer_fast_allocator_size;
-    int internal_msg_buffer_index;      // out
+    int64_t internal_msg_buffer_fast_allocator_size;
+    int64_t internal_msg_buffer_index;      // out
 
     bool icp_lookup_success;    // in
     struct sockaddr_in icp_ip_result;   // in

Modified: trafficserver/traffic/trunk/proxy/http2/HttpTunnel.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTunnel.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTunnel.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTunnel.cc Fri Jan  7 05:40:30 2011
@@ -381,6 +381,7 @@ bool ChunkedHandler::generate_chunked_co
   }
 
   while (dechunked_reader->read_avail() > 0 && state != CHUNK_WRITE_DONE) {
+    // TODO: Should this be 64-bit?
     int write_val = MIN(max_chunk_size, dechunked_reader->read_avail());
 
     // If the server is still alive, check to see if too much data is
@@ -1509,7 +1510,7 @@ HttpTunnel::copy_partial_post_data()
 void
 HttpTunnel::allocate_redirect_postdata_producer_buffer()
 {
-  int alloc_index = buffer_size_to_index(sm->t_state.hdr_info.request_content_length);
+  int64_t alloc_index = buffer_size_to_index(sm->t_state.hdr_info.request_content_length);
 
   ink_release_assert(postbuf->postdata_producer_buffer == NULL);
 
@@ -1522,7 +1523,7 @@ HttpTunnel::allocate_redirect_postdata_p
 void
 HttpTunnel::allocate_redirect_postdata_buffers(IOBufferReader * ua_reader)
 {
-  int alloc_index = buffer_size_to_index(sm->t_state.hdr_info.request_content_length);
+  int64_t alloc_index = buffer_size_to_index(sm->t_state.hdr_info.request_content_length);
 
   Debug("http_redirect", "[HttpTunnel::allocate_postdata_buffers]");
 

Modified: trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc Fri Jan  7 05:40:30 2011
@@ -278,8 +278,8 @@ LogCollationClientSM::client_auth(int ev
   case VC_EVENT_ERROR:
     {
       Debug("log-coll", "[%d]client::client_auth - EOS|ERROR", m_id);
+      int64_t read_avail = m_auth_reader->read_avail();
 
-      int read_avail = m_auth_reader->read_avail();
       if (read_avail > 0) {
         Debug("log-coll", "[%d]client::client_auth - consuming unsent data", m_id);
         m_auth_reader->consume(read_avail);
@@ -727,8 +727,8 @@ LogCollationClientSM::client_send(int ev
   case VC_EVENT_ERROR:
     {
       Debug("log-coll", "[%d]client::client_send - EOS|ERROR", m_id);
+      int64_t read_avail = m_send_reader->read_avail();
 
-      int read_avail = m_send_reader->read_avail();
       if (read_avail > 0) {
         Debug("log-coll", "[%d]client::client_send - consuming unsent data", m_id);
         m_send_reader->consume(read_avail);

Modified: trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc Fri Jan  7 05:40:30 2011
@@ -521,8 +521,9 @@ LogCollationHostSM::read_partial(VIO * v
 
   // careful not to read more than we have memory for
   char *p = &(m_read_buffer[m_read_bytes_received]);
-  int bytes_wanted_now = m_read_bytes_wanted - m_read_bytes_received;
-  int bytes_received_now = m_client_reader->read(p, bytes_wanted_now);
+  int64_t bytes_wanted_now = m_read_bytes_wanted - m_read_bytes_received;
+  int64_t bytes_received_now = m_client_reader->read(p, bytes_wanted_now);
+
   m_read_bytes_received += bytes_received_now;
 
   // stats

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc Fri Jan  7 05:40:30 2011
@@ -106,7 +106,8 @@ readHTTPResponse(int sock, char *buffer,
     return INK_ERR_OKAY;
   }
 #else
-  int err, idx;
+  int64_t err, idx;
+
   idx = 0;
   for (;;) {
     //      printf("%d\n", idx);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Fri Jan  7 05:40:30 2011
@@ -945,7 +945,7 @@ test_port(int port, const char *request,
   int64_t start_time, timeout;
   int sock;
   size_t length = strlen(request);
-  int err, idx;
+  int64_t err, idx;
 
   start_time = milliseconds();
 

Modified: trafficserver/traffic/trunk/test/deft/sio_buffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/deft/sio_buffer.cc?rev=1056194&r1=1056193&r2=1056194&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/deft/sio_buffer.cc (original)
+++ trafficserver/traffic/trunk/test/deft/sio_buffer.cc Fri Jan  7 05:40:30 2011
@@ -71,9 +71,9 @@ sio_buffer::~sio_buffer()
 int
 sio_buffer::expand_to(int size)
 {
-
   // Check to see if we've already got enough space
   int wavail = write_avail();
+
   if (wavail >= size) {
     return wavail;
   }
@@ -120,7 +120,6 @@ sio_buffer::end()
 int
 sio_buffer::fill(const char *data, int data_len)
 {
-
   ink_debug_assert(data_len >= 0);
 
   if (data_len <= 0) {
@@ -140,6 +139,7 @@ int
 sio_buffer::fill(int n)
 {
   int wavail = write_avail();
+
   ink_debug_assert(n <= wavail);
   data_end += n;
   return n;
@@ -149,6 +149,7 @@ int
 sio_buffer::read_avail()
 {
   int r = data_end - data_start;
+
   ink_debug_assert(r >= 0);
   return r;
 }
@@ -157,6 +158,7 @@ int
 sio_buffer::write_avail()
 {
   int r = raw_end - data_end;
+
   ink_debug_assert(r >= 0);
   return r;
 }
@@ -171,6 +173,7 @@ void
 sio_buffer::consume(int n)
 {
   int ravail = read_avail();
+
   ink_debug_assert(n <= ravail);
 
   if (n > ravail) {
@@ -184,10 +187,9 @@ sio_buffer::consume(int n)
 char *
 sio_buffer::memchr(int c, int len, int offset)
 {
-
   int ravail = read_avail();
-  ink_debug_assert((len == INT_MAX && offset <= ravail) || len <= ravail - offset);
 
+  ink_debug_assert((len == INT_MAX && offset <= ravail) || len <= ravail - offset);
   if (offset > ravail) {
     return NULL;
   }
@@ -204,7 +206,6 @@ sio_buffer::memchr(int c, int len, int o
 int
 sio_buffer::read(char *buf, int len)
 {
-
   int to_read = read_avail();
   if (len < to_read) {
     to_read = len;
@@ -219,8 +220,8 @@ char *
 sio_buffer::memcpy(char *buf, int len, int offset)
 {
   int ravail = offset;
-  ink_debug_assert(offset <= ravail);
 
+  ink_debug_assert(offset <= ravail);
   if (len == INT_MAX) {
     len = ravail - offset;
   } else if (len > ravail - offset) {



Mime
View raw message