You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/12/15 02:15:20 UTC
svn commit: r1049373 [6/11] - in /trafficserver/traffic/trunk: ./
example/app-template/ example/append-transform/ example/cache_scan/
example/gzip-transform/ example/null-transform/ example/output-header/
example/protocol/ example/redirect-1/ example/s...
Modified: trafficserver/traffic/trunk/proxy/ICP.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ICP.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ICP.h (original)
+++ trafficserver/traffic/trunk/proxy/ICP.h Wed Dec 15 01:15:09 2010
@@ -55,13 +55,13 @@
//*********************************************************************
typedef struct ICPMsgHeader
{
- uint8 opcode;
- uint8 version;
- uint16 msglen;
- uint32 requestno;
- uint32 optionflags;
- uint32 optiondata;
- uint32 shostid;
+ uint8_t opcode;
+ uint8_t version;
+ uint16_t msglen;
+ uint32_t requestno;
+ uint32_t optionflags;
+ uint32_t optiondata;
+ uint32_t shostid;
} ICPMsgHdr_t;
//-----------------------
@@ -121,7 +121,7 @@ typedef enum
//-----------------
#define MAX_ICP_MSGSIZE (16 * 1024)
#define MAX_ICP_MSG_PAYLOAD_SIZE (MAX_ICP_MSGSIZE - sizeof(ICPmsgHdr_t))
-#define MAX_ICP_QUERY_PAYLOAD_SIZE (MAX_ICP_MSG_PAYLOAD_SIZE - sizeof(uint32))
+#define MAX_ICP_QUERY_PAYLOAD_SIZE (MAX_ICP_MSG_PAYLOAD_SIZE - sizeof(uint32_t))
#define MAX_DEFINED_PEERS 64
#define MSG_IOVECS 16
@@ -130,7 +130,7 @@ typedef enum
//------------
typedef struct ICPData
{
- int8 *URL; // null terminated
+ char *URL; // null terminated
} ICPData_t;
//-------------
@@ -138,8 +138,8 @@ typedef struct ICPData
//-------------
typedef struct ICPQuery
{
- uint32 rhostid;
- int8 *URL; // null terminated (outgoing)
+ uint32_t rhostid;
+ char *URL; // null terminated (outgoing)
} ICPQuery_t;
//------------
@@ -147,7 +147,7 @@ typedef struct ICPQuery
//------------
typedef struct ICPHit
{
- int8 *URL; // null terminated
+ char *URL; // null terminated
} ICPHit_t;
//------------
@@ -155,7 +155,7 @@ typedef struct ICPHit
//------------
typedef struct ICPMiss
{
- int8 *URL; // null terminated
+ char *URL; // null terminated
} ICPMiss_t;
//------------------
@@ -163,10 +163,10 @@ typedef struct ICPMiss
//------------------
typedef struct ICPHitObj
{
- int8 *URL; // null terminated
- int8 *p_objsize; // byte aligned uint16 immediately follows URL null
- uint16 objsize; // decoded object size
- int8 *data; // object data
+ char *URL; // null terminated
+ char *p_objsize; // byte aligned uint16_t immediately follows URL null
+ uint16_t objsize; // decoded object size
+ char *data; // object data
} ICPHitObj_t;
//------------------------
@@ -232,7 +232,7 @@ public:
private:
enum
{ UNLOCKED = 0, LOCKED = 1 };
- int32 _lock_word;
+ int32_t _lock_word;
};
#endif // USE_CAS_FOR_ATOMICLOCK
@@ -1184,7 +1184,7 @@ private:
void remove_all_pendingActions();
// Static data
- static uint32 ICPRequestSeqno;
+ static uint32_t ICPRequestSeqno;
// Passed request data
Continuation *_cont;
Modified: trafficserver/traffic/trunk/proxy/ICPConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ICPConfig.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ICPConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/ICPConfig.cc Wed Dec 15 01:15:09 2010
@@ -1132,7 +1132,7 @@ MultiCastPeer::AddMultiCastChild(Peer *
// Make sure child (ip,port) is unique.
if (FindMultiCastChild(P->GetIP(), P->GetPort())) {
unsigned char x[4] = { 0, 0, 0, 0 };
- *(uint32 *) & x = (uint32) P->GetIP()->s_addr;
+ *(uint32_t *) & x = (uint32_t) P->GetIP()->s_addr;
Warning("bad icp.config, multiple multicast child definitions for ip=%d.%d.%d.%d", x[0], x[1], x[2], x[3]);
return 0; // Not added, already exists
} else {
@@ -1410,14 +1410,13 @@ void
dumpICPstatEntry(int i, const char *name)
{
int l = strlen(name);
- int64 sval, cval;
+ int64_t sval, cval;
RecRawStat *p = RecGetGlobalRawStatPtr(icp_rsb, i);
sval = p->sum;
cval = p->count;
- printf("%-32s %12lld %16lld %17.4f\n",
- &name[l > 31 ? l - 31 : 0], cval, sval,
+ printf("%-32s %12" PRId64 " %16" PRId64 " %17.4f\n", &name[l > 31 ? l - 31 : 0], cval, sval,
cval ? (((double) sval) / ((double) cval)) : 0.0);
}
@@ -1453,7 +1452,7 @@ ICPProcessor::DumpICPConfig()
P = _PeerList[i];
id = P->GetPeerID();
type = P->GetType();
- *(uint32 *) & ip = (uint32) (P->GetIP())->s_addr;
+ *(uint32_t *) & ip = (uint32_t) (P->GetIP())->s_addr;
icp_port = P->GetPort();
const char *str_type;
@@ -1494,7 +1493,7 @@ ICPProcessor::DumpICPConfig()
id, str_type, ip[0], ip[1], ip[2], ip[3], icp_port,
Pps->GetConfig()->GetProxyPort(), Pps->GetConfig()->GetHostname());
- *(uint32 *) & ip = (uint32) (Pps->GetConfig()->GetMultiCastIP())->s_addr;
+ *(uint32_t *) & ip = (uint32_t) (Pps->GetConfig()->GetMultiCastIP())->s_addr;
Debug("icp",
"[%d]: MC ON=%d MC_IP=%d.%d.%d.%d MC_TTL=%d",
Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Wed Dec 15 01:15:09 2010
@@ -1128,7 +1128,7 @@ INKVConnInternal::handle_event(int event
}
VIO *
-INKVConnInternal::do_io_read(Continuation *c, int64 nbytes, MIOBuffer *buf)
+INKVConnInternal::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
{
m_read_vio.buffer.writer_for(buf);
m_read_vio.op = VIO::READ;
@@ -1146,7 +1146,7 @@ INKVConnInternal::do_io_read(Continuatio
}
VIO *
-INKVConnInternal::do_io_write(Continuation *c, int64 nbytes, IOBufferReader *buf, bool owner)
+INKVConnInternal::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner)
{
ink_assert(!owner);
m_write_vio.buffer.reader_for(buf);
@@ -1748,9 +1748,9 @@ _TSrealloc(void *ptr, size_t size, const
return _xrealloc(ptr, size, path);
}
-// length has to be int64 and not size_t, since -1 means to call strlen() to get length
+// 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 length, const char *path)
+_TSstrdup(const char *str, int64_t length, const char *path)
{
return _xstrdup(str, length, path);
}
@@ -4314,7 +4314,7 @@ TSHttpHookAdd(TSHttpHookID id, TSCont co
void
TSHttpIcpDynamicSet(int value)
{
- int32 old_value, new_value;
+ int32_t old_value, new_value;
new_value = (value == 0) ? 0 : 1;
old_value = icp_dynamic_enabled;
@@ -5227,7 +5227,7 @@ TSHttpTxnErrorBodySet(TSHttpTxn txnp, ch
}
void
-TSHttpTxnServerRequestBodySet(TSHttpTxn txnp, char *buf, int64 buflength)
+TSHttpTxnServerRequestBodySet(TSHttpTxn txnp, char *buf, int64_t buflength)
{
HttpSM *sm = (HttpSM *) txnp;
HttpTransact::State *s = &(sm->t_state);
@@ -5575,7 +5575,7 @@ TSHttpTxnClientReqHdrBytesGet(TSHttpTxn
}
int
-TSHttpTxnClientReqBodyBytesGet(TSHttpTxn txnp, int64 *bytes)
+TSHttpTxnClientReqBodyBytesGet(TSHttpTxn txnp, int64_t *bytes)
{
HttpSM *sm = (HttpSM *) txnp;
@@ -5593,7 +5593,7 @@ TSHttpTxnServerReqHdrBytesGet(TSHttpTxn
}
int
-TSHttpTxnServerReqBodyBytesGet(TSHttpTxn txnp, int64 *bytes)
+TSHttpTxnServerReqBodyBytesGet(TSHttpTxn txnp, int64_t *bytes)
{
HttpSM *sm = (HttpSM *) txnp;
@@ -5611,7 +5611,7 @@ TSHttpTxnServerRespHdrBytesGet(TSHttpTxn
}
int
-TSHttpTxnServerRespBodyBytesGet(TSHttpTxn txnp, int64 *bytes)
+TSHttpTxnServerRespBodyBytesGet(TSHttpTxn txnp, int64_t *bytes)
{
HttpSM *sm = (HttpSM *) txnp;
@@ -5629,7 +5629,7 @@ TSHttpTxnClientRespHdrBytesGet(TSHttpTxn
}
int
-TSHttpTxnClientRespBodyBytesGet(TSHttpTxn txnp, int64 *bytes)
+TSHttpTxnClientRespBodyBytesGet(TSHttpTxn txnp, int64_t *bytes)
{
HttpSM *sm = (HttpSM *) txnp;
@@ -5647,7 +5647,7 @@ TSHttpTxnPushedRespHdrBytesGet(TSHttpTxn
}
int
-TSHttpTxnPushedRespBodyBytesGet(TSHttpTxn txnp, int64 *bytes)
+TSHttpTxnPushedRespBodyBytesGet(TSHttpTxn txnp, int64_t *bytes)
{
HttpSM *sm = (HttpSM *) txnp;
@@ -5706,7 +5706,7 @@ TSHttpTxnLookingUpTypeGet(TSHttpTxn txnp
int
TSHttpCurrentClientConnectionsGet(int *num_connections)
{
- int64 S;
+ int64_t S;
HTTP_READ_DYN_SUM(http_current_client_connections_stat, S);
*num_connections = (int) S;
@@ -5716,7 +5716,7 @@ TSHttpCurrentClientConnectionsGet(int *n
int
TSHttpCurrentActiveClientConnectionsGet(int *num_connections)
{
- int64 S;
+ int64_t S;
HTTP_READ_DYN_SUM(http_current_active_client_connections_stat, S);
*num_connections = (int) S;
@@ -5726,8 +5726,8 @@ TSHttpCurrentActiveClientConnectionsGet(
int
TSHttpCurrentIdleClientConnectionsGet(int *num_connections)
{
- int64 total = 0;
- int64 active = 0;
+ int64_t total = 0;
+ int64_t active = 0;
HTTP_READ_DYN_SUM(http_current_client_connections_stat, total);
HTTP_READ_DYN_SUM(http_current_active_client_connections_stat, active);
@@ -5742,7 +5742,7 @@ TSHttpCurrentIdleClientConnectionsGet(in
int
TSHttpCurrentCacheConnectionsGet(int *num_connections)
{
- int64 S;
+ int64_t S;
HTTP_READ_DYN_SUM(http_current_cache_connections_stat, S);
*num_connections = (int) S;
@@ -5752,7 +5752,7 @@ TSHttpCurrentCacheConnectionsGet(int *nu
int
TSHttpCurrentServerConnectionsGet(int *num_connections)
{
- int64 S;
+ int64_t S;
HTTP_READ_GLOBAL_DYN_SUM(http_current_server_connections_stat, S);
*num_connections = (int) S;
@@ -5978,7 +5978,7 @@ TSVConnClosedGet(TSVConn connp)
}
TSVIO
-TSVConnRead(TSVConn connp, TSCont contp, TSIOBuffer bufp, int64 nbytes)
+TSVConnRead(TSVConn connp, TSCont contp, TSIOBuffer bufp, int64_t nbytes)
{
if ((sdk_sanity_check_iocore_structure(connp) != TS_SUCCESS) ||
(sdk_sanity_check_iocore_structure(contp) != TS_SUCCESS) ||
@@ -5991,7 +5991,7 @@ TSVConnRead(TSVConn connp, TSCont contp,
}
TSVIO
-TSVConnWrite(TSVConn connp, TSCont contp, TSIOBufferReader readerp, int64 nbytes)
+TSVConnWrite(TSVConn connp, TSCont contp, TSIOBufferReader readerp, int64_t nbytes)
{
if ((sdk_sanity_check_iocore_structure(connp) != TS_SUCCESS) ||
(sdk_sanity_check_iocore_structure(contp) != TS_SUCCESS) ||
@@ -6044,7 +6044,7 @@ TSVConnShutdown(TSVConn connp, int read,
}
TSReturnCode
-TSVConnCacheObjectSizeGet(TSVConn connp, int64 *obj_size)
+TSVConnCacheObjectSizeGet(TSVConn connp, int64_t *obj_size)
{
if ((sdk_sanity_check_iocore_structure(connp) != TS_SUCCESS) || (obj_size == NULL))
return TS_ERROR;
@@ -6444,7 +6444,7 @@ INKStatCreate(const char *the_name, INKS
switch (the_type) {
case INKSTAT_TYPE_INT64:
- n = StatDescriptor::CreateDescriptor(the_name, (int64) 0);
+ n = StatDescriptor::CreateDescriptor(the_name, (int64_t) 0);
break;
case INKSTAT_TYPE_FLOAT:
@@ -6460,7 +6460,7 @@ INKStatCreate(const char *the_name, INKS
}
TSReturnCode
-INKStatIntAddTo(INKStat the_stat, int64 amount)
+INKStatIntAddTo(INKStat the_stat, int64_t amount)
{
if (ink_sanity_check_stat_structure(the_stat) != TS_SUCCESS)
return TS_ERROR;
@@ -6513,7 +6513,7 @@ TSStatCreateV2(const char *the_name, uin
}
TSReturnCode
-TSStatIncrementV2(uint32_t stat_num, int64 inc_by)
+TSStatIncrementV2(uint32_t stat_num, int64_t inc_by)
{
if(StatSystemV2::increment(stat_num, inc_by))
return TS_SUCCESS;
@@ -6521,7 +6521,7 @@ TSStatIncrementV2(uint32_t stat_num, int
}
TSReturnCode
-TSStatIncrementByNameV2(const char *stat_name, int64 inc_by)
+TSStatIncrementByNameV2(const char *stat_name, int64_t inc_by)
{
if(StatSystemV2::increment(stat_name, inc_by))
return TS_SUCCESS;
@@ -6529,19 +6529,19 @@ TSStatIncrementByNameV2(const char *stat
}
TSReturnCode
-TSStatDecrementV2(uint32_t stat_num, int64 dec_by)
+TSStatDecrementV2(uint32_t stat_num, int64_t dec_by)
{
return TSStatIncrementV2(stat_num, (-1)*dec_by);
}
TSReturnCode
-TSStatDecrementByNameV2(const char *stat_name, int64 dec_by)
+TSStatDecrementByNameV2(const char *stat_name, int64_t dec_by)
{
return TSStatIncrementByNameV2(stat_name, (-1)*dec_by);
}
TSReturnCode
-TSStatGetCurrentV2(uint32_t stat_num, int64 *stat_val)
+TSStatGetCurrentV2(uint32_t stat_num, int64_t *stat_val)
{
if(StatSystemV2::get_current(stat_num, stat_val))
return TS_SUCCESS;
@@ -6549,7 +6549,7 @@ TSStatGetCurrentV2(uint32_t stat_num, in
}
TSReturnCode
-TSStatGetCurrentByNameV2(const char *stat_name, int64 *stat_val)
+TSStatGetCurrentByNameV2(const char *stat_name, int64_t *stat_val)
{
if(StatSystemV2::get_current(stat_name, stat_val))
return TS_SUCCESS;
@@ -6557,7 +6557,7 @@ TSStatGetCurrentByNameV2(const char *sta
}
TSReturnCode
-TSStatGetV2(uint32_t stat_num, int64 *stat_val)
+TSStatGetV2(uint32_t stat_num, int64_t *stat_val)
{
if(StatSystemV2::get(stat_num, stat_val))
return TS_SUCCESS;
@@ -6565,7 +6565,7 @@ TSStatGetV2(uint32_t stat_num, int64 *st
}
TSReturnCode
-TSStatGetByNameV2(const char *stat_name, int64 *stat_val)
+TSStatGetByNameV2(const char *stat_name, int64_t *stat_val)
{
if(StatSystemV2::get(stat_name, stat_val))
return TS_SUCCESS;
@@ -6574,7 +6574,7 @@ TSStatGetByNameV2(const char *stat_name,
#endif
TSReturnCode
-INKStatIntGet(INKStat the_stat, int64 *value)
+INKStatIntGet(INKStat the_stat, int64_t *value)
{
if (ink_sanity_check_stat_structure(the_stat) != TS_SUCCESS)
return TS_ERROR;
@@ -6598,7 +6598,7 @@ INKStatFloatGet(INKStat the_stat, float
}
TSReturnCode
-INKStatIntSet(INKStat the_stat, int64 value)
+INKStatIntSet(INKStat the_stat, int64_t value)
{
if (ink_sanity_check_stat_structure(the_stat) != TS_SUCCESS)
return TS_ERROR;
@@ -6672,7 +6672,7 @@ INKStatCoupledGlobalAdd(INKCoupledStat g
switch (the_type) {
case INKSTAT_TYPE_INT64:
- n = category->CreateStat(the_name, (int64) 0);
+ n = category->CreateStat(the_name, (int64_t) 0);
break;
case INKSTAT_TYPE_FLOAT:
@@ -6908,7 +6908,7 @@ TSHttpTxnClientRemotePortGet(TSHttpTxn t
void
-TSIPLookupNewEntry(TSIPLookup iplu, uint32 addr1, uint32 addr2, void *data)
+TSIPLookupNewEntry(TSIPLookup iplu, uint32_t addr1, uint32_t addr2, void *data)
{
IpLookup *my_iplu = (IpLookup *) iplu;
if (my_iplu) {
@@ -6917,7 +6917,7 @@ TSIPLookupNewEntry(TSIPLookup iplu, uint
}
int
-TSIPLookupMatch(TSIPLookup iplu, uint32 addr, void **data)
+TSIPLookupMatch(TSIPLookup iplu, uint32_t addr, void **data)
{
void *dummy;
IpLookup *my_iplu = (IpLookup *) iplu;
@@ -6928,7 +6928,7 @@ TSIPLookupMatch(TSIPLookup iplu, uint32
}
int
-TSIPLookupMatchFirst(TSIPLookup iplu, uint32 addr, TSIPLookupState iplus, void **data)
+TSIPLookupMatchFirst(TSIPLookup iplu, uint32_t addr, TSIPLookupState iplus, void **data)
{
IpLookup *my_iplu = (IpLookup *) iplu;
IpLookupState *my_iplus = (IpLookupState *) iplus;
@@ -6972,7 +6972,7 @@ TSMatcherTokLine(char *buffer, char **la
}
char *
-TSMatcherExtractIPRange(char *match_str, uint32 *addr1, uint32 *addr2)
+TSMatcherExtractIPRange(char *match_str, uint32_t *addr1, uint32_t *addr2)
{
return (char*)ExtractIpRange(match_str, (ip_addr_t *) addr1, (ip_addr_t *) addr2);
}
@@ -7023,7 +7023,7 @@ TSMgmtConfigIntSet(const char *var_name,
// construct a buffer
int buffer_size = strlen(var_name) + 1 + 32 + 1 + 64 + 1;
buffer = (char *) alloca(buffer_size);
- snprintf(buffer, buffer_size, "%s %d %lld", var_name, INK_INT, value);
+ snprintf(buffer, buffer_size, "%s %d %" PRId64 "", var_name, INK_INT, value);
// tell manager to set the configuration; note that this is not
// transactional (e.g. we return control to the plugin before the
@@ -7146,7 +7146,7 @@ TSCacheHttpInfoKeySet(TSCacheHttpInfo in
}
void
-TSCacheHttpInfoSizeSet(TSCacheHttpInfo infop, int64 size)
+TSCacheHttpInfoSizeSet(TSCacheHttpInfo infop, int64_t size)
{
CacheHTTPInfo *info = (CacheHTTPInfo *) infop;
Modified: trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITest.cc Wed Dec 15 01:15:09 2010
@@ -408,7 +408,7 @@ cache_handler(TSCont contp, TSEvent even
TSIOBufferBlock blockp;
char *ptr_block;
- int64 ntodo, ndone, nbytes, towrite, avail, content_length;
+ int64_t ntodo, ndone, nbytes, towrite, avail, content_length;
switch (event) {
case TS_EVENT_CACHE_OPEN_WRITE:
@@ -832,7 +832,7 @@ REGRESSION_TEST(SDK_API_TSfopen) (Regres
struct stat stat_buffer_pre, stat_buffer_post, stat_buffer_input;
char *ret_val;
int error_counter = 0, read = 0, wrote = 0;
- int64 read_amount = 0;
+ int64_t read_amount = 0;
char INPUT_TEXT_FILE[] = "plugin.config";
char input_file_full_path[BUFSIZ];
@@ -1554,7 +1554,7 @@ REGRESSION_TEST(SDK_API_TSIOBufferCreate
bool test_passed = false;
*pstatus = REGRESSION_TEST_INPROGRESS;
- int64 watermark = 1000;
+ int64_t watermark = 1000;
TSIOBuffer bufp = TSIOBufferCreate();
@@ -1604,7 +1604,7 @@ REGRESSION_TEST(SDK_API_TSIOBufferProduc
TSIOBufferProduce(bufp, 10);
- int64 reader_avail = TSIOBufferReaderAvail(readerp);
+ int64_t reader_avail = TSIOBufferReaderAvail(readerp);
if (reader_avail == 10) {
SDK_RPRINT(test, "TSIOBufferProduce", "TestCase1", TC_PASS, "ok");
SDK_RPRINT(test, "TSIOBufferReaderAlloc", "TestCase1", TC_PASS, "ok");
@@ -1641,7 +1641,7 @@ REGRESSION_TEST(SDK_API_TSIOBufferReader
TSIOBufferProduce(bufp, 10);
TSIOBufferReaderConsume(readerp, 10);
- int64 reader_avail = TSIOBufferReaderAvail(readerp);
+ int64_t reader_avail = TSIOBufferReaderAvail(readerp);
if (reader_avail == 0) {
SDK_RPRINT(test, "TSIOBufferReaderConsume", "TestCase1", TC_PASS, "ok");
test_passed = true;
@@ -1675,7 +1675,7 @@ REGRESSION_TEST(SDK_API_TSIOBufferReader
TSIOBufferReader readerp2 = TSIOBufferReaderClone(readerp);
- int64 reader_avail = TSIOBufferReaderAvail(readerp2);
+ int64_t reader_avail = TSIOBufferReaderAvail(readerp2);
if (reader_avail == 5) {
SDK_RPRINT(test, "TSIOBufferReaderClone", "TestCase1", TC_PASS, "ok");
test_passed = true;
@@ -1780,7 +1780,7 @@ REGRESSION_TEST(SDK_API_TSIOBufferBlockR
TSIOBufferWrite(bufp, (char*)&i, sizeof(int));
TSIOBufferReader readerp = TSIOBufferReaderAlloc(bufp);
- int64 avail_write, avail_read;
+ int64_t avail_write, avail_read;
// TODO: This is probably not correct any more.
TSIOBufferBlock blockp = TSIOBufferStart(bufp);
@@ -1870,7 +1870,7 @@ REGRESSION_TEST(SDK_API_INKStatIntSet) (
INKStat stat = INKStatCreate("stat_is", INKSTAT_TYPE_INT64);
INKStatIntSet(stat, 100);
- int64 stat_val;
+ int64_t stat_val;
INKStatIntGet(stat, &stat_val);
@@ -1901,7 +1901,7 @@ REGRESSION_TEST(SDK_API_INKStatIntAddTo)
INKStat stat = INKStatCreate("stat_ia", INKSTAT_TYPE_INT64);
INKStatIntAddTo(stat, 100);
- int64 stat_val;
+ int64_t stat_val;
INKStatIntGet(stat, &stat_val);
@@ -1998,7 +1998,7 @@ REGRESSION_TEST(SDK_API_INKStatIncrement
INKStat stat_2 = INKStatCreate("stat_2", INKSTAT_TYPE_FLOAT);
INKStatIncrement(stat_1);
- int64 stat1_val;
+ int64_t stat1_val;
INKStatIntGet(stat_1, &stat1_val);
if (stat1_val == 1) {
@@ -2114,9 +2114,9 @@ REGRESSION_TEST(SDK_API_INKStatCoupled)
float global_val_sum;
INKStatFloatGet(global_stat_sum, &global_val_sum);
- int64 global_val_1;
+ int64_t global_val_1;
INKStatIntGet(global_stat_1, &global_val_1);
- int64 global_val_2;
+ int64_t global_val_2;
INKStatIntGet(global_stat_2, &global_val_2);
if (local_val_1 == global_val_1 && local_val_2 == global_val_2 && local_val_sum == global_val_sum) {
@@ -2753,11 +2753,11 @@ test_url_print(TSMBuffer bufp, TSMLoc hd
{
TSIOBuffer output_buffer;
TSIOBufferReader reader;
- int64 total_avail;
+ int64_t total_avail;
TSIOBufferBlock block;
const char *block_start;
- int64 block_avail;
+ int64_t block_avail;
char *output_string;
int output_len;
@@ -3989,7 +3989,7 @@ REGRESSION_TEST(SDK_API_TSHttpHdr) (Regr
} else {
TSIOBufferBlock iobufblock;
- int64 bytes_read;
+ int64_t bytes_read;
memset(actual_iobuf, 0, (actual_length + 1) * sizeof(char));
bytes_read = 0;
@@ -3998,7 +3998,7 @@ REGRESSION_TEST(SDK_API_TSHttpHdr) (Regr
while ((iobufblock != NULL) && (iobufblock != TS_ERROR_PTR)) {
const char *block_start;
- int64 block_size;
+ int64_t block_size;
block_start = TSIOBufferBlockReadStart(iobufblock, iobufreader, &block_size);
if ((block_start == TS_ERROR_PTR) || (block_size == 0) || (block_size == TS_ERROR)) {
@@ -4156,6 +4156,7 @@ TSReturnCode
compare_field_names(RegressionTest * test, TSMBuffer bufp1, TSMLoc mime_loc1, TSMLoc field_loc1, TSMBuffer bufp2,
TSMLoc mime_loc2, TSMLoc field_loc2)
{
+ NOWARN_UNUSED(test);
const char *name1;
const char *name2;
int length1;
@@ -5119,11 +5120,11 @@ convert_http_hdr_to_string(TSMBuffer buf
{
TSIOBuffer output_buffer;
TSIOBufferReader reader;
- int64 total_avail;
+ int64_t total_avail;
TSIOBufferBlock block;
const char *block_start;
- int64 block_avail;
+ int64_t block_avail;
char *output_string;
int output_len;
@@ -5377,11 +5378,11 @@ convert_mime_hdr_to_string(TSMBuffer buf
{
TSIOBuffer output_buffer;
TSIOBufferReader reader;
- int64 total_avail;
+ int64_t total_avail;
TSIOBufferBlock block;
const char *block_start;
- int64 block_avail;
+ int64_t block_avail;
char *output_string;
int output_len;
@@ -7193,7 +7194,7 @@ typedef struct
static TSIOBuffer append_buffer;
static TSIOBufferReader append_buffer_reader;
-static int64 append_buffer_length;
+static int64_t append_buffer_length;
static MyTransformData *
my_data_alloc()
@@ -7227,8 +7228,8 @@ handle_transform(TSCont contp)
TSVIO write_vio;
TransformTestData *contData;
MyTransformData *data;
- int64 towrite;
- int64 avail;
+ int64_t towrite;
+ int64_t avail;
/* Get the output connection where we'll write data to. */
output_conn = TSTransformOutputVConnGet(contp);
@@ -7439,7 +7440,7 @@ load(const char *append_string)
{
TSIOBufferBlock blk;
char *p;
- int64 avail;
+ int64_t avail;
append_buffer = TSIOBufferCreate();
append_buffer_reader = TSIOBufferReaderAlloc(append_buffer);
Modified: trafficserver/traffic/trunk/proxy/InkAPITestTool.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITestTool.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITestTool.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITestTool.cc Wed Dec 15 01:15:09 2010
@@ -120,7 +120,7 @@ typedef struct
int connect_port;
int local_port;
- uint64 connect_ip;
+ uint64_t connect_ip;
TSAction connect_action;
TxnHandler current_handler;
@@ -534,7 +534,7 @@ synclient_txn_read_response(TSCont contp
TSIOBufferBlock block = TSIOBufferReaderStart(txn->resp_reader);
while (block != NULL) {
- int64 blocklen;
+ int64_t blocklen;
const char *blockptr = TSIOBufferBlockReadStart(block, txn->resp_reader, &blocklen);
if (txn->response_len+blocklen <= RESPONSE_MAX_SIZE) {
@@ -560,7 +560,7 @@ synclient_txn_read_response_handler(TSCo
ClientTxn *txn = (ClientTxn *) TSContDataGet(contp);
TSAssert(txn->magic == MAGIC_ALIVE);
- int64 avail;
+ int64_t avail;
switch (event) {
case TS_EVENT_VCONN_READ_READY:
@@ -611,7 +611,7 @@ synclient_txn_write_request(TSCont contp
TSIOBufferBlock block;
char *ptr_block;
- int64 len, ndone, ntodo, towrite, avail;
+ int64_t len, ndone, ntodo, towrite, avail;
len = strlen(txn->request);
@@ -862,7 +862,7 @@ synserver_txn_write_response(TSCont cont
TSIOBufferBlock block;
char *ptr_block;
- int64 len, ndone, ntodo, towrite, avail;
+ int64_t len, ndone, ntodo, towrite, avail;
char *response;
response = generate_response(txn->request);
@@ -938,7 +938,7 @@ synserver_txn_read_request(TSCont contp)
TSIOBufferBlock block = TSIOBufferReaderStart(txn->req_reader);
while (block != NULL) {
- int64 blocklen;
+ int64_t blocklen;
const char *blockptr = TSIOBufferBlockReadStart(block, txn->req_reader, &blocklen);
if (txn->request_len+blocklen <= REQUEST_MAX_SIZE) {
@@ -967,7 +967,7 @@ synserver_txn_read_request_handler(TSCon
ServerTxn *txn = (ServerTxn *) TSContDataGet(contp);
TSAssert(txn->magic == MAGIC_ALIVE);
- int64 avail;
+ int64_t avail;
int end_of_request;
switch (event) {
Modified: trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkIOCoreAPI.cc Wed Dec 15 01:15:09 2010
@@ -290,7 +290,7 @@ TSVIOReaderGet(TSVIO viop)
return vio->get_reader();
}
-int64
+int64_t
TSVIONBytesGet(TSVIO viop)
{
if (sdk_sanity_check_iocore_structure(viop) != TS_SUCCESS)
@@ -301,7 +301,7 @@ TSVIONBytesGet(TSVIO viop)
}
TSReturnCode
-TSVIONBytesSet(TSVIO viop, int64 nbytes)
+TSVIONBytesSet(TSVIO viop, int64_t nbytes)
{
if ((sdk_sanity_check_iocore_structure(viop) != TS_SUCCESS) || nbytes < 0)
return TS_ERROR;
@@ -311,7 +311,7 @@ TSVIONBytesSet(TSVIO viop, int64 nbytes)
return TS_SUCCESS;
}
-int64
+int64_t
TSVIONDoneGet(TSVIO viop)
{
if (sdk_sanity_check_iocore_structure(viop) != TS_SUCCESS)
@@ -322,7 +322,7 @@ TSVIONDoneGet(TSVIO viop)
}
TSReturnCode
-TSVIONDoneSet(TSVIO viop, int64 ndone)
+TSVIONDoneSet(TSVIO viop, int64_t ndone)
{
if ((sdk_sanity_check_iocore_structure(viop) != TS_SUCCESS) || ndone < 0)
return TS_ERROR;
@@ -332,7 +332,7 @@ TSVIONDoneSet(TSVIO viop, int64 ndone)
return TS_SUCCESS;
}
-int64
+int64_t
TSVIONTodoGet(TSVIO viop)
{
if (sdk_sanity_check_iocore_structure(viop) != TS_SUCCESS)
@@ -390,7 +390,7 @@ INKUDPBind(TSCont contp, unsigned int ip
}
TSAction
-INKUDPSendTo(TSCont contp, INKUDPConn udp, unsigned int ip, int port, char *data, int64 len)
+INKUDPSendTo(TSCont contp, INKUDPConn udp, unsigned int ip, int port, char *data, int64_t len)
{
FORCE_PLUGIN_MUTEX(contp);
UDPPacket *packet = new_UDPPacket();
@@ -570,8 +570,8 @@ TSIOBufferAppend(TSIOBuffer bufp, TSIOBu
return TS_SUCCESS;
}
-int64
-TSIOBufferCopy(TSIOBuffer bufp, TSIOBufferReader readerp, int64 length, int64 offset)
+int64_t
+TSIOBufferCopy(TSIOBuffer bufp, TSIOBufferReader readerp, int64_t length, int64_t offset)
{
if ((sdk_sanity_check_iocore_structure(bufp) != TS_SUCCESS) ||
(sdk_sanity_check_iocore_structure(readerp) != TS_SUCCESS) || length < 0 || offset < 0)
@@ -583,8 +583,8 @@ TSIOBufferCopy(TSIOBuffer bufp, TSIOBuff
return b->write(r, length, offset);
}
-int64
-TSIOBufferWrite(TSIOBuffer bufp, const void *buf, int64 length)
+int64_t
+TSIOBufferWrite(TSIOBuffer bufp, const void *buf, int64_t length)
{
if ((sdk_sanity_check_iocore_structure(bufp) != TS_SUCCESS) || (buf == NULL) || (length < 0)) {
return TS_ERROR;
@@ -596,14 +596,14 @@ TSIOBufferWrite(TSIOBuffer bufp, const v
// not in SDK3.0
void
-TSIOBufferReaderCopy(TSIOBufferReader readerp, const void *buf, int64 length)
+TSIOBufferReaderCopy(TSIOBufferReader readerp, const void *buf, int64_t length)
{
IOBufferReader *r = (IOBufferReader *) readerp;
r->memcpy(buf, length);
}
TSReturnCode
-TSIOBufferProduce(TSIOBuffer bufp, int64 nbytes)
+TSIOBufferProduce(TSIOBuffer bufp, int64_t nbytes)
{
if ((sdk_sanity_check_iocore_structure(bufp) != TS_SUCCESS) || nbytes < 0)
return TS_ERROR;
@@ -614,7 +614,7 @@ TSIOBufferProduce(TSIOBuffer bufp, int64
}
TSIOBufferData
-TSIOBufferDataCreate(void *data, int64 size, TSIOBufferDataFlags flags)
+TSIOBufferDataCreate(void *data, int64_t size, TSIOBufferDataFlags flags)
{
#ifdef DEBUG
if (data == NULL || data == TS_ERROR_PTR || size <= 0 ||
@@ -643,7 +643,7 @@ TSIOBufferDataCreate(void *data, int64 s
}
TSIOBufferBlock
-TSIOBufferBlockCreate(TSIOBufferData datap, int64 size, int64 offset)
+TSIOBufferBlockCreate(TSIOBufferData datap, int64_t size, int64_t offset)
{
if ((sdk_sanity_check_iocore_structure(datap) != TS_SUCCESS) || size < 0 || offset < 0)
return (TSIOBufferBlock) TS_ERROR;
@@ -673,7 +673,7 @@ TSIOBufferBlockNext(TSIOBufferBlock bloc
}
// dev API, not exposed
-int64
+int64_t
TSIOBufferBlockDataSizeGet(TSIOBufferBlock blockp)
{
IOBufferBlock *blk = (IOBufferBlock *) blockp;
@@ -681,7 +681,7 @@ TSIOBufferBlockDataSizeGet(TSIOBufferBlo
}
const char *
-TSIOBufferBlockReadStart(TSIOBufferBlock blockp, TSIOBufferReader readerp, int64 *avail)
+TSIOBufferBlockReadStart(TSIOBufferBlock blockp, TSIOBufferReader readerp, int64_t *avail)
{
if ((sdk_sanity_check_iocore_structure(blockp) != TS_SUCCESS) ||
(sdk_sanity_check_iocore_structure(readerp) != TS_SUCCESS))
@@ -709,7 +709,7 @@ TSIOBufferBlockReadStart(TSIOBufferBlock
return (const char *) p;
}
-int64
+int64_t
TSIOBufferBlockReadAvail(TSIOBufferBlock blockp, TSIOBufferReader readerp)
{
if ((sdk_sanity_check_iocore_structure(blockp) != TS_SUCCESS) ||
@@ -718,7 +718,7 @@ TSIOBufferBlockReadAvail(TSIOBufferBlock
IOBufferBlock *blk = (IOBufferBlock *) blockp;
IOBufferReader *reader = (IOBufferReader *) readerp;
- int64 avail;
+ int64_t avail;
avail = blk->read_avail();
@@ -733,7 +733,7 @@ TSIOBufferBlockReadAvail(TSIOBufferBlock
}
char *
-TSIOBufferBlockWriteStart(TSIOBufferBlock blockp, int64 *avail)
+TSIOBufferBlockWriteStart(TSIOBufferBlock blockp, int64_t *avail)
{
if (sdk_sanity_check_iocore_structure(blockp) != TS_SUCCESS)
return (char *) TS_ERROR_PTR;
@@ -745,7 +745,7 @@ TSIOBufferBlockWriteStart(TSIOBufferBloc
return blk->end();
}
-int64
+int64_t
TSIOBufferBlockWriteAvail(TSIOBufferBlock blockp)
{
if (sdk_sanity_check_iocore_structure(blockp) != TS_SUCCESS) {
@@ -757,7 +757,7 @@ TSIOBufferBlockWriteAvail(TSIOBufferBloc
}
TSReturnCode
-TSIOBufferWaterMarkGet(TSIOBuffer bufp, int64 *water_mark)
+TSIOBufferWaterMarkGet(TSIOBuffer bufp, int64_t *water_mark)
{
if ((sdk_sanity_check_iocore_structure(bufp) != TS_SUCCESS) || (water_mark == NULL)) {
return TS_ERROR;
@@ -769,7 +769,7 @@ TSIOBufferWaterMarkGet(TSIOBuffer bufp,
}
TSReturnCode
-TSIOBufferWaterMarkSet(TSIOBuffer bufp, int64 water_mark)
+TSIOBufferWaterMarkSet(TSIOBuffer bufp, int64_t water_mark)
{
if ((sdk_sanity_check_iocore_structure(bufp) != TS_SUCCESS) || water_mark < 0)
return TS_ERROR;
@@ -830,7 +830,7 @@ TSIOBufferReaderStart(TSIOBufferReader r
}
TSReturnCode
-TSIOBufferReaderConsume(TSIOBufferReader readerp, int64 nbytes)
+TSIOBufferReaderConsume(TSIOBufferReader readerp, int64_t nbytes)
{
if ((sdk_sanity_check_iocore_structure(readerp) != TS_SUCCESS) || nbytes < 0)
return TS_ERROR;
@@ -840,7 +840,7 @@ TSIOBufferReaderConsume(TSIOBufferReader
return TS_SUCCESS;
}
-int64
+int64_t
TSIOBufferReaderAvail(TSIOBufferReader readerp)
{
if (sdk_sanity_check_iocore_structure(readerp) != TS_SUCCESS)
Modified: trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/Main.cc Wed Dec 15 01:15:09 2010
@@ -1141,17 +1141,17 @@ struct ShowStats: public Continuation
FILE *fp;
#endif
int cycle;
- int64 last_cc;
- int64 last_rb;
- int64 last_w;
- int64 last_r;
- int64 last_wb;
- int64 last_nrb;
- int64 last_nw;
- int64 last_nr;
- int64 last_nwb;
- int64 last_p;
- int64 last_o;
+ int64_t last_cc;
+ int64_t last_rb;
+ int64_t last_w;
+ int64_t last_r;
+ int64_t last_wb;
+ int64_t last_nrb;
+ int64_t last_nw;
+ int64_t last_nr;
+ int64_t last_nwb;
+ int64_t last_p;
+ int64_t last_o;
int mainEvent(int event, Event * e)
{
(void) event;
@@ -1161,38 +1161,38 @@ struct ShowStats: public Continuation
ink_statval_t sval, cval;
NET_READ_DYN_SUM(net_calls_to_readfromnet_stat, sval);
- int64 d_rb = sval - last_rb;
+ int64_t d_rb = sval - last_rb;
last_rb += d_rb;
NET_READ_DYN_SUM(net_calls_to_readfromnet_afterpoll_stat, sval);
- int64 d_r = sval - last_r;
+ int64_t d_r = sval - last_r;
last_r += d_r;
NET_READ_DYN_SUM(net_calls_to_writetonet_stat, sval);
- int64 d_wb = sval - last_wb;
+ int64_t d_wb = sval - last_wb;
last_wb += d_wb;
NET_READ_DYN_SUM(net_calls_to_writetonet_afterpoll_stat, sval);
- int64 d_w = sval - last_w;
+ int64_t d_w = sval - last_w;
last_w += d_w;
NET_READ_DYN_STAT(net_read_bytes_stat, sval, cval);
- int64 d_nrb = sval - last_nrb;
+ int64_t d_nrb = sval - last_nrb;
last_nrb += d_nrb;
- int64 d_nr = cval - last_nr;
+ int64_t d_nr = cval - last_nr;
last_nr += d_nr;
NET_READ_DYN_STAT(net_write_bytes_stat, sval, cval);
- int64 d_nwb = sval - last_nwb;
+ int64_t d_nwb = sval - last_nwb;
last_nwb += d_nwb;
- int64 d_nw = cval - last_nw;
+ int64_t d_nw = cval - last_nw;
last_nw += d_nw;
NET_READ_GLOBAL_DYN_SUM(net_connections_currently_open_stat, sval);
- int64 d_o = sval;
+ int64_t d_o = sval;
NET_READ_DYN_STAT(net_handler_run_stat, sval, cval);
- int64 d_p = cval - last_p;
+ int64_t d_p = cval - last_p;
last_p += d_p;
- printf("%lld:%lld %lld:%lld %lld:%lld %lld:%lld %lld %lld\n",
+ printf("%" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 " %" PRId64 "\n",
d_rb, d_r, d_wb, d_w, d_nrb, d_nr, d_nwb, d_nw, d_o, d_p);
#ifdef ENABLE_TIME_TRACE
int i;
@@ -2121,7 +2121,7 @@ xmlBandwidthSchemaRead(XMLNode * node)
Debug("bw-mgmt", "Read in: limit_mbps = %lf\n", G_inkPipeInfo.interfaceMbps);
for (i = 0; i < G_inkPipeInfo.numPipes + 1; i++) {
G_inkPipeInfo.perPipeInfo[i].bwLimit =
- (int64) (G_inkPipeInfo.perPipeInfo[i].wt * G_inkPipeInfo.interfaceMbps * 1024.0 * 1024.0);
+ (int64_t) (G_inkPipeInfo.perPipeInfo[i].wt * G_inkPipeInfo.interfaceMbps * 1024.0 * 1024.0);
p = (unsigned char *) &(G_inkPipeInfo.perPipeInfo[i].destIP);
Debug("bw-mgmt", "Pipe [%d]: wt = %lf, dest ip = %d.%d.%d.%d\n",
i, G_inkPipeInfo.perPipeInfo[i].wt, p[0], p[1], p[2], p[3]);
Modified: trafficserver/traffic/trunk/proxy/MuxVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/MuxVC.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/MuxVC.cc (original)
+++ trafficserver/traffic/trunk/proxy/MuxVC.cc Wed Dec 15 01:15:09 2010
@@ -134,7 +134,7 @@ MuxClientVC::~MuxClientVC()
}
void
-MuxClientVC::init(MuxVC * mvc, int32 id_arg)
+MuxClientVC::init(MuxVC * mvc, int32_t id_arg)
{
ink_debug_assert(!closed);
@@ -198,7 +198,7 @@ MuxClientVC::kill()
VIO *
-MuxClientVC::do_io_read(Continuation * c, int64 nbytes, MIOBuffer * buf)
+MuxClientVC::do_io_read(Continuation * c, int64_t nbytes, MIOBuffer * buf)
{
ink_debug_assert(!closed);
@@ -237,7 +237,7 @@ MuxClientVC::do_io_read(Continuation * c
}
VIO *
-MuxClientVC::do_io_write(Continuation * c, int64 nbytes, IOBufferReader * abuffer, bool owner)
+MuxClientVC::do_io_write(Continuation * c, int64_t nbytes, IOBufferReader * abuffer, bool owner)
{
ink_debug_assert(!closed);
@@ -1338,12 +1338,12 @@ MuxVC::try_processor_list_remove()
return 0;
}
-// MuxClientVC* MuxVC::new_client(int32 id_arg)
+// MuxClientVC* MuxVC::new_client(int32_t id_arg)
//
// Caller MUST be holding MuxVC::mutex
//
MuxClientVC *
-MuxVC::new_client(int32 id_arg)
+MuxVC::new_client(int32_t id_arg)
{
ink_debug_assert(magic == MUX_VC_MAGIC_ALIVE);
@@ -1426,12 +1426,12 @@ MuxVC::remove_client(MuxClientVC * clien
}
}
-// void MuxVC::enqueue_control_message(int msg_id, int32 cid, int data_size)
+// void MuxVC::enqueue_control_message(int msg_id, int32_t cid, int data_size)
//
// Builds a control message and inserts it on the write buffer
//
int
-MuxVC::enqueue_control_message(int msg_id, int32 cid, int data_size)
+MuxVC::enqueue_control_message(int msg_id, int32_t cid, int data_size)
{
ink_debug_assert(data_size + sizeof(MuxMessage) <= USHRT_MAX);
@@ -1439,9 +1439,9 @@ MuxVC::enqueue_control_message(int msg_i
MuxMessage mm;
Debug("mux_cntl", "enqueue_control_message: %s for %d", control_msg_id_to_string(msg_id), cid);
- mm.version = (uint8) INKMUX_PROTO_VERSION_0_1;
- mm.msg_type = (uint8) msg_id;
- mm.msg_len = (uint16) (sizeof(MuxMessage) + data_size);
+ mm.version = (uint8_t) INKMUX_PROTO_VERSION_0_1;
+ mm.msg_type = (uint8_t) msg_id;
+ mm.msg_len = (uint16_t) (sizeof(MuxMessage) + data_size);
mm.client_id = cid;
write_buffer->write((char *) &mm, sizeof(MuxMessage));
@@ -1525,13 +1525,13 @@ MuxVC::process_clients()
}
}
-// MuxClientVC* MuxVC::find_client(int32 client_id)
+// MuxClientVC* MuxVC::find_client(int32_t client_id)
//
// Search the client list of a MuxClientVC
// matching clinet_id
//
MuxClientVC *
-MuxVC::find_client(int32 client_id)
+MuxVC::find_client(int32_t client_id)
{
MuxClientVC *current = active_clients.head;
@@ -2568,7 +2568,7 @@ public:
char *request;
private:
Arena arena;
- int32 extract_id(const char *query);
+ int32_t extract_id(const char *query);
void dump_mux(MuxVC * mvc);
void dump_mux_client(MuxClientVC * client);
};
@@ -2743,7 +2743,7 @@ MuxPagesHandler::handle_mux_details(int
ink_debug_assert(event == EVENT_IMMEDIATE || event == EVENT_INTERVAL);
Event *call_event = (Event *) data;
- int32 mux_id = extract_id(request);
+ int32_t mux_id = extract_id(request);
if (mux_id < 0) {
resp_begin("Mux Pages Error");
@@ -2857,11 +2857,11 @@ MuxPagesHandler::handle_callback(int eve
return EVENT_DONE;
}
-int32
+int32_t
MuxPagesHandler::extract_id(const char *query)
{
char *p;
- int32 id;
+ int32_t id;
p = (char *) strstr(query, "id=");
if (!p) {
Modified: trafficserver/traffic/trunk/proxy/MuxVC.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/MuxVC.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/MuxVC.h (original)
+++ trafficserver/traffic/trunk/proxy/MuxVC.h Wed Dec 15 01:15:09 2010
@@ -81,10 +81,10 @@ enum
struct MuxMessage
{
- uint8 version;
- uint8 msg_type;
- uint16 msg_len;
- int32 client_id;
+ uint8_t version;
+ uint8_t msg_type;
+ uint16_t msg_len;
+ int32_t client_id;
};
struct MuxClientState
@@ -104,12 +104,12 @@ public:
MuxClientVC();
~MuxClientVC();
- void init(MuxVC * mvc, int32 id);
+ void init(MuxVC * mvc, int32_t id);
void kill();
- virtual VIO *do_io_read(Continuation * c = NULL, int64 nbytes = INT64_MAX, MIOBuffer * buf = 0);
+ virtual VIO *do_io_read(Continuation * c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer * buf = 0);
- virtual VIO *do_io_write(Continuation * c = NULL, int64 nbytes = INT64_MAX, IOBufferReader * buf = 0, bool owner = false);
+ virtual VIO *do_io_write(Continuation * c = NULL, int64_t nbytes = INT64_MAX, IOBufferReader * buf = 0, bool owner = false);
virtual bool is_over_ssl()
{
@@ -145,8 +145,8 @@ public:
int main_handler(int event, void *data);
Link<MuxClientVC> link;
- int32 id;
- uint32 magic;
+ int32_t id;
+ uint32_t magic;
private:
@@ -163,7 +163,7 @@ private:
int send_write_shutdown_message();
bool closed;
- uint32 other_side_closed;
+ uint32_t other_side_closed;
int reentrancy_count;
bool need_boost;
@@ -230,7 +230,7 @@ public:
void init_from_accept(NetVConnection * nvc, Continuation * acceptc);
void kill();
- MuxClientVC *new_client(int32 id = 0);
+ MuxClientVC *new_client(int32_t id = 0);
void remove_client(MuxClientVC * client_vc);
int state_handle_mux(int event, void *data);
@@ -270,18 +270,18 @@ private:
void process_read_msg_body();
void reset_read_msg_state();
- MuxClientVC *find_client(int32 client_id);
+ MuxClientVC *find_client(int32_t client_id);
void process_control_message();
void process_channel_open();
void process_channel_close(MuxClientVC * client);
void process_channel_inbound_shutdown(MuxClientVC * client);
- int enqueue_control_message(int msg_id, int32 cid, int data_size = 0);
+ int enqueue_control_message(int msg_id, int32_t cid, int data_size = 0);
void cleanup_on_error();
int try_processor_list_remove();
- uint32 magic;
- int32 id;
- int32 reentrancy_count;
+ uint32_t magic;
+ int32_t id;
+ int32_t reentrancy_count;
bool terminate_vc;
bool on_mux_list;
bool clients_notified_of_error;
@@ -292,7 +292,7 @@ private:
VIO *write_vio;
// Vars for preventing overflow on the outbound channel
- uint64 write_bytes_added;
+ uint64_t write_bytes_added;
bool writes_blocked;
Action *net_connect_action;
Modified: trafficserver/traffic/trunk/proxy/ParentSelection.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ParentSelection.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ParentSelection.cc (original)
+++ trafficserver/traffic/trunk/proxy/ParentSelection.cc Wed Dec 15 01:15:09 2010
@@ -527,12 +527,12 @@ ParentRecord::FindParent(bool first_call
ink_assert(go_direct == true);
goto NO_PARENTS;
} else if (round_robin == true) {
- cur_index = ink_atomic_increment((int32 *) & rr_next, 1);
+ cur_index = ink_atomic_increment((int32_t *) & rr_next, 1);
cur_index = result->start_parent = cur_index % num_parents;
} else {
switch (round_robin) {
case P_STRICT_ROUND_ROBIN:
- cur_index = ink_atomic_increment((int32 *) & rr_next, 1);
+ cur_index = ink_atomic_increment((int32_t *) & rr_next, 1);
cur_index = cur_index % num_parents;
break;
case P_HASH_ROUND_ROBIN:
@@ -999,17 +999,17 @@ setup_socks_servers(ParentRecord * rec_a
int n_parents = rec_arr[j].num_parents;
for (int i = 0; i < n_parents; i++) {
- uint32 bad_ip = (uint32) - 1;
- uint8 *ip;
+ uint32_t bad_ip = (uint32_t) - 1;
+ uint8_t *ip;
ink_gethostbyname_r_data data;
struct hostent *ent = ink_gethostbyname_r(pr[i].hostname, &data);
if (ent) {
- ip = (uint8 *) ent->h_addr_list[0];
+ ip = (uint8_t *) ent->h_addr_list[0];
} else {
Warning("Could not resolve socks server name \"%s\". " "Please correct it", pr[i].hostname);
- ip = (uint8 *) & bad_ip;
+ ip = (uint8_t *) & bad_ip;
}
snprintf(pr[i].hostname, DOMAIN_NAME_MAX + 1, "%hhu.%hhu.%hhu.%hhu", ip[0], ip[1], ip[2], ip[3]);
}
Modified: trafficserver/traffic/trunk/proxy/ParentSelection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ParentSelection.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ParentSelection.h (original)
+++ trafficserver/traffic/trunk/proxy/ParentSelection.h Wed Dec 15 01:15:09 2010
@@ -77,8 +77,8 @@ struct ParentResult
int line_number;
P_table *epoch; // A pointer to the table used.
ParentRecord *rec;
- uint32 last_parent;
- uint32 start_parent;
+ uint32_t last_parent;
+ uint32_t start_parent;
bool wrap_around;
bool retry;
};
@@ -129,10 +129,10 @@ struct ParentConfigParams:public ConfigI
P_table *ParentTable;
ParentRecord *DefaultParent;
- int32 ParentRetryTime;
- int32 ParentEnable;
- int32 FailThreshold;
- int32 DNS_ParentOnly;
+ int32_t ParentRetryTime;
+ int32_t ParentEnable;
+ int32_t FailThreshold;
+ int32_t DNS_ParentOnly;
};
struct ParentConfig
@@ -160,9 +160,9 @@ struct pRecord
{
char hostname[DOMAIN_NAME_MAX + 1];
int port;
- int32 failedAt;
+ int32_t failedAt;
int failCount;
- int32 upAt;
+ int32_t upAt;
const char *scheme; // for which parent matches (if any)
};
@@ -198,7 +198,7 @@ public:
//private:
const char *ProcessParents(char *val);
ParentRR_t round_robin;
- volatile uint32 rr_next;
+ volatile uint32_t rr_next;
bool go_direct;
};
Modified: trafficserver/traffic/trunk/proxy/PluginVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/PluginVC.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/PluginVC.cc (original)
+++ trafficserver/traffic/trunk/proxy/PluginVC.cc Wed Dec 15 01:15:09 2010
@@ -219,7 +219,7 @@ PluginVC::main_handler(int event, void *
}
VIO *
-PluginVC::do_io_read(Continuation * c, int64 nbytes, MIOBuffer * buf)
+PluginVC::do_io_read(Continuation * c, int64_t nbytes, MIOBuffer * buf)
{
ink_assert(!closed);
@@ -251,7 +251,7 @@ PluginVC::do_io_read(Continuation * c, i
}
VIO *
-PluginVC::do_io_write(Continuation * c, int64 nbytes, IOBufferReader * abuffer, bool owner)
+PluginVC::do_io_write(Continuation * c, int64_t nbytes, IOBufferReader * abuffer, bool owner)
{
ink_assert(!closed);
@@ -415,18 +415,18 @@ PluginVC::do_io_shutdown(ShutdownHowTo_t
//
// Returns number of bytes transfered
//
-int64
-PluginVC::transfer_bytes(MIOBuffer * transfer_to, IOBufferReader * transfer_from, int64 act_on)
+int64_t
+PluginVC::transfer_bytes(MIOBuffer * transfer_to, IOBufferReader * transfer_from, int64_t act_on)
{
- int64 total_added = 0;
+ int64_t total_added = 0;
ink_debug_assert(act_on <= transfer_from->read_avail());
while (act_on > 0) {
- int64 block_read_avail = transfer_from->block_read_avail();
- int64 to_move = MIN(act_on, block_read_avail);
- int64 moved = 0;
+ int64_t block_read_avail = transfer_from->block_read_avail();
+ int64_t to_move = MIN(act_on, block_read_avail);
+ int64_t moved = 0;
if (to_move <= 0) {
break;
@@ -495,14 +495,14 @@ PluginVC::process_write_side(bool other_
// Check the state of our write buffer as well as ntodo
- int64 ntodo = write_state.vio.ntodo();
+ int64_t ntodo = write_state.vio.ntodo();
if (ntodo == 0) {
return;
}
IOBufferReader *reader = write_state.vio.get_reader();
- int64 bytes_avail = reader->read_avail();
- int64 act_on = MIN(bytes_avail, ntodo);
+ int64_t bytes_avail = reader->read_avail();
+ int64_t act_on = MIN(bytes_avail, ntodo);
Debug("pvc", "[%u] %s: process_write_side; act_on %d", PVC_ID, PVC_TYPE, act_on);
@@ -522,14 +522,14 @@ PluginVC::process_write_side(bool other_
// Bytes available, try to transfer to the PluginVCCore
// intermediate buffer
//
- int64 buf_space = PVC_DEFAULT_MAX_BYTES - core_buffer->max_read_avail();
+ int64_t buf_space = PVC_DEFAULT_MAX_BYTES - core_buffer->max_read_avail();
if (buf_space <= 0) {
Debug("pvc", "[%u] %s: process_write_side no buffer space", PVC_ID, PVC_TYPE);
return;
}
act_on = MIN(act_on, buf_space);
- int64 added = transfer_bytes(core_buffer, reader, act_on);
+ int64_t added = transfer_bytes(core_buffer, reader, act_on);
if (added < 0) {
// Couldn't actually get the buffer space. This only
// happens on small transfers with the above
@@ -611,13 +611,13 @@ PluginVC::process_read_side(bool other_s
need_read_process = false;
// Check the state of our read buffer as well as ntodo
- int64 ntodo = read_state.vio.ntodo();
+ int64_t ntodo = read_state.vio.ntodo();
if (ntodo == 0) {
return;
}
- int64 bytes_avail = core_reader->read_avail();
- int64 act_on = MIN(bytes_avail, ntodo);
+ int64_t bytes_avail = core_reader->read_avail();
+ int64_t act_on = MIN(bytes_avail, ntodo);
Debug("pvc", "[%u] %s: process_read_side; act_on %d", PVC_ID, PVC_TYPE, act_on);
@@ -632,16 +632,16 @@ PluginVC::process_read_side(bool other_s
//
MIOBuffer *output_buffer = read_state.vio.get_writer();
- int64 water_mark = output_buffer->water_mark;
+ int64_t water_mark = output_buffer->water_mark;
water_mark = MAX(water_mark, PVC_DEFAULT_MAX_BYTES);
- int64 buf_space = water_mark - output_buffer->max_read_avail();
+ int64_t buf_space = water_mark - output_buffer->max_read_avail();
if (buf_space <= 0) {
Debug("pvc", "[%u] %s: process_read_side no buffer space", PVC_ID, PVC_TYPE);
return;
}
act_on = MIN(act_on, buf_space);
- int64 added = transfer_bytes(output_buffer, core_reader, act_on);
+ int64_t added = transfer_bytes(output_buffer, core_reader, act_on);
if (added <= 0) {
// Couldn't actually get the buffer space. This only
// happens on small transfers with the above
@@ -1124,14 +1124,14 @@ PluginVCCore::kill_no_connect()
}
void
-PluginVCCore::set_passive_addr(uint32 ip, int port)
+PluginVCCore::set_passive_addr(uint32_t ip, int port)
{
((struct sockaddr_in *)&(passive_addr_struct))->sin_addr.s_addr = htonl(ip);
((struct sockaddr_in *)&(passive_addr_struct))->sin_port = htons(port);
}
void
-PluginVCCore::set_active_addr(uint32 ip, int port)
+PluginVCCore::set_active_addr(uint32_t ip, int port)
{
((struct sockaddr_in *)&(active_addr_struct))->sin_addr.s_addr = htonl(ip);
((struct sockaddr_in *)&(active_addr_struct))->sin_port = htons(port);
Modified: trafficserver/traffic/trunk/proxy/PluginVC.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/PluginVC.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/PluginVC.h (original)
+++ trafficserver/traffic/trunk/proxy/PluginVC.h Wed Dec 15 01:15:09 2010
@@ -83,9 +83,9 @@ public:
PluginVC();
~PluginVC();
- virtual VIO *do_io_read(Continuation * c = NULL, int64 nbytes = INT64_MAX, MIOBuffer * buf = 0);
+ virtual VIO *do_io_read(Continuation * c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer * buf = 0);
- virtual VIO *do_io_write(Continuation * c = NULL, int64 nbytes = INT64_MAX, IOBufferReader * buf = 0, bool owner = false);
+ virtual VIO *do_io_write(Continuation * c = NULL, int64_t nbytes = INT64_MAX, IOBufferReader * buf = 0, bool owner = false);
virtual bool is_over_ssl()
{
@@ -128,9 +128,9 @@ private:
void setup_event_cb(ink_hrtime in, Event ** e_ptr);
void update_inactive_time();
- int64 transfer_bytes(MIOBuffer * transfer_to, IOBufferReader * transfer_from, int64 act_on);
+ int64_t transfer_bytes(MIOBuffer * transfer_to, IOBufferReader * transfer_from, int64_t act_on);
- uint32 magic;
+ uint32_t magic;
PluginVC_t vc_type;
PluginVCCore *core_obj;
@@ -176,8 +176,8 @@ public:
Action *connect_re(Continuation * c);
void kill_no_connect();
- void set_active_addr(uint32 ip, int port);
- void set_passive_addr(uint32 ip, int port);
+ void set_active_addr(uint32_t ip, int port);
+ void set_passive_addr(uint32_t ip, int port);
void set_active_data(void *data);
void set_passive_data(void *data);
Modified: trafficserver/traffic/trunk/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.cc (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.cc Wed Dec 15 01:15:09 2010
@@ -75,27 +75,27 @@ PrefetchProcessor prefetchProcessor;
KeepAliveConnTable *g_conn_table;
static int prefetch_udp_fd = 0;
-static int32 udp_seq_no;
+static int32_t udp_seq_no;
-static inline uint32
+static inline uint32_t
get_udp_seq_no()
{
return ink_atomic_increment(&udp_seq_no, 1);
}
static inline void
-setup_udp_header(char *header, uint32 seq_no, uint32 pkt_no, bool last_pkt)
+setup_udp_header(char *header, uint32_t seq_no, uint32_t pkt_no, bool last_pkt)
{
- uint32 *hdr = (uint32 *) header;
+ uint32_t *hdr = (uint32_t *) header;
hdr[0] = 0;
hdr[1] = htonl(seq_no);
hdr[2] = htonl((last_pkt ? PRELOAD_UDP_LAST_PKT_FLAG : 0) | (pkt_no & PRELOAD_UDP_PKT_NUM_MASK));
}
static inline void
-setup_object_header(char *header, uint32 size, bool url_promise)
+setup_object_header(char *header, uint32_t size, bool url_promise)
{
- uint32 *hdr = (uint32 *) header;
+ uint32_t *hdr = (uint32_t *) header;
hdr[0] = htonl(size);
hdr[1] = 0; //we are not pinning
hdr[2] = (url_promise) ? htonl(PRELOAD_HDR_URL_PROMISE_FLAG) : 0;
@@ -558,7 +558,7 @@ PrefetchTransform::parse_data(IOBufferRe
PrefetchUrlEntry *
PrefetchTransform::hash_add(char *s)
{
- uint32 index = 0;
+ uint32_t index = 0;
int str_len = strlen(s);
if (normalize_url(s, &str_len) > 0)
@@ -667,7 +667,7 @@ check_n_attach_prefetch_transform(HttpSM
Debug("PrefetchParser", "Adding Prefetch Parser 0x%p\n", prefetch_trans);
TSHttpTxnHookAdd(sm, TS_HTTP_RESPONSE_TRANSFORM_HOOK, prefetch_trans);
- DUMP_HEADER("PrefetchParserHdrs", &sm->t_state.hdr_info.client_request, (int64)0,
+ DUMP_HEADER("PrefetchParserHdrs", &sm->t_state.hdr_info.client_request, (int64_t)0,
"Request Header given for Prefetch Parser");
}
}
@@ -1010,7 +1010,7 @@ PrefetchBlaster::init(PrefetchUrlEntry *
} else
entry->child_ip = entry->req_ip;
- DUMP_HEADER("PrefetchBlasterHdrs", request, (int64)0, "Request Header from Prefetch Blaster");
+ DUMP_HEADER("PrefetchBlasterHdrs", request, (int64_t)0, "Request Header from Prefetch Blaster");
url_ent = entry->assign(); //refcount
transform = p_trans->assign();
@@ -1377,11 +1377,11 @@ Lcheckcookie:
request->field_delete(MIME_FIELD_COOKIE, MIME_LEN_COOKIE);
}
- DUMP_HEADER("PrefetchCookies", req_hdr, (int64)0,
+ DUMP_HEADER("PrefetchCookies", req_hdr, (int64_t)0,
"Request Header for the top page used as the base for the new request with Cookies");
- DUMP_HEADER("PrefetchCookies", resp_hdr, (int64)0,
+ DUMP_HEADER("PrefetchCookies", resp_hdr, (int64_t)0,
"Response Header for the top page used as the base for the new request with Cookies");
- DUMP_HEADER("PrefetchCookies", request, (int64)0, "Request Header with Cookies generated by Prefetch Parser");
+ DUMP_HEADER("PrefetchCookies", request, (int64_t)0, "Request Header with Cookies generated by Prefetch Parser");
}
int
Modified: trafficserver/traffic/trunk/proxy/Prefetch.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.h (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.h Wed Dec 15 01:15:09 2010
@@ -118,10 +118,10 @@ public:
int object_buf_status;
- uint32 req_ip; /*ip address where request is coming from */
- uint32 child_ip;
- uint32 url_multicast_ip;
- uint32 data_multicast_ip;
+ uint32_t req_ip; /*ip address where request is coming from */
+ uint32_t child_ip;
+ uint32_t url_multicast_ip;
+ uint32_t data_multicast_ip;
PrefetchUrlEntry *blaster_link;
PrefetchUrlEntry *hash_link;
@@ -338,8 +338,8 @@ public:
CacheLookupHttpConfig cache_lookup_config;
//udp related:
- uint32 n_pkts_sent;
- uint32 seq_no;
+ uint32_t n_pkts_sent;
+ uint32_t seq_no;
IOBufferBlock *io_block;
};
Modified: trafficserver/traffic/trunk/proxy/ProxyConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ProxyConfig.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ProxyConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/ProxyConfig.cc Wed Dec 15 01:15:09 2010
@@ -31,7 +31,7 @@ ConfigProcessor configProcessor;
void *
config_int_cb(void *data, void *value)
{
- *(int *) data = *(int64 *) value;
+ *(int *) data = *(int64_t *) value;
return NULL;
}
@@ -45,7 +45,7 @@ config_float_cb(void *data, void *value)
void *
config_long_long_cb(void *data, void *value)
{
- *(int64 *) data = *(int64 *) value;
+ *(int64_t *) data = *(int64_t *) value;
return NULL;
}
Modified: trafficserver/traffic/trunk/proxy/ProxyConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ProxyConfig.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ProxyConfig.h (original)
+++ trafficserver/traffic/trunk/proxy/ProxyConfig.h Wed Dec 15 01:15:09 2010
@@ -79,22 +79,22 @@ Warning("** MUST MIGRATE TO LIBRECORDS *
#define ReadConfigInteger(_i,_s) do { \
LIBRECORDS_WARN; \
bool _found = 0; \
- int64 _ii = pmgmt->record_data->readConfigInteger(_s, &_found); \
+ int64_t _ii = pmgmt->record_data->readConfigInteger(_s, &_found); \
if (_found) _i = _ii; else Warning("Cannot read config %s",_s); \
} while(0)
#define ReadConfigInt32(_i,_s) do { \
LIBRECORDS_WARN; \
bool _found = 0; \
- int64 _ii = pmgmt->record_data->readConfigInteger(_s, &_found); \
- if (_found) _i = (int32)_ii; else Warning("Cannot read config %s",_s); \
+ int64_t _ii = pmgmt->record_data->readConfigInteger(_s, &_found); \
+ if (_found) _i = (int32_t)_ii; else Warning("Cannot read config %s",_s); \
} while(0)
#define ReadConfigInt32U(_i,_s) do { \
LIBRECORDS_WARN; \
bool _found = 0; \
- int64 _ii = pmgmt->record_data->readConfigInteger(_s, &_found); \
- if (_found) _i = (uint32)_ii; else Warning("Cannot read config %s",_s); \
+ int64_t _ii = pmgmt->record_data->readConfigInteger(_s, &_found); \
+ if (_found) _i = (uint32_t)_ii; else Warning("Cannot read config %s",_s); \
} while(0)
#define ReadConfigFloat(_f,_s) do { \
@@ -107,7 +107,7 @@ Warning("** MUST MIGRATE TO LIBRECORDS *
#define ReadLocalInteger(_i,_s) do { \
LIBRECORDS_WARN; \
bool _found = 0; \
- int64 _ii = pmgmt->record_data->readLocalInteger(_s, &_found); \
+ int64_t _ii = pmgmt->record_data->readLocalInteger(_s, &_found); \
if (_found) _i = _ii; else Warning("Cannot read config %s",_s); \
} while(0)
@@ -150,7 +150,7 @@ do { \
#define RegisterConfigUpdateFuncLongLong(_ll,_n) \
do { \
LIBRECORDS_WARN; \
- int64* tmp_ptr = &_ll; \
+ int64_t* tmp_ptr = &_ll; \
ink_assert(pmgmt->record_data->registerConfigUpdateFunc(_n,config_long_long_cb, (void*)tmp_ptr));\
} while(0)
Modified: trafficserver/traffic/trunk/proxy/ReverseProxy.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ReverseProxy.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ReverseProxy.cc (original)
+++ trafficserver/traffic/trunk/proxy/ReverseProxy.cc Wed Dec 15 01:15:09 2010
@@ -98,6 +98,12 @@ bool
request_url_remap(HttpTransact::State * s, HTTPHdr * request_header, char **redirect_url, char **orig_url, char *tag,
unsigned int filter_mask)
{
+ NOWARN_UNUSED(s);
+ NOWARN_UNUSED(request_header);
+ NOWARN_UNUSED(redirect_url);
+ NOWARN_UNUSED(orig_url);
+ NOWARN_UNUSED(tag);
+ NOWARN_UNUSED(filter_mask);
return false;
// return rewrite_table ? rewrite_table->Remap(s, request_header, redirect_url, orig_url, tag, filter_mask) : false;
}
Modified: trafficserver/traffic/trunk/proxy/ReverseProxy.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ReverseProxy.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ReverseProxy.h (original)
+++ trafficserver/traffic/trunk/proxy/ReverseProxy.h Wed Dec 15 01:15:09 2010
@@ -42,7 +42,7 @@
#include "UrlRewrite.h"
#include "UrlMapping.h"
-#define EMPTY_PORT_MAPPING (int32)~0
+#define EMPTY_PORT_MAPPING (int32_t)~0
class url_mapping;
struct host_hdr_info;
Modified: trafficserver/traffic/trunk/proxy/SocksProxy.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/SocksProxy.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/SocksProxy.cc (original)
+++ trafficserver/traffic/trunk/proxy/SocksProxy.cc Wed Dec 15 01:15:09 2010
@@ -309,7 +309,7 @@ SocksProxy::mainEvent(int event, void *d
break;
}
- uint32 ip;
+ uint32_t ip;
memcpy(&ip, &p[4], 4);
state = SERVER_TUNNEL;
Modified: trafficserver/traffic/trunk/proxy/StatAPITypes.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StatAPITypes.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StatAPITypes.h (original)
+++ trafficserver/traffic/trunk/proxy/StatAPITypes.h Wed Dec 15 01:15:09 2010
@@ -40,10 +40,10 @@ class HistogramStats
public:
// TODO: Eliminate STL strings ?
HistogramStats() { }
- HistogramStats(const std::string &stat_prefix, int64 max_stat) { init(stat_prefix, max_stat); }
- void init(const std::string &stat_prefix, int64 max_stat);
- void inc(int64 stat_val);
- int64 get_bucket(int64 theNumber);
+ HistogramStats(const std::string &stat_prefix, int64_t max_stat) { init(stat_prefix, max_stat); }
+ void init(const std::string &stat_prefix, int64_t max_stat);
+ void inc(int64_t stat_val);
+ int64_t get_bucket(int64_t theNumber);
private:
std::vector<uint32_t> buckets; // TODO: Do we need a vector here?
};
Modified: trafficserver/traffic/trunk/proxy/StatSystem.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StatSystem.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StatSystem.h (original)
+++ trafficserver/traffic/trunk/proxy/StatSystem.h Wed Dec 15 01:15:09 2010
@@ -210,7 +210,7 @@ extern DynamicStatsString_t DynamicStats
// For now, use mutexes. May later change to spin_locks, try_locks.
#define ink_stat_lock_t ink_mutex
-typedef int64 ink_statval_t;
+typedef int64_t ink_statval_t;
struct ink_local_stat_t
{
Modified: trafficserver/traffic/trunk/proxy/StatSystemV2.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StatSystemV2.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StatSystemV2.cc (original)
+++ trafficserver/traffic/trunk/proxy/StatSystemV2.cc Wed Dec 15 01:15:09 2010
@@ -30,12 +30,12 @@
extern class EventProcessor eventProcessor;
std::map<std::string, uint32_t> StatSystemV2::stat_name_to_num;
-std::vector< std::pair<std::string, int64> > StatSystemV2::global_stats;
+std::vector< std::pair<std::string, int64_t> > StatSystemV2::global_stats;
uint32_t StatSystemV2::MAX_STATS_ALLOWED = 500000;
uint32_t StatSystemV2::NUM_STATS_ESTIMATE = 5000;
static TSMutex statsMutex = NULL;
-void StatSystemV2::incrementGlobal(uint32_t stat_num, int64 stat_val)
+void StatSystemV2::incrementGlobal(uint32_t stat_num, int64_t stat_val)
{
if(stat_num >= global_stats.size()) {
Debug("http", "Cannot incrementing stat %u as it is greater than global_stats size", stat_num);
@@ -45,7 +45,7 @@ void StatSystemV2::incrementGlobal(uint3
global_stats[stat_num].second += stat_val;
}
-bool StatSystemV2::increment(uint32_t stat_num, int64 stat_val)
+bool StatSystemV2::increment(uint32_t stat_num, int64_t stat_val)
{
if(stat_num >= MAX_STATS_ALLOWED) {
return false;
@@ -64,7 +64,7 @@ bool StatSystemV2::increment(uint32_t st
return true;
}
-bool StatSystemV2::increment(const char *stat_name, int64 stat_val)
+bool StatSystemV2::increment(const char *stat_name, int64_t stat_val)
{
uint32_t stat_num;
if(!getStatNum(stat_name, stat_num)) {
@@ -73,7 +73,7 @@ bool StatSystemV2::increment(const char
return increment(stat_num, stat_val);
}
-bool StatSystemV2::get(uint32_t stat_num, int64 *stat_val)
+bool StatSystemV2::get(uint32_t stat_num, int64_t *stat_val)
{
// Get stat lock
if (TSMutexLock(statsMutex) != INK_SUCCESS) {
@@ -91,7 +91,7 @@ bool StatSystemV2::get(uint32_t stat_num
return true;
}
-bool StatSystemV2::get(const char *stat_name, int64 *stat_val)
+bool StatSystemV2::get(const char *stat_name, int64_t *stat_val)
{
// Get value of stat with name == stat_name
// Returns value from the global stats map. does not walk threads
@@ -102,7 +102,7 @@ bool StatSystemV2::get(const char *stat_
return get(stat_num, stat_val);
}
-bool StatSystemV2::get_current(uint32_t stat_num, int64 *stat_val)
+bool StatSystemV2::get_current(uint32_t stat_num, int64_t *stat_val)
{
// Returns current value of stat. Walks all threads
@@ -122,7 +122,7 @@ bool StatSystemV2::get_current(uint32_t
return true;
}
-bool StatSystemV2::get_current(const char *stat_name, int64 *stat_val)
+bool StatSystemV2::get_current(const char *stat_name, int64_t *stat_val)
{
uint32_t stat_num;
if(!getStatNum(stat_name, stat_num)) {
@@ -201,7 +201,7 @@ void StatSystemV2::init()
void StatSystemV2::clear()
{
- for(std::vector< std::pair<std::string, int64> >::iterator it = StatSystemV2::global_stats.begin();
+ for(std::vector< std::pair<std::string, int64_t> >::iterator it = StatSystemV2::global_stats.begin();
it != StatSystemV2::global_stats.end(); it++) {
it->second = 0;
}
@@ -220,7 +220,7 @@ void StatSystemV2::collect()
// Lock thread stats to prevent resizing on increment
TSMutexLock(t->thread_stats_mutex);
int j = 0;
- for(std::vector<int64>::iterator it = t->thread_stats.begin();
+ for(std::vector<int64_t>::iterator it = t->thread_stats.begin();
it != t->thread_stats.end(); it++, j++) {
if(*it != 0) {
incrementGlobal(j, *it);
@@ -289,7 +289,7 @@ void StatCollectorContinuation::print_st
printbuf << "TIME " << _startTime <<"\n";
if (TSMutexLock(statsMutex) == INK_SUCCESS) {
- for(std::vector< std::pair<std::string, int64> >::const_iterator it = StatSystemV2::global_stats.begin();
+ for(std::vector< std::pair<std::string, int64_t> >::const_iterator it = StatSystemV2::global_stats.begin();
it != StatSystemV2::global_stats.end(); it++) {
if(it->second != 0 ) {
printbuf << "STAT " << it->first << " " << it->second << "\n";
@@ -302,7 +302,7 @@ void StatCollectorContinuation::print_st
void StatCollectorContinuation::print_stat(const char *stat_name, std::stringstream &printbuf, bool current) {
// Print only non zero stats
- int64 stat_val = 0;
+ int64_t stat_val = 0;
bool stat_get_status;
if(current) {
stat_get_status = StatSystemV2::get_current(stat_name, &stat_val);
@@ -334,7 +334,7 @@ StatCollectorContinuation::get_stats_wit
}
// Get all stats which start with stat_prefix
- for(std::vector< std::pair<std::string, int64> >::const_iterator it = StatSystemV2::global_stats.begin();
+ for(std::vector< std::pair<std::string, int64_t> >::const_iterator it = StatSystemV2::global_stats.begin();
it != StatSystemV2::global_stats.end(); it++) {
size_t found = it->first.find(stat_prefix);
if(found == 0) {
@@ -564,7 +564,7 @@ void StatCollectorContinuation::setReadT
StatCollectorContinuation::StatCollectorContinuation() : Continuation(NULL)
{
- Debug("http", "YTS start time : %lld", (long long) StatCollectorContinuation::_startTime);
+ Debug("http", "YTS start time : %" PRId64 "", (long long) StatCollectorContinuation::_startTime);
SET_HANDLER(&StatCollectorContinuation::mainEvent);
statsCommandThread = TSThreadCreate(commandListen, &_statCommandPort);
}
Modified: trafficserver/traffic/trunk/proxy/StatSystemV2.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StatSystemV2.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StatSystemV2.h (original)
+++ trafficserver/traffic/trunk/proxy/StatSystemV2.h Wed Dec 15 01:15:09 2010
@@ -43,12 +43,12 @@ class Event;
class StatSystemV2
{
public:
- static bool increment(uint32_t stat_num, int64 stat_val = 1);
- static bool increment(const char *stat_name, int64 stat_val = 1);
- static bool get(uint32_t stat_num, int64 *stat_val);
- static bool get(const char *stat_name, int64 *stat_val);
- static bool get_current(uint32_t stat_num, int64 *stat_val);
- static bool get_current(const char *stat_name, int64 *stat_val);
+ static bool increment(uint32_t stat_num, int64_t stat_val = 1);
+ static bool increment(const char *stat_name, int64_t stat_val = 1);
+ static bool get(uint32_t stat_num, int64_t *stat_val);
+ static bool get(const char *stat_name, int64_t *stat_val);
+ static bool get_current(uint32_t stat_num, int64_t *stat_val);
+ static bool get_current(const char *stat_name, int64_t *stat_val);
static bool registerStat(const char *stat_name, uint32_t *stat_num);
static void setMaxStatsAllowed(uint32_t max_stats_allowed);
@@ -58,13 +58,13 @@ public:
private:
// These must be called after acquiring a lock
// Since these are private, only methods in StatCollectorContinuation can call them
- static void incrementGlobal(uint32_t stat_num, int64 stat_val = 1);
+ static void incrementGlobal(uint32_t stat_num, int64_t stat_val = 1);
static void clear();
static void collect();
static bool getStatNum(const char *stat_name, uint32_t &stat_num);
static std::map<std::string, uint32_t> stat_name_to_num;
- static std::vector< std::pair<std::string, int64> > global_stats;
+ static std::vector< std::pair<std::string, int64_t> > global_stats;
static uint32_t MAX_STATS_ALLOWED;
static uint32_t NUM_STATS_ESTIMATE;
Modified: trafficserver/traffic/trunk/proxy/StateEventLogger.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StateEventLogger.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StateEventLogger.cc (original)
+++ trafficserver/traffic/trunk/proxy/StateEventLogger.cc Wed Dec 15 01:15:09 2010
@@ -254,7 +254,7 @@ test_thread(void *i)
(*sel) (TestStateEvent(pi, j));
}
finish = ink_get_hrtime();
- printf("StateEventLogger cost = %lldns\n", (finish - start) / (N_THREADS * calls));
+ printf("StateEventLogger cost = %" PRId64 "ns\n", (finish - start) / (N_THREADS * calls));
return NULL;
}
Modified: trafficserver/traffic/trunk/proxy/Stuffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Stuffer.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Stuffer.cc (original)
+++ trafficserver/traffic/trunk/proxy/Stuffer.cc Wed Dec 15 01:15:09 2010
@@ -29,17 +29,17 @@
#include "ParentSelection.h"
StufferHashTable *stuffer_htable;
-static uint32 *stuffer_parent_ip_array = 0;
+static uint32_t *stuffer_parent_ip_array = 0;
static int stuffer_num_parents;
static inline bool
-connAllowed(uint32 ip)
+connAllowed(uint32_t ip)
{
if (((unsigned char *) &ip)[0] == 127) // allow localhost connetions
return true;
int n = stuffer_num_parents;
- uint32 *ips = stuffer_parent_ip_array;
+ uint32_t *ips = stuffer_parent_ip_array;
for (int i = 0; i < n; i++)
if (ip == ips[i])
@@ -64,7 +64,7 @@ struct StufferAccepter:Continuation
if (connAllowed(netvc->get_remote_ip())) {
stufferAllocator.alloc()->init(netvc);
} else {
- uint32 ip = netvc->get_remote_ip();
+ uint32_t ip = netvc->get_remote_ip();
unsigned char *str = (unsigned char *) &ip;
Debug("stuffer", "rejecting connection from %d.%d.%d.%d", str[0], str[1], str[2], str[3]);
netvc->do_io_close();
@@ -77,7 +77,7 @@ struct StufferAccepter:Continuation
#define MAX_PARENTS 64
static int
-readIPs(ParentRecord * parentRec, uint32 * ip_arr, int max)
+readIPs(ParentRecord * parentRec, uint32_t * ip_arr, int max)
{
if (!parentRec)
return 0;
@@ -91,7 +91,7 @@ readIPs(ParentRecord * parentRec, uint32
struct hostent *ent = ink_gethostbyname_r(pr[i].hostname, &data);
if (ent)
- ip_arr[n++] = *(uint32 *) ent->h_addr_list[0];
+ ip_arr[n++] = *(uint32_t *) ent->h_addr_list[0];
}
return n;
@@ -100,7 +100,7 @@ readIPs(ParentRecord * parentRec, uint32
static void
buildParentIPTable()
{
- uint32 ips[MAX_PARENTS];
+ uint32_t ips[MAX_PARENTS];
int n = 0;
ParentConfigParams *params = ParentConfig::acquire();
@@ -123,8 +123,8 @@ buildParentIPTable()
stuffer_num_parents = n;
if (n > 0) {
- stuffer_parent_ip_array = (uint32 *) xmalloc(n * sizeof(uint32));
- memcpy(stuffer_parent_ip_array, &ips[0], n * sizeof(uint32));
+ stuffer_parent_ip_array = (uint32_t *) xmalloc(n * sizeof(uint32_t));
+ memcpy(stuffer_parent_ip_array, &ips[0], n * sizeof(uint32_t));
for (int i = 0; i < n; i++) {
unsigned char *str = (unsigned char *) &ips[i];
Debug("stuffer_parent_ips", "parent ip [%d] = %d.%d.%d.%d", i, str[0], str[1], str[2], str[3]);
Modified: trafficserver/traffic/trunk/proxy/StufferUdpReceiver.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StufferUdpReceiver.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StufferUdpReceiver.cc (original)
+++ trafficserver/traffic/trunk/proxy/StufferUdpReceiver.cc Wed Dec 15 01:15:09 2010
@@ -51,8 +51,8 @@ typedef unsigned int uint32;
struct prefetch_udp_header
{
//uint32 response_flag:1, last_pkt:1, pkt_no:30;
- uint32 pkt;
- uint32 md5[4];
+ uint32_t pkt;
+ uint32_t md5[4];
};
#define RESPONSE_FLAG (1<<31)
@@ -208,7 +208,7 @@ int
processPacket(const char *packet, int pkt_sz)
{
prefetch_udp_header *hdr = (prefetch_udp_header *) packet;
- uint32 flags = ntohl(hdr->pkt);
+ uint32_t flags = ntohl(hdr->pkt);
int close_socket = 1;
int sock_fd = -1;
@@ -222,7 +222,7 @@ processPacket(const char *packet, int pk
if (flags & RESPONSE_FLAG) {
Stream *s = stream_hash_table->lookup(hdr);
- uint32 pkt_no = flags & PKT_NUM_MASK;
+ uint32_t pkt_no = flags & PKT_NUM_MASK;
if (pkt_no == 0 && !(flags & LAST_PKT_FLAG)) {
if (s || !(s = new Stream)) {
Modified: trafficserver/traffic/trunk/proxy/TestClock.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/TestClock.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/TestClock.cc (original)
+++ trafficserver/traffic/trunk/proxy/TestClock.cc Wed Dec 15 01:15:09 2010
@@ -35,7 +35,7 @@ test()
clock_gettime(CLOCK_REALTIME, &ts);
}
ink_hrtime t2 = ink_get_hrtime();
- printf("time for clock_gettime %lld nsecs\n", (t2 - t) / 1000);
+ printf("time for clock_gettime %" PRId64 " nsecs\n", (t2 - t) / 1000);
t = ink_get_hrtime();
i = 1000000;
@@ -43,5 +43,5 @@ test()
ink_get_hrtime();
}
t2 = ink_get_hrtime();
- printf("time for clock_gettime %lld nsecs\n", (t2 - t) / 1000);
+ printf("time for clock_gettime %" PRId64 " nsecs\n", (t2 - t) / 1000);
}
Modified: trafficserver/traffic/trunk/proxy/Transform.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Transform.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Transform.cc (original)
+++ trafficserver/traffic/trunk/proxy/Transform.cc Wed Dec 15 01:15:09 2010
@@ -335,7 +335,7 @@ TransformTerminus::handle_event(int even
-------------------------------------------------------------------------*/
VIO *
-TransformTerminus::do_io_read(Continuation *c, int64 nbytes, MIOBuffer *buf)
+TransformTerminus::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
{
m_read_vio.buffer.writer_for(buf);
m_read_vio.op = VIO::READ;
@@ -358,7 +358,7 @@ TransformTerminus::do_io_read(Continuati
-------------------------------------------------------------------------*/
VIO *
-TransformTerminus::do_io_write(Continuation *c, int64 nbytes, IOBufferReader *buf, bool owner)
+TransformTerminus::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner)
{
// In the process of eliminating 'owner' mode so asserting against it
ink_assert(!owner);
@@ -498,7 +498,7 @@ TransformVConnection::handle_event(int e
-------------------------------------------------------------------------*/
VIO *
-TransformVConnection::do_io_read(Continuation *c, int64 nbytes, MIOBuffer *buf)
+TransformVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
{
Debug("transform", "TransformVConnection do_io_read: 0x%lx [0x%lx]", (long) c, (long) this);
@@ -509,7 +509,7 @@ TransformVConnection::do_io_read(Continu
-------------------------------------------------------------------------*/
VIO *
-TransformVConnection::do_io_write(Continuation *c, int64 nbytes, IOBufferReader *buf, bool owner)
+TransformVConnection::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner)
{
NOWARN_UNUSED(owner);
Debug("transform", "TransformVConnection do_io_write: 0x%lx [0x%lx]", (long) c, (long) this);
@@ -1012,9 +1012,9 @@ RangeTransform::transform_to_range()
{
IOBufferReader *reader = m_write_vio.get_reader();
int toskip, tosend, avail;
- const int64 *end, *start;
- int64 prev_end = 0;
- int64 *done_byte;
+ const int64_t *end, *start;
+ int64_t prev_end = 0;
+ int64_t *done_byte;
end = &m_ranges[m_current_range]._end;
done_byte = &m_ranges[m_current_range]._done_byte;
@@ -1154,7 +1154,7 @@ RangeTransform::add_sub_header(int index
m_done += m_output_buf->write("\r\n", 2);
m_done += m_output_buf->write(cont_range, sizeof(cont_range) - 1);
- snprintf(numbers, sizeof(numbers), "%lldd-%lldd/%lldd", m_ranges[index]._start, m_ranges[index]._end, m_content_length);
+ snprintf(numbers, sizeof(numbers), "%" PRId64 "d-%" PRId64 "d/%" PRId64 "d", m_ranges[index]._start, m_ranges[index]._end, m_content_length);
len = strlen(numbers);
if (len < RANGE_NUMBERS_LENGTH)
m_done += m_output_buf->write(numbers, len);
@@ -1201,7 +1201,7 @@ RangeTransform::change_response_header()
char numbers[RANGE_NUMBERS_LENGTH];
field = m_transform_resp->field_create(MIME_FIELD_CONTENT_RANGE, MIME_LEN_CONTENT_RANGE);
- snprintf(numbers, sizeof(numbers), "bytes %lld-%lld/%lld", m_ranges[0]._start, m_ranges[0]._end, m_content_length);
+ snprintf(numbers, sizeof(numbers), "bytes %" PRId64 "-%" PRId64 "/%" PRId64 "", m_ranges[0]._start, m_ranges[0]._end, m_content_length);
field->value_append(m_transform_resp->m_heap, m_transform_resp->m_mime, numbers, strlen(numbers));
m_transform_resp->field_attach(field);
}
Modified: trafficserver/traffic/trunk/proxy/TransformInternal.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/TransformInternal.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/TransformInternal.h (original)
+++ trafficserver/traffic/trunk/proxy/TransformInternal.h Wed Dec 15 01:15:09 2010
@@ -41,8 +41,8 @@ public:
int handle_event(int event, void *edata);
- VIO *do_io_read(Continuation * c, int64 nbytes, MIOBuffer * buf);
- VIO *do_io_write(Continuation * c, int64 nbytes, IOBufferReader * buf, bool owner = false);
+ VIO *do_io_read(Continuation * c, int64_t nbytes, MIOBuffer * buf);
+ VIO *do_io_write(Continuation * c, int64_t nbytes, IOBufferReader * buf, bool owner = false);
void do_io_close(int lerrno = -1);
void do_io_shutdown(ShutdownHowTo_t howto);
@@ -67,8 +67,8 @@ public:
int handle_event(int event, void *edata);
- VIO *do_io_read(Continuation * c, int64 nbytes, MIOBuffer * buf);
- VIO *do_io_write(Continuation * c, int64 nbytes, IOBufferReader * buf, bool owner = false);
+ VIO *do_io_read(Continuation * c, int64_t nbytes, MIOBuffer * buf);
+ VIO *do_io_write(Continuation * c, int64_t nbytes, IOBufferReader * buf, bool owner = false);
void do_io_close(int lerrno = -1);
void do_io_shutdown(ShutdownHowTo_t howto);
@@ -141,9 +141,9 @@ public:
_start(-1), _end(-1), _done_byte(-1)
{ }
- int64 _start;
- int64 _end;
- int64 _done_byte;
+ int64_t _start;
+ int64_t _end;
+ int64_t _done_byte;
} RangeRecord;
public:
@@ -154,15 +154,15 @@ public:
VIO *m_output_vio;
bool m_unsatisfiable_range;
bool m_not_handle_range;
- int64 m_content_length;
+ int64_t m_content_length;
int m_num_chars_for_cl;
int m_num_range_fields;
int m_current_range;
const char *m_content_type;
int m_content_type_len;
RangeRecord *m_ranges;
- int64 m_output_cl;
- int64 m_done;
+ int64_t m_output_cl;
+ int64_t m_done;
};
#define PREFETCH
Modified: trafficserver/traffic/trunk/proxy/Update.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Update.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Update.cc (original)
+++ trafficserver/traffic/trunk/proxy/Update.cc Wed Dec 15 01:15:09 2010
@@ -602,9 +602,9 @@ UpdateConfigList::Add(UpdateEntry * e)
int
UpdateConfigList::HashAdd(UpdateEntry * e)
{
- uint64 folded64 = e->_url_md5.fold();
+ uint64_t folded64 = e->_url_md5.fold();
ink_assert(folded64);
- int32 index = folded64 % HASH_TABLE_SIZE;
+ int32_t index = folded64 % HASH_TABLE_SIZE;
if (!_hash_table) {
// One time initialization
Modified: trafficserver/traffic/trunk/proxy/api/ts/InkAPIPrivateIOCore.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/api/ts/InkAPIPrivateIOCore.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/api/ts/InkAPIPrivateIOCore.h (original)
+++ trafficserver/traffic/trunk/proxy/api/ts/InkAPIPrivateIOCore.h Wed Dec 15 01:15:09 2010
@@ -108,9 +108,9 @@ public:
int handle_event(int event, void *edata);
- VIO *do_io_read(Continuation *c, int64 nbytes, MIOBuffer *buf);
+ VIO *do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf);
- VIO *do_io_write(Continuation *c, int64 nbytes, IOBufferReader *buf, bool owner = false);
+ VIO *do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner = false);
void do_io_transform(VConnection *vc);
@@ -200,8 +200,8 @@ extern "C"
/* IOBuffer */
- tsapi void TSIOBufferReaderCopy(TSIOBufferReader readerp, const void *buf, int64 length);
- tsapi int64 TSIOBufferBlockDataSizeGet(TSIOBufferBlock blockp);
+ tsapi void TSIOBufferReaderCopy(TSIOBufferReader readerp, const void *buf, int64_t length);
+ tsapi int64_t TSIOBufferBlockDataSizeGet(TSIOBufferBlock blockp);
tsapi TSReturnCode TSIOBufferBlockDestroy(TSIOBufferBlock blockp);
typedef void *INKUDPPacket;
typedef void *INKUDPacketQueue;