trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject svn commit: r834757 [2/2] - in /incubator/trafficserver/traffic/trunk: ./ iocore/aio/ iocore/cache/ iocore/cluster/ iocore/dns/ iocore/eventsystem/ iocore/hostdb/ iocore/net/ libinktomi++/ librecords/ m4/ proxy/ proxy/api/include/ proxy/congest/ proxy/...
Date Wed, 11 Nov 2009 03:54:43 GMT
Modified: incubator/trafficserver/traffic/trunk/proxy/ICP.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/ICP.h?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/ICP.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/ICP.h Wed Nov 11 03:54:42 2009
@@ -511,7 +511,7 @@
   virtual struct in_addr *GetIP() = 0;
   virtual int GetPort() = 0;
   virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, struct sockaddr_in
*to) = 0;
-  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr
*, int *) = 0;
+  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr
*, socklen_t *) = 0;
   virtual int GetRecvFD() = 0;
   virtual int GetSendFD() = 0;
   virtual int ExpectedReplies(BitMap *) = 0;
@@ -570,7 +570,7 @@
   // this is for delayed I/O
   Ptr<IOBufferBlock> buf;
   struct sockaddr_in fromaddr;
-  int fromaddrlen;
+  socklen_t fromaddrlen;
   int notFirstRead;             // priming the reads
   Action *readAction;           // outstanding read
   Action *writeAction;          // outstanding write
@@ -617,7 +617,7 @@
   virtual struct in_addr *GetIP();
   virtual int GetPort();
   virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, struct sockaddr_in
*to);
-  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr
*, int *);
+  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr
*, socklen_t *);
   virtual int GetRecvFD();
   virtual int GetSendFD();
   virtual int ExpectedReplies(BitMap *);
@@ -668,7 +668,7 @@
   virtual struct in_addr *GetIP();
   virtual int GetPort();
   virtual Action *SendMsg_re(Continuation *, void *, struct msghdr *, struct sockaddr_in
*to);
-  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr
*, int *);
+  virtual Action *RecvFrom_re(Continuation *, void *, IOBufferBlock *, int, struct sockaddr
*, socklen_t *);
   virtual int GetRecvFD();
   virtual int GetSendFD();
   virtual int ExpectedReplies(BitMap *);

Modified: incubator/trafficserver/traffic/trunk/proxy/ICPConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/ICPConfig.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/ICPConfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/ICPConfig.cc Wed Nov 11 03:54:42 2009
@@ -895,7 +895,7 @@
 
 Action *
 ParentSiblingPeer::RecvFrom_re(Continuation * cont, void *token,
-                               IOBufferBlock * bufblock, int size, struct sockaddr * from,
int *fromlen)
+                               IOBufferBlock * bufblock, int size, struct sockaddr * from,
socklen_t *fromlen)
 {
   // Note: All receives are funneled through the local peer UDP socket.
 
@@ -1047,7 +1047,7 @@
 
 Action *
 MultiCastPeer::RecvFrom_re(Continuation * cont, void *token,
-                           IOBufferBlock * bufblock, int len, struct sockaddr * from, int
*fromlen)
+                           IOBufferBlock * bufblock, int len, struct sockaddr * from, socklen_t
*fromlen)
 {
   Action *a = udpNet.recvfrom_re(cont, token,
                                  _recv_chan.fd, from, fromlen,

Modified: incubator/trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/InkAPI.cc Wed Nov 11 03:54:42 2009
@@ -3366,9 +3366,9 @@
 
     if (field_handle->field_ptr->m_ptr_name == NULL) {
       char noname[20];
-      inku32 addr32 = (inku32) (field_handle->field_ptr);
-      snprintf(noname, sizeof(noname), "@X-Noname-%08X", addr32);
-      INKMimeFieldNameSet(bufp, field_mloc, noname, 18);
+      intptr_t addr = (intptr_t) (field_handle->field_ptr);
+      snprintf(noname, sizeof(noname), "@X-Noname-%016llX", (ink64)addr);
+      INKMimeFieldNameSet(bufp, field_mloc, noname, 26);
     }
 
     mime_hdr_field_attach(mh, field_handle->field_ptr, 1, NULL);
@@ -6245,12 +6245,12 @@
         return 0;
       }
 
-      INK32 *rptr = (INK32 *) data;
+      intptr_t *rptr = (intptr_t *) data;
 
       if (sm->t_state.api_info.logging_enabled) {
-        *rptr = (INK32) INK_HTTP_CNTL_ON;
+        *rptr = (intptr_t) INK_HTTP_CNTL_ON;
       } else {
-        *rptr = (INK32) INK_HTTP_CNTL_OFF;
+        *rptr = (intptr_t) INK_HTTP_CNTL_OFF;
       }
 
       return 1;
@@ -6271,12 +6271,12 @@
         return 0;
       }
 
-      INK32 *rptr = (INK32 *) data;
+      intptr_t *rptr = (intptr_t *) data;
 
       if (sm->t_state.api_info.retry_intercept_failures) {
-        *rptr = (INK32) INK_HTTP_CNTL_ON;
+        *rptr = (intptr_t) INK_HTTP_CNTL_ON;
       } else {
-        *rptr = (INK32) INK_HTTP_CNTL_OFF;
+        *rptr = (intptr_t) INK_HTTP_CNTL_OFF;
       }
 
       return 1;

Modified: incubator/trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/InkAPITest.cc Wed Nov 11 03:54:42 2009
@@ -454,7 +454,7 @@
 
   case INK_EVENT_CACHE_OPEN_WRITE_FAILED:
     Debug(UTDBG_TAG "_cache_event", "INK_EVENT_CACHE_OPEN_WRITE_FAILED %d %p", event, data);
-    SDK_RPRINT(SDK_Cache_test, "INKCacheWrite", "TestCase1", TC_FAIL, "can't open cache vc,
edtata = %d", (int) data);
+    SDK_RPRINT(SDK_Cache_test, "INKCacheWrite", "TestCase1", TC_FAIL, "can't open cache vc,
edtata = %p", data);
     INKReleaseAssert(!"cache");
 
     // no need to continue, return
@@ -879,7 +879,8 @@
   char cmp_buffer[BUFSIZ];
   struct stat stat_buffer_pre, stat_buffer_post, stat_buffer_input;
   char *ret_val;
-  int error_counter = 0, read = 0, wrote = 0, read_amount = 0;
+  int error_counter = 0, read = 0, wrote = 0;
+  off_t read_amount = 0;
   const char *install_dir;
   char INPUT_TEXT_FILE[] = "plugin.config";
   char input_file_full_path[BUFSIZ];
@@ -952,7 +953,7 @@
     return;
   }
 
-  read_amount = (stat_buffer_input.st_size <= sizeof(input_buffer)) ?
+  read_amount = (stat_buffer_input.st_size <= (off_t)sizeof(input_buffer)) ?
     (stat_buffer_input.st_size) : (sizeof(input_buffer));
 
   // INKfgets
@@ -1061,7 +1062,7 @@
     return;
   }
 
-  read_amount = (stat_buffer_input.st_size <= sizeof(cmp_buffer)) ? (stat_buffer_input.st_size)
: (sizeof(cmp_buffer));
+  read_amount = (stat_buffer_input.st_size <= (off_t)sizeof(cmp_buffer)) ? (stat_buffer_input.st_size)
: (sizeof(cmp_buffer));
 
   // INKfread on read file 
   read = INKfread(cmp_read_file, cmp_buffer, read_amount);

Modified: incubator/trafficserver/traffic/trunk/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/Prefetch.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/Prefetch.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/Prefetch.cc Wed Nov 11 03:54:42 2009
@@ -913,7 +913,7 @@
     }
 
   case NET_EVENT_DATAGRAM_WRITE_ERROR:
-    Debug("PrefetchBlaster", "Error in sending the url list on UDP (%d)", (int) data);
+    Debug("PrefetchBlaster", "Error in sending the url list on UDP (%p)", data);
   case NET_EVENT_DATAGRAM_WRITE_COMPLETE:
     free();
     break;
@@ -1705,7 +1705,7 @@
     break;
 
   case NET_EVENT_DATAGRAM_WRITE_ERROR:
-    Debug("PrefetchBlaster", "error in sending the udp data %d", (int) data);
+    Debug("PrefetchBlaster", "error in sending the udp data %p", data);
 
   default:
     ink_assert(!"unexpected event");

Modified: incubator/trafficserver/traffic/trunk/proxy/api/include/InkAPIPrivate.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/api/include/InkAPIPrivate.h?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/api/include/InkAPIPrivate.h (original)
+++ incubator/trafficserver/traffic/trunk/proxy/api/include/InkAPIPrivate.h Wed Nov 11 03:54:42
2009
@@ -82,7 +82,11 @@
 
 #define INK_HTTP_CNTL_OFF  (void*) 0
 #define INK_HTTP_CNTL_ON   (void*) 1
-
+/* usage: 
+   void *onoff = 0;
+   INKHttpTxnCntl(.., INK_HTTP_CNTL_GET_LOGGING_MODE, &onoff);
+   if (onoff == INK_HTTP_CNTL_ON) ....
+*/
   inkapi int INKHttpTxnCntl(INKHttpTxn txnp, INKHttpCntlType cntl, void *data);
 
 /* Protocols APIs */

Modified: incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/congest/CongestionDB.cc Wed Nov 11 03:54:42
2009
@@ -159,7 +159,7 @@
   ink_assert(tablesize > 0);
   todo_lists = new InkAtomicList[MT_HASHTABLE_PARTITIONS];
   for (int i = 0; i < MT_HASHTABLE_PARTITIONS; i++) {
-    ink_atomiclist_init(&todo_lists[i], "cong_todo_list", (unsigned) &((CongestRequestParam
*) 0)->link);
+    ink_atomiclist_init(&todo_lists[i], "cong_todo_list", (uintptr_t) &((CongestRequestParam
*) 0)->link);
   }
 }
 

Modified: incubator/trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/congest/CongestionTest.cc Wed Nov 11 03:54:42
2009
@@ -252,7 +252,7 @@
   clear_events();
 
   failEvents = new InkAtomicList;
-  ink_atomiclist_init(failEvents, "failEvents", (unsigned) &((CCFailHistoryTestCont::FailEvents
*) 0)->link);
+  ink_atomiclist_init(failEvents, "failEvents", (uintptr_t) &((CCFailHistoryTestCont::FailEvents
*) 0)->link);
 
   int i, j;
   CCFailHistoryTestCont::FailEvents * new_event = NULL;

Modified: incubator/trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc Wed Nov 11 03:54:42
2009
@@ -422,7 +422,7 @@
 void *
 dns_udp_receiver(void *varg)
 {
-  int port = (int) varg;
+  int port = (int)(intptr_t) varg;
 
   char *pkt_buf = (char *) xmalloc(MAX_DNS_PACKET_LEN);
 

Modified: incubator/trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc Wed Nov 11 03:54:42 2009
@@ -2019,7 +2019,7 @@
   ink_assert(alt->m_writeable == 0);
   len -= HTTP_ALT_MARSHAL_SIZE;
 
-  HdrHeap *heap = (HdrHeap *) (alt->m_request_hdr.m_heap ? (buf + (int) alt->m_request_hdr.m_heap)
: 0);
+  HdrHeap *heap = (HdrHeap *) (alt->m_request_hdr.m_heap ? (buf + (intptr_t) alt->m_request_hdr.m_heap)
: 0);
   HTTPHdrImpl *hh = NULL;
   int tmp;
   if (heap != NULL) {
@@ -2036,7 +2036,7 @@
     alt->m_request_hdr.m_url_cached.m_heap = heap;
   }
 
-  heap = (HdrHeap *) (alt->m_response_hdr.m_heap ? (buf + (int) alt->m_response_hdr.m_heap)
: 0);
+  heap = (HdrHeap *) (alt->m_response_hdr.m_heap ? (buf + (intptr_t) alt->m_response_hdr.m_heap)
: 0);
   if (heap != NULL) {
     tmp = heap->unmarshal(len, HDR_HEAP_OBJ_HTTP_HEADER, (HdrHeapObjImpl **) & hh,
block_ref);
     if (hh == NULL || tmp < 0) {
@@ -2080,11 +2080,11 @@
     return false;
   }
 
-  if ((int) alt->m_request_hdr.m_heap > len) {
+  if ((intptr_t) alt->m_request_hdr.m_heap > len) {
     return false;
   }
 
-  HdrHeap *heap = (HdrHeap *) (buf + (int) alt->m_request_hdr.m_heap);
+  HdrHeap *heap = (HdrHeap *) (buf + (intptr_t) alt->m_request_hdr.m_heap);
   if (heap->check_marshalled(len) == false) {
     return false;
   }
@@ -2093,11 +2093,11 @@
     return false;
   }
 
-  if ((int) alt->m_response_hdr.m_heap > len) {
+  if ((intptr_t) alt->m_response_hdr.m_heap > len) {
     return false;
   }
 
-  heap = (HdrHeap *) (buf + (int) alt->m_response_hdr.m_heap);
+  heap = (HdrHeap *) (buf + (intptr_t) alt->m_response_hdr.m_heap);
   if (heap->check_marshalled(len) == false) {
     return false;
   }

Modified: incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrHeap.cc Wed Nov 11 03:54:42 2009
@@ -925,9 +925,9 @@
   ink_assert(m_free_start == NULL);
 
   // Convert Heap offsets to pointers
-  m_data_start = ((char *) this) + (int) m_data_start;
+  m_data_start = ((char *) this) + (intptr_t) m_data_start;
   m_free_start = ((char *) this) + m_size;
-  m_ronly_heap[0].m_heap_start = ((char *) this) + (int) m_ronly_heap[0].m_heap_start;
+  m_ronly_heap[0].m_heap_start = ((char *) this) + (intptr_t) m_ronly_heap[0].m_heap_start;
 
   // Crazy Invarient - If we are sitting in a ref counted block,
   //   the HdrHeap lifetime is externally determined.  Whoever
@@ -974,7 +974,7 @@
     default:
       fprintf(stderr,
               "WARNING: Unmarshal failed due to unknow obj type %d after %d bytes",
-              (int) obj->m_type, obj_data - (char *) this);
+              (int) obj->m_type, (int)(obj_data - (char *) this));
       dump_heap(unmarshal_size);
       return -1;
     }

Modified: incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrTest.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrTest.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrTest.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/hdrs/HdrTest.cc Wed Nov 11 03:54:42 2009
@@ -631,7 +631,7 @@
     ret = req_hdr.parse_req(&parser, &start, end, true);
     bytes_consumed = (int) (start - orig_start);
 
-    printf("======== test %d (length=%d, consumed=%d)\n", i, strlen(tests[i].msg), bytes_consumed);
+    printf("======== test %d (length=%d, consumed=%d)\n", i, (int)strlen(tests[i].msg), bytes_consumed);
     printf("[%s]\n", tests[i].msg);
     printf("\n[");
     req_hdr.print(NULL, 0, NULL, NULL);
@@ -696,7 +696,7 @@
 
     /*** (2) print out the request ***/
 
-  printf("======== real request (length=%d)\n\n", strlen(request));
+  printf("======== real request (length=%d)\n\n", (int)strlen(request));
   printf("%s\n", request);
 
   printf("\n[");
@@ -731,7 +731,7 @@
 
     /*** (4) print out the response ***/
 
-  printf("\n======== real response (length=%d)\n\n", strlen(response));
+  printf("\n======== real response (length=%d)\n\n", (int)strlen(response));
   printf("%s\n", response);
 
   printf("\n[");
@@ -1090,8 +1090,8 @@
 
   if (comp_str) {
     printf("FAILED: (test #%d) copy & compare: %s\n", testnum, comp_str);
-    printf("REQ:\n[%.*s]\n", strlen(request), request);
-    printf("RESP  :\n[%.*s]\n", strlen(response), response);
+    printf("REQ:\n[%.*s]\n", (int)strlen(request), request);
+    printf("RESP  :\n[%.*s]\n", (int)strlen(response), response);
     return (0);
   } else {
     return (1);
@@ -1162,10 +1162,10 @@
 
   if (((size_t) prt_bufindex != strlen(request_tgt)) || ((size_t) cpy_bufindex != strlen(request_tgt)))
{
     printf("FAILED: (test #%d) print req output size mismatch --- tgt=%d, prt_bufsize=%d,
cpy_bufsize=%d\n",
-           testnum, strlen(request_tgt), prt_bufindex, cpy_bufindex);
+           testnum, (int)strlen(request_tgt), prt_bufindex, cpy_bufindex);
 
-    printf("ORIGINAL:\n[%.*s]\n", strlen(request), request);
-    printf("TARGET  :\n[%.*s]\n", strlen(request_tgt), request_tgt);
+    printf("ORIGINAL:\n[%.*s]\n", (int)strlen(request), request);
+    printf("TARGET  :\n[%.*s]\n", (int)strlen(request_tgt), request_tgt);
     printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
     printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
     return (0);
@@ -1174,8 +1174,8 @@
   if ((strncasecmp(request_tgt, prt_buf, strlen(request_tgt)) != 0) ||
       (strncasecmp(request_tgt, cpy_buf, strlen(request_tgt)) != 0)) {
     printf("FAILED: (test #%d) print req output mismatch\n", testnum);
-    printf("ORIGINAL:\n[%.*s]\n", strlen(request), request);
-    printf("TARGET  :\n[%.*s]\n", strlen(request_tgt), request_tgt);
+    printf("ORIGINAL:\n[%.*s]\n", (int)strlen(request), request);
+    printf("TARGET  :\n[%.*s]\n", (int)strlen(request_tgt), request_tgt);
     printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
     printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
     return (0);
@@ -1224,9 +1224,9 @@
 
   if (((size_t) prt_bufindex != strlen(response_tgt)) || ((size_t) cpy_bufindex != strlen(response_tgt)))
{
     printf("FAILED: (test #%d) print rsp output size mismatch --- tgt=%d, prt_bufsize=%d,
cpy_bufsize=%d\n",
-           testnum, strlen(response_tgt), prt_bufindex, cpy_bufindex);
-    printf("ORIGINAL:\n[%.*s]\n", strlen(response), response);
-    printf("TARGET  :\n[%.*s]\n", strlen(response_tgt), response_tgt);
+           testnum, (int)strlen(response_tgt), prt_bufindex, cpy_bufindex);
+    printf("ORIGINAL:\n[%.*s]\n", (int)strlen(response), response);
+    printf("TARGET  :\n[%.*s]\n", (int)strlen(response_tgt), response_tgt);
     printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
     printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
     return (0);
@@ -1235,8 +1235,8 @@
   if ((strncasecmp(response_tgt, prt_buf, strlen(response_tgt)) != 0) ||
       (strncasecmp(response_tgt, cpy_buf, strlen(response_tgt)) != 0)) {
     printf("FAILED: (test #%d) print rsp output mismatch\n", testnum);
-    printf("ORIGINAL:\n[%.*s]\n", strlen(response), response);
-    printf("TARGET  :\n[%.*s]\n", strlen(response_tgt), response_tgt);
+    printf("ORIGINAL:\n[%.*s]\n", (int)strlen(response), response);
+    printf("TARGET  :\n[%.*s]\n", (int)strlen(response_tgt), response_tgt);
     printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
     printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
     return (0);
@@ -2007,7 +2007,7 @@
       ++failures;
       printf("FAILED:  test #%d (setting idx %d of '%s' to '%s') expected '%s' len %d, got
'%.*s' len %d\n",
              i + 1, tests[i].idx, tests[i].old_raw, tests[i].slice,
-             tests[i].new_raw, strlen(tests[i].new_raw), f->m_len_value, f->m_ptr_value,
f->m_len_value);
+             tests[i].new_raw, (int)strlen(tests[i].new_raw), f->m_len_value, f->m_ptr_value,
f->m_len_value);
     }
   }
 
@@ -2151,7 +2151,7 @@
   good = "oo, de, fr, en";
   retr = mime_field_value_str_replace_slice(heap, &len, buff, (int) strlen(buff), targ,
0, repl, (int) strlen(repl));
   if ((len != (int) strlen(good)) || (memcmp(good, retr, len) != 0)) {
-    printf("FAILED: expected %d byte str \"%s\", got %d byte str \"%.*s\"\n", (int) strlen(good),
good, len, len, retr);
+    printf("FAILED: expected %d byte str \"%s\", got %d byte str \"%.*s\"\n", (int)strlen(good),
good, len, len, retr);
     ++failures;
   }
   // (2) append
@@ -2159,7 +2159,7 @@
   targ = buff + 10;
   repl = ", bloop";
   good = "de, fr, en, bloop";
-  retr = mime_field_value_str_replace_slice(heap, &len, buff, (int) strlen(buff), targ,
0, repl, (int) strlen(repl));
+  retr = mime_field_value_str_replace_slice(heap, &len, buff, (int)strlen(buff), targ,
0, repl, (int)strlen(repl));
   if ((len != (int) strlen(good)) || (memcmp(good, retr, len) != 0)) {
     printf("FAILED: expected %d byte str \"%s\", got %d byte str \"%.*s\"\n", (int) strlen(good),
good, len, len, retr);
     ++failures;
@@ -2368,7 +2368,7 @@
         if (cell != NULL) {
           ++failures;
           printf("FAILED: test #%d (string '%s', idx %d) expected NULL piece, got [offset
%d len %d]\n",
-                 i + 1, tests[i].value, j, offset, cell->len);
+                 i + 1, tests[i].value, j, offset, (int)cell->len);
         }
       } else                    // should have a piece
       {
@@ -2379,7 +2379,7 @@
         } else if ((offset != tests[i].pieces[j].offset) || (cell->len != (size_t) tests[i].pieces[j].len))
{
           ++failures;
           printf("FAILED: test #%d (string '%s', idx %d) expected [offset %d len %d], got
[offset %d len %d]\n",
-                 i + 1, tests[i].value, j, tests[i].pieces[j].offset, tests[i].pieces[j].len,
offset, cell->len);
+                 i + 1, tests[i].value, j, tests[i].pieces[j].offset, tests[i].pieces[j].len,
offset, (int)cell->len);
         }
       }
     }

Modified: incubator/trafficserver/traffic/trunk/proxy/hdrs/MIME.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/hdrs/MIME.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/hdrs/MIME.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/hdrs/MIME.cc Wed Nov 11 03:54:42 2009
@@ -2878,7 +2878,7 @@
     if (must_copy_strings || (!line_is_real)) {
       int length = total_line_length;
       char *dup = heap->duplicate_str(field_name_first, length);
-      int delta = (int) (dup - field_name_first);
+      intptr_t delta = dup - field_name_first;
 
       field_name_first += delta;
       field_name_last += delta;

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/Hash_Table.cc Wed Nov 11 03:54:42 2009
@@ -173,7 +173,7 @@
     }
 
     if (iterator == NULL && match_found == false) {
-      Debug("http_track", "[HashTable::insert] Adding alternate to node %x **\n", (unsigned)
request);
+      Debug("http_track", "[HashTable::insert] Adding alternate to node %p **\n", request);
       alternate = (HeaderAlternate *) xmalloc(sizeof(HeaderAlternate));
       alternate->hdr = url->hdr;
       alternate->prev = NULL;
@@ -191,7 +191,7 @@
   } else {
     request = (RequestNode *) xmalloc(sizeof(RequestNode));
 
-    Debug("http_track", "[HashTable::insert] Adding a new node %x **\n", (unsigned) request);
+    Debug("http_track", "[HashTable::insert] Adding a new node %p **\n", request);
     alternate = (HeaderAlternate *) xmalloc(sizeof(HeaderAlternate));
     alternate->hdr = url->hdr;
     alternate->prev = NULL;

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpAccept.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpAccept.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpAccept.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpAccept.cc Wed Nov 11 03:54:42 2009
@@ -95,7 +95,7 @@
       // FIX: add time to user_agent_hangup
       HTTP_SUM_DYN_STAT(http_ua_msecs_counts_errors_pre_accept_hangups_stat, 0);
     }
-    MachineFatal("HTTP accept received fatal error: errno = %d", -((int) data));
+    MachineFatal("HTTP accept received fatal error: errno = %d", -((int)(intptr_t)data));
     return (EVENT_CONT);
   }
 }

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Wed Nov 11 03:54:42 2009
@@ -1289,7 +1289,7 @@
 {
 
   STATE_ENTER(&HttpSM::state_request_wait_for_transform_read, event);
-  int size = (int) data;
+  int size = (int)(intptr_t) data;
 
   switch (event) {
   case TRANSFORM_READ_READY:
@@ -1332,7 +1332,7 @@
 {
 
   STATE_ENTER(&HttpSM::state_response_wait_for_transform_read, event);
-  int size = (int) data;
+  int size = (int)(intptr_t) data;
 
   switch (event) {
   case TRANSFORM_READ_READY:
@@ -7000,7 +7000,8 @@
       int length = 0;
       const char *field = t_state.hdr_info.client_request.value_get(MIME_FIELD_X_ID, MIME_LEN_X_ID,
&length);
       if (field != NULL) {
-        length =::min((unsigned int) length, sizeof(unique_id_string));
+        if ((int)sizeof(unique_id_string) < length)
+          length =  (int)sizeof(unique_id_string);
         strncpy(unique_id_string, field, length);
         unique_id_string[length] = '\0';
       } else {

Modified: incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Wed Nov 11 03:54:42
2009
@@ -626,14 +626,14 @@
 }
 
 #ifdef USE_NCA
-static uint64_t
+static inku64
 extract_ctag_from_response(HTTPHdr * h)
 {
 
   HTTP_DEBUG_ASSERT(h->type_get() == HTTP_TYPE_RESPONSE);
   MIMEField *ctag_field = h->field_find("@Ctag", 5);
 
-  uint64_t ctag;
+  inku64 ctag;
   if (ctag_field != NULL) {
     int tmp;
     const char *ctag_str = ctag_field->value_get(&tmp);
@@ -3091,7 +3091,7 @@
 #ifdef USE_NCA
   if (s->client_info.port_attribute == SERVER_PORT_NCA) {
 
-    uint64_t ctag = extract_ctag_from_response(obj->response_get());
+    inku64 ctag = extract_ctag_from_response(obj->response_get());
     NcaCacheUp_t *nc = s->nca_info.request_info;
 
     if (nc->advisory) {
@@ -5821,7 +5821,7 @@
 #ifdef USE_NCA
   // With NCA set get a new ctag here since this is a new document
   if (s->client_info.port_attribute == SERVER_PORT_NCA) {
-    uint64_t new_ctag = ncaProcessor.allocate_ctag();
+    inku64 new_ctag = ncaProcessor.allocate_ctag();
 
     char ctag_str[21];
     snprintf(ctag_str, sizeof(ctag_str), "%llu", new_ctag);
@@ -8466,7 +8466,7 @@
      if (s->nca_info.request_info->advisory) {
      HTTPHdr cached_response = s->cache_info.object_read->response_get();
      ink_assert(cached_response.valid());
-     uint64_t ctag = extract_ctag_from_response(cached_response);
+     inku64 ctag = extract_ctag_from_response(cached_response);
      s->nca_info.response_info.ctag = ctag;
      s->nca_info.response_info.advisory |= NCA_IO_ADVISE_FLUSH;
      s->nca_info.response_info.nocache = 1;

Modified: incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/logging/LogConfig.cc Wed Nov 11 03:54:42 2009
@@ -869,7 +869,7 @@
   fprintf(fd, "   space_used_frequency = %d\n", space_used_frequency);
 
   fprintf(fd, "\n");
-  fprintf(fd, "************ Log Objects (%u objects) ************\n", log_object_manager.get_num_objects());
+  fprintf(fd, "************ Log Objects (%u objects) ************\n", (unsigned int)log_object_manager.get_num_objects());
   log_object_manager.display(fd);
 
   fprintf(fd, "************ Global Filter List (%u filters) ************\n", global_filter_list.count());

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/McastSnoop.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/McastSnoop.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/McastSnoop.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/tools/McastSnoop.cc Wed Nov 11 03:54:42
2009
@@ -258,7 +258,7 @@
   const int buf_size = 61440;
   char buf[buf_size + 1];
   int nbytes;
-  int addr_len = 0;
+  socklen_t addr_len = 0;
   struct sockaddr_in receive_addr;
 
 
@@ -268,12 +268,7 @@
     memset(&receive_addr, 0, sizeof(sockaddr_in));
 
     if ((nbytes = recvfrom(fd, buf, buf_size, 0, (struct sockaddr *) &receive_addr,
-#if (HOST_OS == linux)
-                           (size_t *) & addr_len
-#else
-                           &addr_len
-#endif
-         )) < 0) {
+                           &addr_len)) < 0) {
       perror("Receive failed");
     } else {
       buf[nbytes] = '\0';

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc?rev=834757&r1=834756&r2=834757&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtUtils.cc Wed Nov 11 03:54:42
2009
@@ -330,7 +330,7 @@
 
 #if defined(LOCAL_MANAGER) || defined(PROCESS_MANAGER)
   if (diags_init) {
-    diags->print_va(NULL, DL_Note, "NOTE", NULL, message_format, (va_list) ap);
+    diags->print_va(NULL, DL_Note, "NOTE", NULL, message_format, ap);
   } else {
 #endif
 



Mime
View raw message