You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/20 16:44:25 UTC
svn commit: r946650 - in /trafficserver/traffic/trunk: iocore/cache/
libinktomi++/ librecords/ proxy/http2/ proxy/logging/ proxy/mgmt2/
proxy/mgmt2/cli/ proxy/mgmt2/cluster/ proxy/mgmt2/utils/ proxy/mgmt2/web2/
Author: mturk
Date: Thu May 20 14:44:24 2010
New Revision: 946650
URL: http://svn.apache.org/viewvc?rev=946650&view=rev
Log:
ink_atoll->ink_atoi64 with some atoi->atoi64 fixes on the way
Modified:
trafficserver/traffic/trunk/iocore/cache/Store.cc
trafficserver/traffic/trunk/libinktomi++/ParseRules.h
trafficserver/traffic/trunk/libinktomi++/ink_args.cc
trafficserver/traffic/trunk/libinktomi++/ink_file.h
trafficserver/traffic/trunk/librecords/P_RecCore.i
trafficserver/traffic/trunk/librecords/RecUtils.cc
trafficserver/traffic/trunk/proxy/http2/HttpPages.cc
trafficserver/traffic/trunk/proxy/logging/LogFile.cc
trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc
trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc
trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc
Modified: trafficserver/traffic/trunk/iocore/cache/Store.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Store.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Store.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Store.cc Thu May 20 14:44:24 2010
@@ -362,7 +362,7 @@ Store::read_config(int fd)
while (e && *e && !ParseRules::is_digit(*e))
e++;
if (e && *e) {
- if ((size = ink_atoll(e)) <= 0) {
+ if ((size = ink_atoi64(e)) <= 0) {
err = "error parsing size";
goto Lfail;
}
Modified: trafficserver/traffic/trunk/libinktomi++/ParseRules.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ParseRules.h?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ParseRules.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/ParseRules.h Thu May 20 14:44:24 2010
@@ -936,9 +936,8 @@ ink_atoui(const char *str)
return num;
}
-
static inline int64
-ink_atoll(const char *str)
+ink_atoi64(const char *str)
{
int64 num = 0;
int negative = 0;
@@ -957,9 +956,9 @@ ink_atoll(const char *str)
}
/*
- NOTE: we first compute the value as negative then correct the
- sign back to positive. This enables us to correctly parse MININT.
- */
+ NOTE: we first compute the value as negative then correct the
+ sign back to positive. This enables us to correctly parse MININT.
+ */
while (*str && ParseRules::is_digit(*str))
num = (num * 10) - (*str++ - '0');
#if USE_SI_MULTILIERS
@@ -979,4 +978,36 @@ ink_atoll(const char *str)
}
return num;
}
+
+static inline uint64
+ink_atoui64(const char *str)
+{
+ uint64 num = 0;
+
+ while (*str && ParseRules::is_wslfcr(*str))
+ str += 1;
+
+ if (unlikely(str[0] == '0' && str[1] == 'x')) {
+ str += 2;
+ while (*str && ParseRules::is_hex(*str))
+ num = (num << 4) + ink_get_hex(*str++);
+ } else {
+ while (*str && ParseRules::is_digit(*str))
+ num = (num * 10) + (*str++ - '0');
+#if USE_SI_MULTILIERS
+ if (*str) {
+ if (*str == 'K')
+ num = num * (1LL << 10);
+ else if (*str == 'M')
+ num = num * (1LL << 20);
+ else if (*str == 'G')
+ num = num * (1LL << 30);
+ else if (*str == 'T')
+ num = num * (1LL << 40);
+ }
+#endif
+ }
+ return num;
+}
+
#endif /* #if !defined (_ParseRules_h_) */
Modified: trafficserver/traffic/trunk/libinktomi++/ink_args.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_args.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_args.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_args.cc Thu May 20 14:44:24 2010
@@ -80,7 +80,7 @@ process_arg(ArgumentDescription * argume
*(double *) argument_descriptions[i].location = atof(arg);
break;
case 'L':
- *(int64 *) argument_descriptions[i].location = ink_atoll(arg);
+ *(int64 *) argument_descriptions[i].location = ink_atoi64(arg);
break;
case 'S':
strncpy((char *) argument_descriptions[i].location, arg, atoi(argument_descriptions[i].type + 1));
Modified: trafficserver/traffic/trunk/libinktomi++/ink_file.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_file.h?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_file.h (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_file.h Thu May 20 14:44:24 2010
@@ -69,7 +69,7 @@ int ink_fputln(FILE *stream, const char
int ink_file_fd_readline(int fd, int bufsize, char *buf);
int ink_file_fd_writestring(int fd, const char *buf);
int ink_filepath_merge(char *buf, int bufsz, const char *rootpath,
- const char *addpath, int flags);
+ const char *addpath, int flags = INK_FILEPATH_TRUENAME);
/**
Add addpath to the rootpath prepending slash if rootpath
is not NULL and doesn't end with the slash already and put the
Modified: trafficserver/traffic/trunk/librecords/P_RecCore.i
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/P_RecCore.i?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/P_RecCore.i (original)
+++ trafficserver/traffic/trunk/librecords/P_RecCore.i Thu May 20 14:44:24 2010
@@ -457,11 +457,11 @@ RecSetRecord(RecT rec_type, const char *
ink_assert(data->rec_string);
switch (r1->data_type) {
case RECD_INT:
- r1->data.rec_int = atoi(data->rec_string);
+ r1->data.rec_int = ink_atoi64(data->rec_string);
data_type = RECD_INT;
break;
case RECD_LLONG:
- r1->data.rec_llong = ink_atoll(data->rec_string);
+ r1->data.rec_llong = ink_atoi64(data->rec_string);
data_type = RECD_LLONG;
break;
case RECD_FLOAT:
@@ -473,7 +473,7 @@ RecSetRecord(RecT rec_type, const char *
r1->data.rec_string = data->rec_string;
break;
case RECD_COUNTER:
- r1->data.rec_int = atoi(data->rec_string);
+ r1->data.rec_int = ink_atoi64(data->rec_string);
data_type = RECD_COUNTER;
break;
default:
Modified: trafficserver/traffic/trunk/librecords/RecUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/RecUtils.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/RecUtils.cc (original)
+++ trafficserver/traffic/trunk/librecords/RecUtils.cc Thu May 20 14:44:24 2010
@@ -223,10 +223,10 @@ RecDataSetFromString(RecDataT data_type,
switch (data_type) {
case RECD_INT:
- data_src.rec_int = ink_atoll(data_string);
+ data_src.rec_int = ink_atoi64(data_string);
break;
case RECD_LLONG:
- data_src.rec_llong = ink_atoll(data_string);
+ data_src.rec_llong = ink_atoi64(data_string);
break;
case RECD_FLOAT:
data_src.rec_float = atof(data_string);
@@ -238,7 +238,7 @@ RecDataSetFromString(RecDataT data_type,
data_src.rec_string = data_string;
break;
case RECD_COUNTER:
- data_src.rec_counter = ink_atoll(data_string);
+ data_src.rec_counter = ink_atoi64(data_string);
break;
default:
ink_debug_assert(!"Unexpected RecD type");
Modified: trafficserver/traffic/trunk/proxy/http2/HttpPages.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpPages.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpPages.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpPages.cc Thu May 20 14:44:24 2010
@@ -76,7 +76,7 @@ HttpPagesHandler::extract_id(const char
}
p += sizeof("id=") - 1;
- id = ink_atoll(p);
+ id = ink_atoi64(p);
// Check to see if we found the id
if (id == 0) {
Modified: trafficserver/traffic/trunk/proxy/logging/LogFile.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFile.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFile.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFile.cc Thu May 20 14:44:24 2010
@@ -933,13 +933,13 @@ MetaInfo::_read_from_file()
if (strcmp(t, "creation_time") == 0) {
t = tok.getNext();
if (t) {
- _creation_time = (time_t) atol(t);
+ _creation_time = (time_t) ink_atoi64(t);
_flags |= VALID_CREATION_TIME;
}
} else if (strcmp(t, "object_signature") == 0) {
t = tok.getNext();
if (t) {
- _log_object_signature = (uint64) ink_atoll(t);
+ _log_object_signature = ink_atoi64(t);
_flags |= VALID_SIGNATURE;
Debug("log2-meta", "MetaInfo::_read_from_file\n"
"\tfilename = %s\n"
Modified: trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc Thu May 20 14:44:24 2010
@@ -441,10 +441,10 @@ BaseRecords::defineRecords()
switch (recs[*cur_rec].stype) {
case INK_INT:
- recs[*cur_rec].data.int_data = (MgmtInt) ink_atoll(RecordsConfig[r].value);
+ recs[*cur_rec].data.int_data = (MgmtInt) ink_atoi64(RecordsConfig[r].value);
break;
case INK_LLONG:
- recs[*cur_rec].data.llong_data = (MgmtLLong) ink_atoll(RecordsConfig[r].value);
+ recs[*cur_rec].data.llong_data = (MgmtLLong) ink_atoi64(RecordsConfig[r].value);
break;
case INK_FLOAT:
recs[*cur_rec].data.float_data = (MgmtFloat) atof(RecordsConfig[r].value);
@@ -464,7 +464,7 @@ BaseRecords::defineRecords()
}
break;
case INK_COUNTER:
- recs[*cur_rec].data.counter_data = (MgmtIntCounter) ink_atoll(RecordsConfig[r].value);
+ recs[*cur_rec].data.counter_data = (MgmtIntCounter) ink_atoi64(RecordsConfig[r].value);
break;
default:
// Handled here:
@@ -620,8 +620,8 @@ BaseRecords::rereadRecordFile(char *path
int rec_err = RecGetRecordInt(var_name, &tmp);
found = (rec_err == REC_ERR_OKAY);
if (found) {
- if (tmp != (RecInt) ink_atoll(param)) {
- RecSetRecordInt(var_name, (RecInt) ink_atoll(param));
+ if (tmp != (RecInt) ink_atoi64(param)) {
+ RecSetRecordInt(var_name, (RecInt) ink_atoi64(param));
}
} else {
// Modularization: Switch mgmt_fatal to mgmt_log so that
@@ -639,8 +639,8 @@ BaseRecords::rereadRecordFile(char *path
int rec_err = RecGetRecordLLong(var_name, &tmp);
found = (rec_err == REC_ERR_OKAY);
if (found) {
- if (tmp != (RecLLong) ink_atoll(param)) {
- RecSetRecordLLong(var_name, (RecLLong) ink_atoll(param));
+ if (tmp != (RecLLong) ink_atoi64(param)) {
+ RecSetRecordLLong(var_name, (RecLLong) ink_atoi64(param));
}
} else {
// Modularization: Switch mgmt_fatal to mgmt_log so that
@@ -704,8 +704,8 @@ BaseRecords::rereadRecordFile(char *path
int rec_err = RecGetRecordCounter(var_name, &tmp);
found = (rec_err == REC_ERR_OKAY);
if (found) {
- if (tmp != (RecCounter) ink_atoll(param)) {
- RecSetRecordCounter(var_name, (RecCounter) ink_atoll(param));
+ if (tmp != (RecCounter) ink_atoi64(param)) {
+ RecSetRecordCounter(var_name, (RecCounter) ink_atoi64(param));
}
} else {
//mgmt_fatal("Invalid record specified in file '%s': '%s'\n", f, var_name);
@@ -752,10 +752,10 @@ BaseRecords::rereadRecordFile(char *path
RecordsConfigIndex->mgmt_hash_table_lookup(name, (void **) &r);
switch (RecordsConfig[r].value_type) {
case INK_INT:
- setInteger(name, (MgmtInt) ink_atoll(RecordsConfig[r].value), dirty);
+ setInteger(name, (MgmtInt) ink_atoi64(RecordsConfig[r].value), dirty);
break;
case INK_LLONG:
- setLLong(name, (MgmtLLong) ink_atoll(RecordsConfig[r].value), dirty);
+ setLLong(name, (MgmtLLong) ink_atoi64(RecordsConfig[r].value), dirty);
break;
case INK_FLOAT:
setFloat(name, (MgmtFloat) atof(RecordsConfig[r].value), dirty);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc Thu May 20 14:44:24 2010
@@ -736,13 +736,13 @@ LocalManager::handleMgmtMsgFromProcesses
}
switch (data_type) {
case RECD_COUNTER:
- RecRegisterStatCounter(RECT_PLUGIN, var_name, ink_atoll(var_value), RECP_NULL);
+ RecRegisterStatCounter(RECT_PLUGIN, var_name, ink_atoi64(var_value), RECP_NULL);
break;
case RECD_INT:
- RecRegisterStatInt(RECT_PLUGIN, var_name, ink_atoll(var_value), RECP_NULL);
+ RecRegisterStatInt(RECT_PLUGIN, var_name, ink_atoi64(var_value), RECP_NULL);
break;
case RECD_LLONG:
- RecRegisterStatLLong(RECT_PLUGIN, var_name, ink_atoll(var_value), RECP_NULL);
+ RecRegisterStatLLong(RECT_PLUGIN, var_name, ink_atoi64(var_value), RECP_NULL);
break;
case RECD_FLOAT:
RecRegisterStatFloat(RECT_PLUGIN, var_name, atof(var_value), RECP_NULL);
@@ -767,10 +767,10 @@ LocalManager::handleMgmtMsgFromProcesses
}
switch (stype) {
case INK_INT:
- REC_setInteger(var_name, ink_atoll(var_value));
+ REC_setInteger(var_name, ink_atoi64(var_value));
break;
case INK_LLONG:
- REC_setLLong(var_name, ink_atoll(var_value));
+ REC_setLLong(var_name, ink_atoi64(var_value));
break;
case INK_COUNTER:
case INK_FLOAT:
Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc Thu May 20 14:44:24 2010
@@ -652,13 +652,13 @@ checkBackDoorP(int req_fd, char *message
if (pmgmt->record_data->idofRecord(variable, &id, &type)) {
switch (pmgmt->record_data->typeofRecord(id, type)) {
case INK_COUNTER:
- pmgmt->record_data->setCounter(id, type, ink_atoll(value));
+ pmgmt->record_data->setCounter(id, type, ink_atoi64(value));
break;
case INK_INT:
- pmgmt->record_data->setInteger(id, type, ink_atoll(value));
+ pmgmt->record_data->setInteger(id, type, ink_atoi64(value));
break;
case INK_LLONG:
- pmgmt->record_data->setLLong(id, type, ink_atoll(value));
+ pmgmt->record_data->setLLong(id, type, ink_atoi64(value));
break;
case INK_FLOAT:
pmgmt->record_data->setFloat(id, type, atof(value));
Modified: trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc Thu May 20 14:44:24 2010
@@ -4307,12 +4307,12 @@ LibRecordsConfigInit()
switch (RecordsConfig[r].value_type) {
case INK_INT:
- tempInt = (RecInt) ink_atoi(RecordsConfig[r].value);
+ tempInt = (RecInt) ink_atoi64(RecordsConfig[r].value);
RecRegisterConfigInt(type, RecordsConfig[r].name, tempInt, update, check, RecordsConfig[r].regex, access);
break;
case INK_LLONG:
- tempLLong = (RecInt) ink_atoll(RecordsConfig[r].value);
+ tempLLong = (RecInt) ink_atoi64(RecordsConfig[r].value);
RecRegisterConfigLLong(type, RecordsConfig[r].name, tempLLong, update, check, RecordsConfig[r].regex, access);
break;
@@ -4328,7 +4328,7 @@ LibRecordsConfigInit()
break;
case INK_COUNTER:
- tempCounter = (RecCounter) atoi(RecordsConfig[r].value);
+ tempCounter = (RecCounter) ink_atoi64(RecordsConfig[r].value);
RecRegisterConfigCounter(type,
RecordsConfig[r].name, tempCounter, update, check, RecordsConfig[r].regex, access);
break;
@@ -4342,12 +4342,12 @@ LibRecordsConfigInit()
switch (RecordsConfig[r].value_type) {
case INK_INT:
- tempInt = (RecInt) ink_atoi(RecordsConfig[r].value);
+ tempInt = (RecInt) ink_atoi64(RecordsConfig[r].value);
RecRegisterStatInt(type, RecordsConfig[r].name, tempInt, RECP_NON_PERSISTENT);
break;
case INK_LLONG:
- tempLLong = (RecLLong) ink_atoll(RecordsConfig[r].value);
+ tempLLong = (RecLLong) ink_atoi64(RecordsConfig[r].value);
RecRegisterStatLLong(type, RecordsConfig[r].name, tempLLong, RECP_NON_PERSISTENT);
break;
@@ -4361,7 +4361,7 @@ LibRecordsConfigInit()
break;
case INK_COUNTER:
- tempCounter = (RecCounter) atoi(RecordsConfig[r].value);
+ tempCounter = (RecCounter) ink_atoi64(RecordsConfig[r].value);
RecRegisterStatCounter(type, RecordsConfig[r].name, tempCounter, RECP_NON_PERSISTENT);
break;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc Thu May 20 14:44:24 2010
@@ -1299,17 +1299,17 @@ handleOverseer(int fd, int mode)
RecGetRecordDataType(var, &mtype);
switch (mtype) {
case RECD_COUNTER:{
- RecCounter val = (RecCounter) ink_atoll(config_value);
+ RecCounter val = (RecCounter) ink_atoi64(config_value);
RecSetRecordCounter(var, val);
break;
}
case RECD_INT:{
- RecInt val = (RecInt) ink_atoll(config_value);
+ RecInt val = (RecInt) ink_atoi64(config_value);
RecSetRecordInt(var, val);
break;
}
case RECD_LLONG:{
- RecLLong val = (RecLLong) ink_atoll(config_value);
+ RecLLong val = (RecLLong) ink_atoi64(config_value);
RecSetRecordLLong(var, val);
break;
}
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc Thu May 20 14:44:24 2010
@@ -938,7 +938,7 @@ ClusterCom::handleMultiCastStatPacket(ch
tmp_type = (RecDataT) ink_atoi(v2 + 1);
v3 = ink_strchr(v2 + 1, ':');
if (v3)
- tmp_msg_val = ink_atoll(v3 + 1);
+ tmp_msg_val = ink_atoi64(v3 + 1);
}
if (!v2 || !v3) {
mgmt_elog("[ClusterCom::handleMultiCastStatPacket] Invalid message-line(%d) '%s'\n", __LINE__, line);
@@ -2468,10 +2468,10 @@ checkBackDoor(int req_fd, char *message)
if (lmgmt->record_data->idofRecord(variable, &id, &type)) {
switch (lmgmt->record_data->typeofRecord(id, type)) {
case INK_COUNTER:
- lmgmt->record_data->setCounter(id, type, ink_atoll(value));
+ lmgmt->record_data->setCounter(id, type, ink_atoi64(value));
break;
case INK_INT:
- lmgmt->record_data->setInteger(id, type, ink_atoll(value));
+ lmgmt->record_data->setInteger(id, type, ink_atoi64(value));
break;
case INK_FLOAT:
lmgmt->record_data->setFloat(id, type, atof(value));
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc Thu May 20 14:44:24 2010
@@ -922,8 +922,9 @@ MgmtData::compareFromString(const char *
switch (this->type) {
case RECD_INT:
+ // TODO: Add SI decimal multipliers rule ?
if (str && recordRegexCheck("^[0-9]+$", str)) {
- compData.rec_int = ink_atoll(str);
+ compData.rec_int = ink_atoi64(str);
if (data.rec_int == compData.rec_int) {
compare = true;
}
@@ -931,7 +932,7 @@ MgmtData::compareFromString(const char *
break;
case RECD_LLONG:
if (str && recordRegexCheck("^[0-9]+$", str)) {
- compData.rec_llong = ink_atoll(str);
+ compData.rec_llong = ink_atoi64(str);
if (data.rec_llong == compData.rec_llong) {
compare = true;
}
@@ -939,7 +940,7 @@ MgmtData::compareFromString(const char *
break;
case RECD_COUNTER:
if (str && recordRegexCheck("^[0-9]+$", str)) {
- compData.rec_counter = ink_atoll(str);
+ compData.rec_counter = ink_atoi64(str);
if (data.rec_counter == compData.rec_counter) {
compare = true;
}
Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc?rev=946650&r1=946649&r2=946650&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc Thu May 20 14:44:24 2010
@@ -1050,7 +1050,7 @@ handle_record_info(WebHttpContext * whc,
MgmtInt i = lmgmt->record_data->readInteger(RecordsConfig[r].name, &found);
if (found) {
snprintf(cur_value, BUF_SIZE, "%lld", i);
- if (i == ink_atoll(RecordsConfig[r].value)) {
+ if (i == ink_atoi64(RecordsConfig[r].value)) {
same = true;
}
}
@@ -1061,7 +1061,7 @@ handle_record_info(WebHttpContext * whc,
MgmtLLong i = lmgmt->record_data->readLLong(RecordsConfig[r].name, &found);
if (found) {
snprintf(cur_value, BUF_SIZE, "%lld", i);
- if (i == ink_atoll(RecordsConfig[r].value)) {
+ if (i == ink_atoi64(RecordsConfig[r].value)) {
same = true;
}
}
@@ -1110,7 +1110,7 @@ handle_record_info(WebHttpContext * whc,
MgmtIntCounter ic = lmgmt->record_data->readCounter(RecordsConfig[r].name, &found);
if (found) {
snprintf(cur_value, BUF_SIZE, "%lld", ic);
- if (ic == ink_atoll(RecordsConfig[r].value)) {
+ if (ic == ink_atoi64(RecordsConfig[r].value)) {
same = true;
}
}