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/06/15 06:02:49 UTC
svn commit: r954701 - in /trafficserver/traffic/trunk: iocore/cache/
iocore/eventsystem/ librecords/ proxy/ proxy/api/ts/ proxy/mgmt2/
proxy/mgmt2/api2/ proxy/mgmt2/api2/include/ proxy/mgmt2/cli/
proxy/mgmt2/cli2/ proxy/mgmt2/utils/ proxy/mgmt2/web2/ rc/
Author: zwoop
Date: Tue Jun 15 04:02:48 2010
New Revision: 954701
URL: http://svn.apache.org/viewvc?rev=954701&view=rev
Log:
TS-364: Remove LLONG config option
Tested: FC-13 64-bit.
This patch also fixes a few areas in librecords where we'd downcast
the 64-bit integer to a 32-bit integer. That was the "cause" of the
problem here, fixing that allows the elimination of LLONG.
Modified:
trafficserver/traffic/trunk/iocore/cache/Cache.cc
trafficserver/traffic/trunk/iocore/eventsystem/P_EventSystem.h
trafficserver/traffic/trunk/librecords/I_RecCore.h
trafficserver/traffic/trunk/librecords/I_RecDefs.h
trafficserver/traffic/trunk/librecords/P_RecCore.i
trafficserver/traffic/trunk/librecords/RecCore.cc
trafficserver/traffic/trunk/librecords/RecUtils.cc
trafficserver/traffic/trunk/proxy/Initialize.cc
trafficserver/traffic/trunk/proxy/Main.cc
trafficserver/traffic/trunk/proxy/Main.h
trafficserver/traffic/trunk/proxy/Plugin.cc
trafficserver/traffic/trunk/proxy/Raf.cc
trafficserver/traffic/trunk/proxy/api/ts/ts.h
trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc
trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.h
trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.cc
trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.h
trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h
trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc
trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h
trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc
trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc
trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc
trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtSchema.cc
trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc
trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.h
trafficserver/traffic/trunk/proxy/mgmt2/web2/MgmtRaf.cc
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h
trafficserver/traffic/trunk/rc/update_records.cc
Modified: trafficserver/traffic/trunk/iocore/cache/Cache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Cache.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Cache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Cache.cc Tue Jun 15 04:02:48 2010
@@ -2596,8 +2596,8 @@ ink_cache_init(ModuleVersion v)
IOCORE_RegisterConfigInteger(RECT_CONFIG,
"proxy.config.cache.min_average_object_size", 8000, RECU_DYNAMIC, RECC_NULL, NULL);
- IOCORE_RegisterConfigLLong(RECT_CONFIG, "proxy.config.cache.ram_cache.size", -1, RECU_DYNAMIC, RECC_NULL, NULL);
- IOCORE_EstablishStaticConfigLLong(cache_config_ram_cache_size, "proxy.config.cache.ram_cache.size");
+ IOCORE_RegisterConfigInteger(RECT_CONFIG, "proxy.config.cache.ram_cache.size", -1, RECU_DYNAMIC, RECC_NULL, NULL);
+ IOCORE_EstablishStaticConfigInteger(cache_config_ram_cache_size, "proxy.config.cache.ram_cache.size");
Debug("cache_init", "proxy.config.cache.ram_cache.size = %lld = %lldMb",
cache_config_ram_cache_size, cache_config_ram_cache_size / (1024 * 1024));
IOCORE_RegisterConfigInteger(RECT_CONFIG, "proxy.config.cache.ram_cache.algorithm", 0, RECU_DYNAMIC, RECC_NULL, NULL);
@@ -2612,9 +2612,9 @@ ink_cache_init(ModuleVersion v)
IOCORE_EstablishStaticConfigInt32(cache_config_http_max_alts, "proxy.config.cache.limits.http.max_alts");
Debug("cache_init", "proxy.config.cache.limits.http.max_alts = %d", cache_config_http_max_alts);
- IOCORE_RegisterConfigLLong(RECT_CONFIG,
+ IOCORE_RegisterConfigInteger(RECT_CONFIG,
"proxy.config.cache.ram_cache_cutoff", 1048576, RECU_DYNAMIC, RECC_NULL, NULL);
- IOCORE_EstablishStaticConfigLLong(cache_config_ram_cache_cutoff, "proxy.config.cache.ram_cache_cutoff");
+ IOCORE_EstablishStaticConfigInteger(cache_config_ram_cache_cutoff, "proxy.config.cache.ram_cache_cutoff");
Debug("cache_init", "cache_config_ram_cache_cutoff = %lld = %lldMb",
cache_config_ram_cache_cutoff, cache_config_ram_cache_cutoff / (1024 * 1024));
Modified: trafficserver/traffic/trunk/iocore/eventsystem/P_EventSystem.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/P_EventSystem.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/P_EventSystem.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/P_EventSystem.h Tue Jun 15 04:02:48 2010
@@ -71,7 +71,6 @@
// configuration macros
#define IOCORE_RegisterConfigInteger REC_RegisterConfigInteger
-#define IOCORE_RegisterConfigLLong REC_RegisterConfigLLong
#define IOCORE_RegisterConfigString REC_RegisterConfigString
#define IOCORE_ReadConfigInt32 REC_ReadConfigInt32
#define IOCORE_ReadConfigInteger REC_ReadConfigInteger
@@ -81,7 +80,6 @@
#define IOCORE_RegisterConfigUpdateFunc REC_RegisterConfigUpdateFunc
#define IOCORE_RegisterStatUpdateFunc RecRegisterRawStatUpdateFunc
#define IOCORE_EstablishStaticConfigInteger REC_EstablishStaticConfigInteger
-#define IOCORE_EstablishStaticConfigLLong REC_EstablishStaticConfigLLong
#define IOCORE_EstablishStaticConfigInt32 REC_EstablishStaticConfigInt32
#define IOCORE_EstablishStaticConfigInt32U REC_EstablishStaticConfigInt32U
#define IOCORE_ConfigReadInteger REC_ConfigReadInteger
Modified: trafficserver/traffic/trunk/librecords/I_RecCore.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/I_RecCore.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/I_RecCore.h (original)
+++ trafficserver/traffic/trunk/librecords/I_RecCore.h Tue Jun 15 04:02:48 2010
@@ -44,8 +44,6 @@ int RecSetDiags(Diags * diags);
int RecRegisterStatInt(RecT rec_type, const char *name, RecInt data_default, RecPersistT persist_type);
-int RecRegisterStatLLong(RecT rec_type, const char *name, RecLLong data_default, RecPersistT persist_type);
-
int RecRegisterStatFloat(RecT rec_type, const char *name, RecFloat data_default, RecPersistT persist_type);
int RecRegisterStatString(RecT rec_type, const char *name, RecString data_default, RecPersistT persist_type);
@@ -60,10 +58,6 @@ int RecRegisterConfigInt(RecT rec_type,
RecInt data_default, RecUpdateT update_type,
RecCheckT check_type, const char *ccheck_regex, RecAccessT access_type = RECA_NULL);
-int RecRegisterConfigLLong(RecT rec_type, const char *name,
- RecLLong data_default, RecUpdateT update_type,
- RecCheckT check_type, const char *check_regex, RecAccessT access_type = RECA_NULL);
-
int RecRegisterConfigFloat(RecT rec_type, const char *name,
RecFloat data_default, RecUpdateT update_type,
RecCheckT check_type, const char *check_regex, RecAccessT access_type = RECA_NULL);
@@ -81,7 +75,6 @@ int RecRegisterConfigCounter(RecT rec_ty
//-------------------------------------------------------------------------
int RecLinkConfigInt(const char *name, RecInt * rec_int);
-int RecLinkConfigLLong(const char *name, RecLLong * rec_llong);
int RecLinkConfigInk32(const char *name, int32 * p_int32);
int RecLinkConfigInkU32(const char *name, uint32 * p_uint32);
int RecLinkConfigFloat(const char *name, RecFloat * rec_float);
@@ -106,13 +99,11 @@ int RecRegisterRawStatUpdateFunc(const c
// RecSetRecordConvert -> WebMgmtUtils.cc::varSetFromStr()
int RecSetRecordConvert(const char *name, const RecString rec_string, bool lock = true);
int RecSetRecordInt(const char *name, RecInt rec_int, bool lock = true);
-int RecSetRecordLLong(const char *name, RecLLong rec_llong, bool lock = true);
int RecSetRecordFloat(const char *name, RecFloat rec_float, bool lock = true);
int RecSetRecordString(const char *name, const RecString rec_string, bool lock = true);
int RecSetRecordCounter(const char *name, RecCounter rec_counter, bool lock = true);
int RecGetRecordInt(const char *name, RecInt * rec_int, bool lock = true);
-int RecGetRecordLLong(const char *name, RecLLong * rec_llong, bool lock = true);
int RecGetRecordFloat(const char *name, RecFloat * rec_float, bool lock = true);
int RecGetRecordString(const char *name, char *buf, int buf_len, bool lock = true);
int RecGetRecordString_Xmalloc(const char *name, RecString * rec_string, bool lock = true);
@@ -150,7 +141,6 @@ void RecSignalAlarm(int, const char *);
//-------------------------------------------------------------------------
#define REC_RegisterConfigInteger RecRegisterConfigInt
-#define REC_RegisterConfigLLong RecRegisterConfigLLong
#define REC_RegisterConfigString RecRegisterConfigString
#define REC_ReadConfigInt32(_var,_config_var_name) do { \
@@ -165,12 +155,6 @@ void RecSignalAlarm(int, const char *);
_var = tmp; \
} while (0)
-#define REC_ReadConfigLLong(_var,_config_var_name) do { \
- RecLLong tmp = 0; \
- RecGetRecordLLong(_config_var_name, &tmp); \
- _var = tmp; \
-} while (0)
-
#define REC_ReadConfigFloat(_var,_config_var_name) do { \
RecFloat tmp = 0; \
RecGetRecordFloat(_config_var_name, &tmp); \
@@ -188,12 +172,7 @@ void RecSignalAlarm(int, const char *);
#define REC_EstablishStaticConfigInteger(_var, _config_var_name) do{ \
RecLinkConfigInt(_config_var_name, &_var); \
- _var = (int)REC_ConfigReadInteger(_config_var_name); \
-} while (0)
-
-#define REC_EstablishStaticConfigLLong(_var, _config_var_name) do{ \
- RecLinkConfigLLong(_config_var_name, &_var); \
- _var = (RecLLong)REC_ConfigReadLLong(_config_var_name); \
+ _var = (int64)REC_ConfigReadInteger(_config_var_name); \
} while (0)
#define REC_EstablishStaticConfigInt32(_var, _config_var_name) do { \
@@ -222,20 +201,17 @@ void RecSignalAlarm(int, const char *);
} while (0)
RecInt REC_ConfigReadInteger(const char *name);
-RecLLong REC_ConfigReadLLong(const char *name);
char *REC_ConfigReadString(const char *name);
RecFloat REC_ConfigReadFloat(const char *name);
RecCounter REC_ConfigReadCounter(const char *name);
// MGMT2 Marco's -- converting lmgmt->record_data->readXXX
RecInt REC_readInteger(const char *name, bool * found, bool lock = true);
-RecLLong REC_readLLong(char *name, bool * found, bool lock = true);
RecFloat REC_readFloat(char *name, bool * found, bool lock = true);
RecCounter REC_readCounter(char *name, bool * found, bool lock = true);
RecString REC_readString(const char *name, bool * found, bool lock = true);
-bool REC_setInteger(const char *name, int value, bool dirty = true);
-bool REC_setLLong(const char *name, RecLLong value, bool dirty = true);
+bool REC_setInteger(const char *name, RecInt value, bool dirty = true);
bool REC_setFloat(const char *name, float value, bool dirty = true);
bool REC_setCounter(const char *name, int64 value, bool dirty = true);
bool REC_setString(const char *name, char *value, bool dirty = true);
Modified: trafficserver/traffic/trunk/librecords/I_RecDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/I_RecDefs.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/I_RecDefs.h (original)
+++ trafficserver/traffic/trunk/librecords/I_RecDefs.h Tue Jun 15 04:02:48 2010
@@ -48,7 +48,6 @@ enum RecErrT
#define RecStringNull NULL
typedef int64 RecInt;
-typedef int64 RecLLong;
typedef float RecFloat;
typedef char *RecString;
typedef const char *RecStringConst;
@@ -78,7 +77,6 @@ enum RecDataT
RECD_STAT_CONST, // Added for the StatProcessor
RECD_STAT_FX, // Added for the StatProcessor
#endif
- RECD_LLONG,
RECD_MAX
};
@@ -128,7 +126,6 @@ enum RecAccessT
union RecData
{
RecInt rec_int;
- RecLLong rec_llong;
RecFloat rec_float;
RecString rec_string;
RecCounter rec_counter;
Modified: trafficserver/traffic/trunk/librecords/P_RecCore.i
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/P_RecCore.i?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/P_RecCore.i (original)
+++ trafficserver/traffic/trunk/librecords/P_RecCore.i Tue Jun 15 04:02:48 2010
@@ -336,12 +336,6 @@ RecRegisterStatInt(RecT rec_type, const
}
int
-RecRegisterStatLLong(RecT rec_type, const char *name, RecLLong data_default, RecPersistT persist_type)
-{
- REC_REGISTER_STAT_XXX(rec_llong, RECD_LLONG);
-}
-
-int
RecRegisterStatFloat(RecT rec_type, const char *name, RecFloat data_default, RecPersistT persist_type)
{
REC_REGISTER_STAT_XXX(rec_float, RECD_FLOAT);
@@ -390,15 +384,6 @@ RecRegisterConfigInt(RecT rec_type, cons
}
int
-RecRegisterConfigLLong(RecT rec_type, const char *name,
- RecLLong data_default, RecUpdateT update_type,
- RecCheckT check_type, const char *check_regex, RecAccessT access_type)
-{
- ink_debug_assert((rec_type == RECT_CONFIG) || (rec_type == RECT_LOCAL));
- REC_REGISTER_CONFIG_XXX(rec_llong, RECD_LLONG);
-}
-
-int
RecRegisterConfigFloat(RecT rec_type, const char *name,
RecFloat data_default, RecUpdateT update_type,
RecCheckT check_type, const char *check_regex, RecAccessT access_type)
@@ -460,10 +445,6 @@ RecSetRecord(RecT rec_type, const char *
r1->data.rec_int = ink_atoi64(data->rec_string);
data_type = RECD_INT;
break;
- case RECD_LLONG:
- r1->data.rec_llong = ink_atoi64(data->rec_string);
- data_type = RECD_LLONG;
- break;
case RECD_FLOAT:
r1->data.rec_float = atof(data->rec_string);
data_type = RECD_FLOAT;
@@ -564,14 +545,6 @@ RecSetRecordInt(const char *name, RecInt
}
int
-RecSetRecordLLong(const char *name, RecLLong rec_llong, bool lock)
-{
- RecData data;
- data.rec_llong = rec_llong;
- return RecSetRecord(RECT_NULL, name, RECD_LLONG, &data, NULL, lock);
-}
-
-int
RecSetRecordFloat(const char *name, RecFloat rec_float, bool lock)
{
RecData data;
@@ -845,8 +818,6 @@ RecReadConfigFile()
data_type = RECD_NULL;
if (strcmp(data_type_str, "INT") == 0) {
data_type = RECD_INT;
- } else if (strcmp(data_type_str, "LLONG") == 0) {
- data_type = RECD_LLONG;
} else if (strcmp(data_type_str, "FLOAT") == 0) {
data_type = RECD_FLOAT;
} else if (strcmp(data_type_str, "STRING") == 0) {
@@ -990,11 +961,6 @@ RecSyncConfigToTB(textBuffer * tb)
snprintf(b, 1023, "%lld", r->data.rec_int);
tb->copyFrom(b, strlen(b));
break;
- case RECD_LLONG:
- tb->copyFrom("LLONG ", 6);
- snprintf(b, 1023, "%lld", r->data.rec_llong);
- tb->copyFrom(b, strlen(b));
- break;
case RECD_FLOAT:
tb->copyFrom("FLOAT ", 6);
snprintf(b, 1023, "%f", r->data.rec_float);
Modified: trafficserver/traffic/trunk/librecords/RecCore.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/RecCore.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/RecCore.cc (original)
+++ trafficserver/traffic/trunk/librecords/RecCore.cc Tue Jun 15 04:02:48 2010
@@ -108,16 +108,6 @@ link_int(const char *name, RecDataT data
}
static int
-link_llong(const char *name, RecDataT data_type, RecData data, void *cookie)
-{
- REC_NOWARN_UNUSED(name);
- REC_NOWARN_UNUSED(data_type);
- RecLLong *rec_llong = (RecLLong *) cookie;
- ink_atomic_swap64(rec_llong, data.rec_llong);
- return REC_ERR_OKAY;
-}
-
-static int
link_int32(const char *name, RecDataT data_type, RecData data, void *cookie)
{
REC_NOWARN_UNUSED(name);
@@ -280,15 +270,6 @@ RecLinkConfigInt(const char *name, RecIn
}
int
-RecLinkConfigLLong(const char *name, RecLLong * rec_llong)
-{
- if (RecGetRecordLLong(name, rec_llong) == REC_ERR_FAIL) {
- return REC_ERR_FAIL;
- }
- return RecRegisterConfigUpdateCb(name, link_llong, (void *) rec_llong);
-}
-
-int
RecLinkConfigInk32(const char *name, int32 * p_int32)
{
return RecRegisterConfigUpdateCb(name, link_int32, (void *) p_int32);
@@ -454,16 +435,6 @@ RecGetRecordInt(const char *name, RecInt
}
int
-RecGetRecordLLong(const char *name, RecLLong * rec_llong, bool lock)
-{
- int err;
- RecData data;
- if ((err = RecGetRecord_Xmalloc(name, RECD_LLONG, &data, lock)) == REC_ERR_OKAY)
- *rec_llong = data.rec_llong;
- return err;
-}
-
-int
RecGetRecordFloat(const char *name, RecFloat * rec_float, bool lock)
{
int err;
@@ -546,9 +517,6 @@ RecGetRecordGeneric_Xmalloc(const char *
case RECD_INT:
snprintf(*rec_string, 1023, "%lld", data.rec_int);
break;
- case RECD_LLONG:
- snprintf(*rec_string, 1023, "%lld", data.rec_llong);
- break;
case RECD_FLOAT:
snprintf(*rec_string, 1023, "%f", data.rec_float);
break;
@@ -758,9 +726,6 @@ RecGetRecordDefaultDataString_Xmalloc(ch
case RECD_INT:
snprintf(*buf, 1023, "%lld", r->data_default.rec_int);
break;
- case RECD_LLONG:
- snprintf(*buf, 1023, "%lld", r->data_default.rec_llong);
- break;
case RECD_FLOAT:
snprintf(*buf, 1023, "%f", r->data_default.rec_float);
break;
@@ -1008,9 +973,6 @@ RecDumpRecordsHt(RecT rec_type)
case RECD_INT:
RecDebug(DL_Note, " ([%d] '%s', '%lld')", r->registered, r->name, r->data.rec_int);
break;
- case RECD_LLONG:
- RecDebug(DL_Note, " ([%d] '%s', '%lld')", r->registered, r->name, r->data.rec_llong);
- break;
case RECD_FLOAT:
RecDebug(DL_Note, " ([%d] '%s', '%f')", r->registered, r->name, r->data.rec_float);
break;
@@ -1077,10 +1039,6 @@ RecGetRecordPrefix_Xmalloc(char *prefix,
num_matched++;
sprintf(&result[strlen(result)], "%s=%lld\r\n", r->name, r->data.rec_int);
break;
- case RECD_LLONG:
- num_matched++;
- sprintf(&result[strlen(result)], "%s=%lld\r\n", r->name, r->data.rec_llong);
- break;
case RECD_FLOAT:
num_matched++;
sprintf(&result[strlen(result)], "%s=%f\r\n", r->name, r->data.rec_float);
@@ -1122,18 +1080,6 @@ REC_ConfigReadInteger(const char *name)
}
//-------------------------------------------------------------------------
-// REC_ConfigReadLLong (backwards compatibility)
-//-------------------------------------------------------------------------
-
-RecLLong
-REC_ConfigReadLLong(const char *name)
-{
- RecLLong t = 0;
- RecGetRecordLLong(name, &t);
- return t;
-}
-
-//-------------------------------------------------------------------------
// REC_ConfigReadString (backwards compatibility)
//-------------------------------------------------------------------------
@@ -1186,18 +1132,6 @@ REC_readInteger(const char *name, bool *
return _tmp;
}
-RecLLong
-REC_readLLong(char *name, bool * found, bool lock)
-{
- ink_debug_assert(name);
- RecLLong _tmp = 0L;
- bool _found;
- _found = (RecGetRecordLLong(name, &_tmp, lock) == REC_ERR_OKAY);
- if (found)
- *found = _found;
- return _tmp;
-}
-
RecFloat
REC_readFloat(char *name, bool * found, bool lock)
{
@@ -1237,20 +1171,13 @@ REC_readString(const char *name, bool *
// MGMT2 Marco's -- converting lmgmt->record_data->setXXX
bool
-REC_setInteger(const char *name, int value, bool dirty)
+REC_setInteger(const char *name, RecInt value, bool dirty)
{
REC_NOWARN_UNUSED(dirty);
return RecSetRecordInt(name, value);
}
bool
-REC_setLLong(const char *name, RecLLong value, bool dirty)
-{
- REC_NOWARN_UNUSED(dirty);
- return RecSetRecordLLong(name, value);
-}
-
-bool
REC_setFloat(const char *name, float value, bool dirty)
{
REC_NOWARN_UNUSED(dirty);
Modified: trafficserver/traffic/trunk/librecords/RecUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/librecords/RecUtils.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/librecords/RecUtils.cc (original)
+++ trafficserver/traffic/trunk/librecords/RecUtils.cc Tue Jun 15 04:02:48 2010
@@ -105,12 +105,6 @@ RecDataSet(RecDataT data_type, RecData *
rec_set = true;
}
break;
- case RECD_LLONG:
- if (data_dst->rec_llong != data_src->rec_llong) {
- data_dst->rec_llong = data_src->rec_llong;
- rec_set = true;
- }
- break;
case RECD_FLOAT:
if (data_dst->rec_float != data_src->rec_float) {
data_dst->rec_float = data_src->rec_float;
@@ -142,9 +136,6 @@ RecDataSetFromInk64(RecDataT data_type,
case RECD_INT:
data_dst->rec_int = data_int64;
break;
- case RECD_LLONG:
- data_dst->rec_llong = data_int64;
- break;
case RECD_FLOAT:
data_dst->rec_float = (float) (data_int64);
break;
@@ -182,9 +173,6 @@ RecDataSetFromFloat(RecDataT data_type,
case RECD_INT:
data_dst->rec_int = (RecInt) data_float;
break;
- case RECD_LLONG:
- data_dst->rec_llong = (RecLLong) data_float;
- break;
case RECD_FLOAT:
data_dst->rec_float = (float) (data_float);
break;
@@ -225,9 +213,6 @@ RecDataSetFromString(RecDataT data_type,
case RECD_INT:
data_src.rec_int = ink_atoi64(data_string);
break;
- case RECD_LLONG:
- data_src.rec_llong = ink_atoi64(data_string);
- break;
case RECD_FLOAT:
data_src.rec_float = atof(data_string);
break;
Modified: trafficserver/traffic/trunk/proxy/Initialize.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Initialize.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Initialize.cc (original)
+++ trafficserver/traffic/trunk/proxy/Initialize.cc Tue Jun 15 04:02:48 2010
@@ -205,12 +205,12 @@ init_system_core_size(void)
void
init_system_memalign_heap(void)
{
- long long ram_cache_max = -1;
+ int64 ram_cache_max = -1;
int enable_preallocation = 1;
REC_ReadConfigInteger(enable_preallocation, "proxy.config.system.memalign_heap");
if (enable_preallocation) {
- REC_ReadConfigLLong(ram_cache_max, "proxy.config.cache.ram_cache.size");
+ REC_ReadConfigInteger(ram_cache_max, "proxy.config.cache.ram_cache.size");
if (ram_cache_max > 0) {
if (!ink_memalign_heap_init(ram_cache_max))
Warning("Unable to init memalign heap");
Modified: trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/Main.cc Tue Jun 15 04:02:48 2010
@@ -1157,12 +1157,12 @@ init_core_size()
static void
init_ink_memalign_heap(void)
{
- long long ram_cache_max = -1;
+ int64 ram_cache_max = -1;
int enable_preallocation = 1;
TS_ReadConfigInteger(enable_preallocation, "proxy.config.system.memalign_heap");
if (enable_preallocation) {
- TS_ReadConfigLLong(ram_cache_max, "proxy.config.cache.ram_cache.size");
+ TS_ReadConfigInteger(ram_cache_max, "proxy.config.cache.ram_cache.size");
if (ram_cache_max > 0) {
if (!ink_memalign_heap_init(ram_cache_max))
Warning("Unable to init memalign heap");
Modified: trafficserver/traffic/trunk/proxy/Main.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.h (original)
+++ trafficserver/traffic/trunk/proxy/Main.h Tue Jun 15 04:02:48 2010
@@ -132,7 +132,6 @@ extern HttpOtherPortEntry *http_other_po
#define TS_ReadConfigInteger REC_ReadConfigInteger
-#define TS_ReadConfigLLong REC_ReadConfigLLong
#define TS_ReadConfigFloat REC_ReadConfigFloat
#define TS_ReadConfigString REC_ReadConfigString
#define TS_EstablishStaticConfigInteger REC_EstablishStaticConfigInteger
Modified: trafficserver/traffic/trunk/proxy/Plugin.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Plugin.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Plugin.cc (original)
+++ trafficserver/traffic/trunk/proxy/Plugin.cc Tue Jun 15 04:02:48 2010
@@ -224,17 +224,6 @@ plugin_expand(char *arg)
return str;
break;
}
- case RECD_LLONG:
- {
- RecLLong llong_val;
- if (RecGetRecordLLong(arg, &llong_val) != REC_ERR_OKAY) {
- goto not_found;
- }
- str = (char *) xmalloc(128);
- snprintf(str, 128, "%lld", (long long) llong_val);
- return str;
- break;
- }
case RECD_COUNTER:
{
RecCounter count_val;
Modified: trafficserver/traffic/trunk/proxy/Raf.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Raf.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Raf.cc (original)
+++ trafficserver/traffic/trunk/proxy/Raf.cc Tue Jun 15 04:02:48 2010
@@ -453,13 +453,6 @@ RafCont::process_query_stat(const char *
snprintf(val_output, 256, "%lld", i);
break;
}
- case RECD_LLONG:
- {
- bool tmp = false;
- RecLLong i = REC_readLLong(var, &tmp);
- snprintf(val_output, 256, "%lld", i);
- break;
- }
case RECD_FLOAT:
{
bool tmp = false;
Modified: trafficserver/traffic/trunk/proxy/api/ts/ts.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/api/ts/ts.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/api/ts/ts.h (original)
+++ trafficserver/traffic/trunk/proxy/api/ts/ts.h Tue Jun 15 04:02:48 2010
@@ -458,7 +458,6 @@ extern "C"
for storing the values retrieved by those functions. For example,
INKMgmtCounterGet() retrieves an INKMgmtCounter. */
typedef INK64 INKMgmtInt;
- typedef INK64 INKMgmtLLong;
typedef INK64 INKMgmtCounter;
typedef float INKMgmtFloat;
typedef char *INKMgmtString;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.cc Tue Jun 15 04:02:48 2010
@@ -443,9 +443,6 @@ BaseRecords::defineRecords()
case INK_INT:
recs[*cur_rec].data.int_data = (MgmtInt) ink_atoi64(RecordsConfig[r].value);
break;
- case INK_LLONG:
- 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);
break;
@@ -600,8 +597,6 @@ BaseRecords::rereadRecordFile(char *path
case 2: /* DATA TYPE */
if (strcmp("INT", param) == 0) {
mtype = RECD_INT;
- } else if (strcmp("LLONG", param) == 0) {
- mtype = RECD_LLONG;
} else if (strcmp("FLOAT", param) == 0) {
mtype = RECD_FLOAT;
} else if (strcmp("STRING", param) == 0) {
@@ -634,25 +629,6 @@ BaseRecords::rereadRecordFile(char *path
}
break;
}
- case RECD_LLONG:{
- RecLLong tmp = 0;
- int rec_err = RecGetRecordLLong(var_name, &tmp);
- found = (rec_err == REC_ERR_OKAY);
- if (found) {
- if (tmp != (RecLLong) ink_atoi64(param)) {
- RecSetRecordLLong(var_name, (RecLLong) ink_atoi64(param));
- }
- } else {
- // Modularization: Switch mgmt_fatal to mgmt_log so that
- // we don't have problems while we tempoarily run with
- // both BaseRecords and librecords (e.g. there could be a
- // record defined for librecords that does not exist in
- // BaseRecords).
- //mgmt_fatal("Invalid record specified in file '%s': '%s'\n", f, var_name);
- mgmt_log("Invalid record specified in file '%s': '%s'\n", f, var_name);
- }
- break;
- }
case RECD_FLOAT:{
RecFloat tmp = 0.0;
int rec_err = RecGetRecordFloat(var_name, &tmp);
@@ -754,9 +730,6 @@ BaseRecords::rereadRecordFile(char *path
case INK_INT:
setInteger(name, (MgmtInt) ink_atoi64(RecordsConfig[r].value), dirty);
break;
- case INK_LLONG:
- setLLong(name, (MgmtLLong) ink_atoi64(RecordsConfig[r].value), dirty);
- break;
case INK_FLOAT:
setFloat(name, (MgmtFloat) atof(RecordsConfig[r].value), dirty);
break;
@@ -953,31 +926,6 @@ BaseRecords::setInteger(int id, RecordTy
} /* End BaseRecords::setInteger */
-MgmtLLong
-BaseRecords::setLLong(int id, RecordType type, MgmtLLong value, bool dirty)
-{
- Record *rec;
-
- if ((rec = getRecord(id, type)) && rec->stype == INK_LLONG) {
- MgmtLLong ret;
-
- ink_mutex_acquire(&mutex[type]);
- if (value != rec->data.llong_data) {
- ret = rec->data.llong_data = value;
- if (dirty)
- rec->changed = true;
- updateCount[type]++;
- } else {
- ret = value;
- }
- ink_mutex_release(&mutex[type]);
-
- return (ret);
- }
- return INVALID;
-} /* End BaseRecords::setLLong */
-
-
MgmtFloat
BaseRecords::setFloat(int id, RecordType type, MgmtFloat value, bool dirty)
{
@@ -1086,19 +1034,6 @@ BaseRecords::setInteger(const char *name
} /* End BaseRecords::setInteger */
-MgmtLLong
-BaseRecords::setLLong(const char *name, MgmtInt value, bool dirty)
-{
- int id;
- RecordType type;
-
- if (idofRecord(name, &id, &type)) {
- return setLLong(id, type, value, dirty);
- }
- return INVALID;
-} /* End BaseRecords::setLLong */
-
-
MgmtFloat
BaseRecords::setFloat(const char *name, MgmtFloat value, bool dirty)
{
@@ -1178,33 +1113,6 @@ BaseRecords::readInteger(int id, RecordT
} /* End BaseRecords::readInteger */
-MgmtLLong
-BaseRecords::readLLong(int id, RecordType type, bool * found)
-{
- Record *rec;
-
- if (found)
- *found = false;
- if ((rec = getRecord(id, type)) && rec->stype == INK_LLONG) {
- MgmtLLong ret;
-
- ink_mutex_acquire(&mutex[type]);
- ret = rec->data.llong_data;
- rec->read = true;
- ink_mutex_release(&mutex[type]);
-
- if (found)
- *found = true;
- return ret;
- }
- if (!found) {
- // die if the caller isn't checking 'found'
- mgmt_fatal(stderr, "[Config Error] Unable to find record id: %d type: %d\n", id, type);
- }
- return INVALID;
-} /* End BaseRecords::readLLong */
-
-
MgmtFloat
BaseRecords::readFloat(int id, RecordType type, bool * found)
{
@@ -1303,25 +1211,6 @@ BaseRecords::readInteger(const char *nam
} /* End BaseRecords::readIntegerr */
-MgmtInt
-BaseRecords::readLLong(const char *name, bool * found)
-{
- int id;
- RecordType type;
-
- if (found)
- *found = false;
- if (idofRecord(name, &id, &type)) {
- return (readLLong(id, type, found));
- }
- if (!found) {
- // die if the caller isn't checking 'found'
- mgmt_fatal(stderr, "[Config Error] Unable to find record: %s\n", name);
- }
- return INVALID;
-} /* End BaseRecords::readLLong */
-
-
MgmtFloat
BaseRecords::readFloat(const char *name, bool * found)
{
@@ -1404,26 +1293,6 @@ BaseRecords::readInteger(const char *nam
} /* End BaseRecords::readIntegerr */
-MgmtLLong
-BaseRecords::readLLong(const char *name, Records * recs, bool * found)
-{
- int id;
- RecordType type;
-
- if (found)
- *found = false;
- if (idofRecord(name, &id, &type) && recs->recs[id].stype == INK_LLONG) {
- *found = true;
- return (recs->recs[id].data.llong_data);
- }
- if (!found) {
- // die if the caller isn't checking 'found'
- mgmt_fatal(stderr, "[Config Error] Unable to find record: %s\n", name);
- }
- return INVALID;
-} /* End BaseRecords::readLLong */
-
-
MgmtFloat
BaseRecords::readFloat(const char *name, Records * recs, bool * found)
{
@@ -1570,15 +1439,6 @@ BaseRecords::updateRecord(Record * rec)
}
break;
}
- case INK_LLONG:{
- MgmtLLong tmp = 0;
- (*((RecordUpdateFunc) (rec->func))) (rec->opaque_token, &tmp);
- if (rec->data.llong_data != tmp) {
- rec->data.llong_data = tmp;
- rec->changed = true;
- }
- break;
- }
case INK_FLOAT:{
MgmtFloat tmp = 0;
(*((RecordUpdateFunc) (rec->func))) (rec->opaque_token, &tmp);
@@ -1663,10 +1523,6 @@ BaseRecords::notifyChangeLists(RecordTyp
(*((RecordChangeFunc) (list->func)))
(list->opaque_token, &the_records->recs[i].data.int_data);
break;
- case INK_LLONG:
- (*((RecordChangeFunc) (list->func)))
- (list->opaque_token, &the_records->recs[i].data.llong_data);
- break;
case INK_FLOAT:
(*((RecordChangeFunc) (list->func)))
(list->opaque_token, &the_records->recs[i].data.float_data);
@@ -1723,10 +1579,6 @@ BaseRecords::syncPutRecord(Record * rec,
res = record_db->mgmt_put(name, strlen(name), (void *) &rec->data.int_data, sizeof(rec->data.int_data));
break;
}
- case INK_LLONG:{
- res = record_db->mgmt_put(name, strlen(name), (void *) &rec->data.llong_data, sizeof(rec->data.llong_data));
- break;
- }
case INK_FLOAT:{
res = record_db->mgmt_put(name, strlen(name), (void *) &rec->data.float_data, sizeof(rec->data.float_data));
break;
@@ -1826,15 +1678,6 @@ BaseRecords::syncGetRecord(Record * rec,
}
break;
}
- case INK_LLONG:{
- MgmtLLong tmp = *((MgmtLLong *) value);
- if (rec->data.llong_data != tmp) {
- rec->data.llong_data = tmp;
- if (!ignore)
- rec->changed = true;
- }
- break;
- }
case INK_FLOAT:{
MgmtFloat tmp = *((MgmtFloat *) value);
if (tmp != rec->data.float_data) {
@@ -1939,9 +1782,6 @@ BaseRecords::getExternalRecordValue(Reco
case INK_INT:
rec->data.int_data = *((MgmtInt *) value);
break;
- case INK_LLONG:
- rec->data.llong_data = *((MgmtLLong *) value);
- break;
case INK_FLOAT:
rec->data.float_data = *((MgmtFloat *) value);
break;
@@ -2033,10 +1873,6 @@ BaseRecords::printRecord(Record rec)
fprintf(stderr, "\tType: INT\n");
fprintf(stderr, "\tValue: '%lld'\n", rec.data.int_data);
break;
- case INK_LLONG:
- fprintf(stderr, "\tType: LLONG\n");
- fprintf(stderr, "\tValue: '%lld'\n", rec.data.llong_data);
- break;
case INK_FLOAT:
fprintf(stderr, "\tType: FLOAT\n");
fprintf(stderr, "\tValue: '%f'\n", rec.data.float_data);
@@ -2184,15 +2020,6 @@ BaseRecords::createRecordsFile(char *fna
newFile->copyFrom(str_val, strlen(str_val));
break;
}
- case INK_LLONG:{
- MgmtLLong tmp = readLLong(id, type);
- if (type == PROCESS)
- tmp = 0;
- newFile->copyFrom("LLONG ", strlen("LLONG "));
- snprintf(str_val, sizeof(str_val), "%lld\n", tmp);
- newFile->copyFrom(str_val, strlen(str_val));
- break;
- }
case INK_FLOAT:{
MgmtFloat tmp = readFloat(id, type);
if (type == PROCESS)
@@ -2314,9 +2141,6 @@ BaseRecords::clearRecords(RecordType typ
case INK_INT:
current->data.int_data = 0LL;
break;
- case INK_LLONG:
- current->data.llong_data = 0LL;
- break;
case INK_COUNTER:
current->data.counter_data = 0LL;
break;
@@ -2409,31 +2233,6 @@ BaseRecords::rl_readInteger(int id, Reco
} /* End BaseRecords::rl_readInteger */
-MgmtLLong
-BaseRecords::rl_readLLong(int id, RecordType type, bool * found)
-{
- Record *rec;
-
- if (found)
- *found = false;
- if ((rec = getRecord(id, type)) && rec->stype == INK_LLONG) {
- MgmtLLong ret;
-
- ret = rec->data.llong_data;
- rec->read = true;
-
- if (found)
- *found = true;
- return ret;
- }
- if (!found) {
- // die if the caller isn't checking 'found'
- mgmt_fatal(stderr, "[Config Error] Unable to find record id: %d type: %d\n", id, type);
- }
- return INVALID;
-} /* End BaseRecords::rl_readLLong */
-
-
MgmtFloat
BaseRecords::rl_readFloat(int id, RecordType type, bool * found)
{
@@ -2633,24 +2432,6 @@ BaseRecords::addPluginInteger(const char
}
bool
-BaseRecords::addPluginLLong(const char *name, MgmtLLong value)
-{
- Record *new_rec;
- bool retval = false;
-
- ink_mutex_acquire(&mutex[PLUGIN]);
-
- if ((new_rec = addPluginRecord(name, INK_LLONG)) != NULL) {
- new_rec->data.llong_data = value;
- retval = true;
- }
-
- ink_mutex_release(&mutex[PLUGIN]);
-
- return retval;
-}
-
-bool
BaseRecords::addPluginFloat(const char *name, MgmtFloat value)
{
Record *new_rec;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/BaseRecords.h Tue Jun 15 04:02:48 2010
@@ -102,7 +102,6 @@ typedef struct _base_record
{
MgmtIntCounter counter_data; /* Data */
MgmtInt int_data;
- MgmtLLong llong_data;
MgmtFloat float_data;
MgmtString string_data;
} data;
@@ -137,26 +136,22 @@ public:
MgmtIntCounter incrementCounter(int id, RecordType type);
MgmtIntCounter setCounter(int id, RecordType type, MgmtIntCounter value);
MgmtInt setInteger(int id, RecordType type, MgmtInt value, bool dirty = true);
- MgmtLLong setLLong(int id, RecordType type, MgmtLLong value, bool dirty = true);
MgmtFloat setFloat(int id, RecordType type, MgmtFloat value, bool dirty = true);
bool setString(int id, RecordType type, MgmtString value, bool dirty = true);
MgmtIntCounter incrementCounter(const char *name);
MgmtIntCounter setCounter(const char *name, MgmtIntCounter value);
MgmtInt setInteger(const char *name, MgmtInt value, bool dirty = true);
- MgmtLLong setLLong(const char *name, MgmtLLong value, bool dirty = true);
MgmtFloat setFloat(const char *name, MgmtFloat value, bool dirty = true);
bool setString(const char *name, MgmtString value, bool dirty = true);
MgmtIntCounter readCounter(int id, RecordType type, bool * found = NULL);
MgmtInt readInteger(int id, RecordType type, bool * found = NULL);
- MgmtLLong readLLong(int id, RecordType type, bool * found = NULL);
MgmtFloat readFloat(int id, RecordType type, bool * found = NULL);
MgmtString readString(int id, RecordType type, bool * found = NULL);
MgmtIntCounter readCounter(const char *name, bool * found = NULL);
MgmtInt readInteger(const char *name, bool * found = NULL);
- MgmtLLong readLLong(const char *name, bool * found = NULL);
MgmtFloat readFloat(const char *name, bool * found = NULL);
MgmtString readString(const char *name, bool * found = NULL);
@@ -167,19 +162,16 @@ public:
*/
MgmtIntCounter rl_readCounter(int id, RecordType type, bool * found = NULL);
MgmtInt rl_readInteger(int id, RecordType type, bool * found = NULL);
- MgmtLLong rl_readLLong(int id, RecordType type, bool * found = NULL);
MgmtFloat rl_readFloat(int id, RecordType type, bool * found = NULL);
MgmtString rl_readString(int id, RecordType type, bool * found = NULL);
MgmtIntCounter rl_readCounter(const char *name, bool * found = NULL);
MgmtInt rl_readInteger(const char *name, bool * found = NULL);
- MgmtLLong rl_readLLong(const char *name, bool * found = NULL);
MgmtFloat rl_readFloat(const char *name, bool * found = NULL);
MgmtString rl_readString(const char *name, bool * found = NULL);
MgmtIntCounter readCounter(const char *name, Records * recs, bool * found = NULL);
MgmtInt readInteger(const char *name, Records * recs, bool * found = NULL);
- MgmtLLong readLLong(const char *name, Records * recs, bool * found = NULL);
MgmtFloat readFloat(const char *name, Records * recs, bool * found = NULL);
MgmtString readString(const char *name, Records * recs, bool * found = NULL);
@@ -223,7 +215,6 @@ public:
*/
bool addPluginCounter(const char *name, MgmtIntCounter value);
bool addPluginInteger(const char *name, MgmtInt value);
- bool addPluginLLong(const char *name, MgmtLLong value);
bool addPluginFloat(const char *name, MgmtFloat value);
bool addPluginString(const char *name, MgmtString value);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.cc Tue Jun 15 04:02:48 2010
@@ -80,21 +80,6 @@ LMRecords::setInteger(int id, RecordType
return (BaseRecords::setInteger(id, type, value));
} /* End LMRecords::setInteger */
-MgmtLLong
-LMRecords::setLLong(int id, RecordType type, MgmtLLong value)
-{
- if (type == CONFIG) {
- time_t t;
- ink_mutex_acquire(&mutex[CONFIG]);
- if ((t = time(NULL)) > 0) {
- time_last_config_change = t;
- }
- ink_mutex_release(&mutex[CONFIG]);
- }
- update_user_defined_records(id, type);
- return (BaseRecords::setLLong(id, type, value));
-} /* End LMRecords::setLLong */
-
MgmtFloat
LMRecords::setFloat(int id, RecordType type, MgmtFloat value)
{
@@ -164,19 +149,6 @@ LMRecords::setInteger(const char *name,
} /* End LMRecords::setInteger */
-MgmtLLong
-LMRecords::setLLong(const char *name, MgmtLLong value)
-{
- int id;
- RecordType type;
-
- if (idofRecord(name, &id, &type)) {
- return setLLong(id, type, value);
- }
- return INVALID;
-} /* End LMRecords::setLLong */
-
-
MgmtFloat
LMRecords::setFloat(const char *name, MgmtFloat value)
{
@@ -237,23 +209,6 @@ LMRecords::readPProcessInteger(int id, R
} /* End LMRecords::readPProcessInteger */
-MgmtLLong
-LMRecords::readPProcessLLong(int id, RecordType type, char *p)
-{
- MgmtLLong ret = INVALID;
- Record *rec;
-
- ink_mutex_acquire(&mutex[type]);
- rec = getRecord(id, type);
- if ((getExternalRecordValue(rec, p)) && rec->stype == INK_LLONG) {
- ret = (rec->data.llong_data);
- }
- ink_mutex_release(&mutex[type]);
-
- return ret;
-} /* End LMRecords::readPProcessLLong */
-
-
MgmtFloat
LMRecords::readPProcessFloat(int id, RecordType type, char *p)
{
Modified: trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/LMRecords.h Tue Jun 15 04:02:48 2010
@@ -56,20 +56,17 @@ public:
MgmtIntCounter incrementCounter(int id, RecordType type);
MgmtIntCounter setCounter(int id, RecordType type, MgmtIntCounter value);
MgmtInt setInteger(int id, RecordType type, MgmtInt value);
- MgmtLLong setLLong(int id, RecordType type, MgmtLLong value);
MgmtFloat setFloat(int id, RecordType type, MgmtFloat value);
bool setString(int id, RecordType type, MgmtString value);
MgmtIntCounter incrementCounter(const char *name);
MgmtIntCounter setCounter(const char *name, MgmtIntCounter value);
MgmtInt setInteger(const char *name, MgmtInt value);
- MgmtLLong setLLong(const char *name, MgmtLLong value);
MgmtFloat setFloat(const char *name, MgmtFloat value);
bool setString(const char *name, MgmtString value);
MgmtIntCounter readPProcessCounter(int id, RecordType type, char *p);
MgmtInt readPProcessInteger(int id, RecordType type, char *p);
- MgmtLLong readPProcessLLong(int id, RecordType type, char *p);
MgmtFloat readPProcessFloat(int id, RecordType type, char *p);
MgmtString readPProcessString(int id, RecordType type, char *p);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc Tue Jun 15 04:02:48 2010
@@ -746,9 +746,6 @@ LocalManager::handleMgmtMsgFromProcesses
case RECD_INT:
RecRegisterStatInt(RECT_PLUGIN, var_name, ink_atoi64(var_value), RECP_NULL);
break;
- case RECD_LLONG:
- 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);
break;
@@ -774,9 +771,6 @@ LocalManager::handleMgmtMsgFromProcesses
case INK_INT:
REC_setInteger(var_name, ink_atoi64(var_value));
break;
- case INK_LLONG:
- REC_setLLong(var_name, ink_atoi64(var_value));
- break;
case INK_COUNTER:
case INK_FLOAT:
case INK_STRING:
Modified: trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MgmtDefs.h Tue Jun 15 04:02:48 2010
@@ -42,7 +42,6 @@
typedef int64 MgmtIntCounter;
typedef int64 MgmtInt;
-typedef int64 MgmtLLong;
typedef float MgmtFloat;
typedef char *MgmtString;
@@ -55,8 +54,7 @@ typedef enum
INK_COUNTER = 3,
INK_STAT_CONST = 4, // Added for the StatProcessor
INK_STAT_FX = 5, // Added for the StatProcessor
- INK_LLONG = 6, // Added for Long Long config options
- MAX_MGMT_TYPE = 7,
+ MAX_MGMT_TYPE = 6,
} MgmtType;
/*
Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc Tue Jun 15 04:02:48 2010
@@ -614,10 +614,6 @@ checkBackDoorP(int req_fd, char *message
sprintf(reply, "\nRecord: '%s' Val: '%lld'\n", the_records->recs[id].name,
the_records->recs[id].data.int_data);
break;
- case INK_LLONG:
- sprintf(reply, "\nRecord: '%s' Val: '%lld'\n", the_records->recs[id].name,
- the_records->recs[id].data.llong_data);
- break;
case INK_FLOAT:
sprintf(reply, "\nRecord: '%s' Val: '%f'\n", the_records->recs[id].name,
the_records->recs[id].data.float_data);
@@ -657,9 +653,6 @@ checkBackDoorP(int req_fd, char *message
case INK_INT:
pmgmt->record_data->setInteger(id, type, ink_atoi64(value));
break;
- case INK_LLONG:
- pmgmt->record_data->setLLong(id, type, ink_atoi64(value));
- break;
case INK_FLOAT:
pmgmt->record_data->setFloat(id, type, atof(value));
break;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc Tue Jun 15 04:02:48 2010
@@ -2109,7 +2109,7 @@ RecordElement RecordsConfig[] = {
,
// # default the ram cache size to AUTO_SIZE (-1)
// # alternatively: 20971520 (20MB)
- {CONFIG, "proxy.config.cache.ram_cache.size", "", INK_LLONG, "-1", RU_RESTART_TS, RR_NULL, RC_STR, "^-?[0-9]+$",
+ {CONFIG, "proxy.config.cache.ram_cache.size", "", INK_INT, "-1", RU_RESTART_TS, RR_NULL, RC_STR, "^-?[0-9]+$",
RA_NULL}
,
// # how often should the directory be synced (seconds)
@@ -2120,7 +2120,7 @@ RecordElement RecordsConfig[] = {
,
{CONFIG, "proxy.config.cache.select_alternate", "", INK_INT, "1", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
,
- {CONFIG, "proxy.config.cache.ram_cache_cutoff", "", INK_LLONG, "1048576", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
+ {CONFIG, "proxy.config.cache.ram_cache_cutoff", "", INK_INT, "1048576", RU_REREAD, RR_NULL, RC_NULL, NULL, RA_NULL}
,
{CONFIG, "proxy.config.cache.ram_cache_mixt_cutoff", "", INK_INT, "1048576", RU_REREAD, RR_NULL, RC_NULL, NULL,
RA_NULL}
@@ -4205,7 +4205,6 @@ LibRecordsConfigInit()
int r = 0;
RecInt tempInt = 0;
- int64 tempLLong = 0;
RecFloat tempFloat = 0.0;
RecCounter tempCounter = 0;
@@ -4311,11 +4310,6 @@ LibRecordsConfigInit()
RecRegisterConfigInt(type, RecordsConfig[r].name, tempInt, update, check, RecordsConfig[r].regex, access);
break;
- case INK_LLONG:
- tempLLong = (RecInt) ink_atoi64(RecordsConfig[r].value);
- RecRegisterConfigLLong(type, RecordsConfig[r].name, tempLLong, update, check, RecordsConfig[r].regex, access);
- break;
-
case INK_FLOAT:
tempFloat = (RecFloat) atof(RecordsConfig[r].value);
RecRegisterConfigFloat(type, RecordsConfig[r].name, tempFloat, update, check, RecordsConfig[r].regex, access);
@@ -4346,11 +4340,6 @@ LibRecordsConfigInit()
RecRegisterStatInt(type, RecordsConfig[r].name, tempInt, RECP_NON_PERSISTENT);
break;
- case INK_LLONG:
- tempLLong = (RecLLong) ink_atoi64(RecordsConfig[r].value);
- RecRegisterStatLLong(type, RecordsConfig[r].name, tempLLong, RECP_NON_PERSISTENT);
- break;
-
case INK_FLOAT:
tempFloat = (RecFloat) atof(RecordsConfig[r].value);
RecRegisterStatFloat(type, RecordsConfig[r].name, tempFloat, RECP_NON_PERSISTENT);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc Tue Jun 15 04:02:48 2010
@@ -297,7 +297,6 @@ MgmtRecordGet(const char *rec_name, INKR
char *str_val;
MgmtIntCounter counter_val;
MgmtInt int_val;
- MgmtLLong llong_val;
Debug("RecOp", "[MgmtRecordGet] Start\n");
@@ -326,15 +325,6 @@ MgmtRecordGet(const char *rec_name, INKR
Debug("RecOp", "[MgmtRecordGet] Get Int Var %s = %d\n", rec_ele->rec_name, rec_ele->int_val);
break;
- case RECD_LLONG:
- rec_ele->rec_type = INK_REC_LLONG;
- if (!varLLongFromName(rec_name, &(llong_val)))
- return INK_ERR_FAIL;
- rec_ele->llong_val = (INKLLong) llong_val;
-
- Debug("RecOp", "[MgmtRecordGet] Get LLong Var %s = %lld\n", rec_ele->rec_name, rec_ele->llong_val);
- break;
-
case RECD_FLOAT:
rec_ele->rec_type = INK_REC_FLOAT;
if (!varFloatFromName(rec_name, &(rec_ele->float_val)))
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h Tue Jun 15 04:02:48 2010
@@ -153,7 +153,6 @@ extern "C"
#endif
typedef INK64 INKInt;
- typedef INK64 INKLLong;
typedef INK64 INKCounter;
typedef float INKFloat;
typedef char *INKString;
@@ -247,7 +246,6 @@ typedef enum
INK_REC_COUNTER,
INK_REC_FLOAT,
INK_REC_STRING,
- INK_REC_LLONG,
INK_REC_UNDEFINED
} INKRecordT;
@@ -509,7 +507,6 @@ typedef enum
union
{ /* record value */
INKInt int_val;
- INKLLong llong_val;
INKCounter counter_val;
INKFloat float_val;
INKString string_val;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc Tue Jun 15 04:02:48 2010
@@ -1185,12 +1185,6 @@ handleOverseer(int fd, int mode)
snprintf(reply, sizeof(reply), "%s = \"%lld\"", cur, val);
break;
}
- case RECD_LLONG:{
- RecLLong val;
- RecGetRecordLLong(cur, &val);
- snprintf(reply, sizeof(reply), "%s = \"%lld\"", cur, val);
- break;
- }
case RECD_FLOAT:{
RecFloat val;
RecGetRecordFloat(cur, &val);
@@ -1308,11 +1302,6 @@ handleOverseer(int fd, int mode)
RecSetRecordInt(var, val);
break;
}
- case RECD_LLONG:{
- RecLLong val = (RecLLong) ink_atoi64(config_value);
- RecSetRecordLLong(var, val);
- break;
- }
case RECD_FLOAT:{
RecFloat val = (RecFloat) atof(config_value);
RecSetRecordFloat(var, val);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc Tue Jun 15 04:02:48 2010
@@ -2858,9 +2858,6 @@ ConfigGet(const char *rec_name)
case INK_REC_STRING: // char*
Cli_Printf("%s = \"%s\"\n", rec_name, rec_val.string_val);
break;
- case INK_REC_LLONG: // INK64 aka "long long"
- Cli_Printf("%s = %lld\n", rec_name, rec_val.llong_val);
- break;
case INK_REC_UNDEFINED: // what's this???
Cli_Printf("%s = UNDEFINED\n", rec_name);
break;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc Tue Jun 15 04:02:48 2010
@@ -2415,9 +2415,6 @@ getXmlRecType(struct RecordElement rec,
break;
case INK_INT:
case INK_COUNTER:
- case INK_LLONG:
- sprintf(buf, "<xs:attribute name=\"%s\" type=\"xs:integer\" default=\"%s\"/>", rec.name, rec.value);
- break;
default:
// Handled here:
// INVALID, INK_STAT_CONST,INK_STAT_FX, MAX_MGMT_TYPE
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtSchema.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtSchema.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtSchema.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtSchema.cc Tue Jun 15 04:02:48 2010
@@ -97,7 +97,6 @@ validateType(XMLNode * record)
goto Lerror;
}
if (!((strcmp(attrName, "INT") == 0 && rec_type == RECD_INT)) &&
- !((strcmp(attrName, "LLONG") == 0 && rec_type == RECD_LLONG)) &&
!((strcmp(attrName, "STRING") == 0 && rec_type == RECD_STRING)) &&
!((strcmp(attrName, "FLOAT") == 0 && rec_type == RECD_FLOAT))) {
fprintf(stderr, "invalid <record> - unknown type: %s\n", attrName);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc Tue Jun 15 04:02:48 2010
@@ -82,13 +82,6 @@ varSetFromStr(const char *varName, const
found = false;
}
break;
- case RECD_LLONG:
- if (sscanf(value, "%lld", &data.rec_llong) == 1) {
- RecSetRecordLLong((char *) varName, data.rec_llong);
- } else {
- found = false;
- }
- break;
case RECD_COUNTER:
if (sscanf(value, "%lld", &data.rec_counter) == 1) {
RecSetRecordCounter((char *) varName, data.rec_counter);
@@ -151,12 +144,6 @@ varSetFloat(const char *varName, RecFloa
RecSetRecordInt((char *) varName, (RecInt) value);
break;
}
- case RECD_LLONG:
- if (convert) {
- value += 0.5; // rounding up
- RecSetRecordLLong((char *) varName, (RecLLong) value);
- break;
- }
case RECD_COUNTER:
if (convert) {
RecSetRecordCounter((char *) varName, (RecCounter) value);
@@ -202,11 +189,6 @@ varSetCounter(const char *varName, RecCo
RecSetRecordInt((char *) varName, (RecInt) value);
break;
}
- case RECD_LLONG:
- if (convert) {
- RecSetRecordLLong((char *) varName, (RecLLong) value);
- break;
- }
case RECD_FLOAT:
if (convert) {
RecSetRecordFloat((char *) varName, (RecFloat) value);
@@ -247,11 +229,6 @@ varSetInt(const char *varName, RecInt va
case RECD_INT:
RecSetRecordInt((char *) varName, (RecInt) value);
break;
- case RECD_LLONG:
- if (convert) {
- RecSetRecordLLong((char *) varName, (RecLLong) value);
- break;
- }
case RECD_COUNTER:
if (convert) {
RecSetRecordCounter((char *) varName, (RecCounter) value);
@@ -272,57 +249,6 @@ varSetInt(const char *varName, RecInt va
return found;
}
-// bool varSetLLong(const char* varName, RecLLong value)
-//
-// Sets the variable specifed by varName to value. varName
-// must be an RecLLong variable. No conversion is done for
-// other types unless convert is set to ture. In the case
-// of convert is ture, type conversion is perform if applicable.
-// By default, convert is set to be false and can be overrided
-// when the function is called.
-//
-bool
-varSetLLong(const char *varName, RecLLong value, bool convert)
-{
- RecDataT varDataType = RECD_NULL;
- bool found = true;
- int err = REC_ERR_FAIL;
-
- err = RecGetRecordDataType((char *) varName, &varDataType);
- if (err != REC_ERR_OKAY) {
- return found;
- }
-
- switch (varDataType) {
- case RECD_LLONG:
- {
- RecSetRecordLLong((char *) varName, (RecLLong) value);
- break;
- }
- case RECD_INT:
- if (convert) {
- RecSetRecordInt((char *) varName, (RecInt) value);
- }
- break;
- case RECD_COUNTER:
- if (convert) {
- RecSetRecordCounter((char *) varName, (RecCounter) value);
- break;
- }
- case RECD_FLOAT:
- if (convert) {
- RecSetRecordFloat((char *) varName, (RecFloat) value);
- break;
- }
- case RECD_STRING:
- case RECD_NULL:
- default:
- found = false;
- break;
- }
-
- return found;
-}
// bool varCounterFromName (const char*, RecFloat* )
//
@@ -351,12 +277,6 @@ varCounterFromName(const char *varName,
*value = (RecCounter) tempInt;
break;
}
- case RECD_LLONG:{
- RecLLong tempLLong = 0;
- RecGetRecordLLong((char *) varName, &tempLLong);
- *value = (RecCounter) tempLLong;
- break;
- }
case RECD_COUNTER:{
*value = 0;
RecGetRecordCounter((char *) varName, value);
@@ -402,12 +322,6 @@ varFloatFromName(const char *varName, Re
*value = (RecFloat) tempInt;
break;
}
- case RECD_LLONG:{
- RecLLong tempLLong = 0;
- RecGetRecordLLong((char *) varName, &tempLLong);
- *value = (RecFloat) tempLLong;
- break;
- }
case RECD_COUNTER:{
RecCounter tempCounter = 0;
RecGetRecordCounter((char *) varName, &tempCounter);
@@ -456,12 +370,6 @@ varIntFromName(const char *varName, RecI
RecGetRecordInt((char *) varName, value);
break;
}
- case RECD_LLONG:{
- RecLLong tempLLong = 0;
- RecGetRecordLLong((char *) varName, &tempLLong);
- *value = (RecInt) tempLLong;
- break;
- }
case RECD_COUNTER:{
RecCounter tempCounter = 0;
RecGetRecordCounter((char *) varName, &tempCounter);
@@ -485,60 +393,6 @@ varIntFromName(const char *varName, RecI
return found;
}
-// bool varLLongFromName (const char*, RecLLong* )
-//
-// Sets the *value to value of the varName.
-//
-// return true if bufVal was succefully set
-// and false otherwise
-//
-bool
-varLLongFromName(const char *varName, RecLLong * value)
-{
- RecDataT varDataType = RECD_NULL;
- bool found = true;
- int err = REC_ERR_FAIL;
-
- err = RecGetRecordDataType((char *) varName, &varDataType);
-
- if (err != REC_ERR_OKAY) {
- return false;
- }
-
- switch (varDataType) {
- case RECD_LLONG:{
- *value = 0;
- RecGetRecordLLong((char *) varName, value);
- break;
- }
- case RECD_INT:{
- RecInt tempInt = 0;
- RecGetRecordInt((char *) varName, &tempInt);
- *value = (RecLLong) tempInt;
- break;
- }
- case RECD_COUNTER:{
- RecCounter tempCounter = 0;
- RecGetRecordCounter((char *) varName, &tempCounter);
- *value = (RecLLong) tempCounter;
- break;
- }
- case RECD_FLOAT:{
- RecFloat tempFloat = 0.0;
- RecGetRecordFloat((char *) varName, &tempFloat);
- *value = (RecLLong) tempFloat;
- break;
- }
- case RECD_STRING:
- case RECD_NULL:
- default:
- *value = -1;
- found = false;
- break;
- }
-
- return found;
-}
// void percentStrFromFloat(MgmtFloat, char* bufVal)
//
@@ -593,44 +447,6 @@ commaStrFromInt(RecInt bytes, char *bufV
ink_assert(curPtr + 1 == bufVal);
}
-// void commaStrFromLLong(RecLLong bytes, char* bufVal)
-// Converts an LLong to string with commas in it
-//
-// bufVal must point to adequate space a la sprintf
-//
-void
-commaStrFromLLong(RecLLong bytes, char *bufVal)
-{
- int len;
- int numCommas;
- char *curPtr;
-
- sprintf(bufVal, "%lld", bytes);
- len = strlen(bufVal);
-
- // The string is too short to need commas
- if (len < 4) {
- return;
- }
-
- numCommas = (len - 1) / 3;
- curPtr = bufVal + (len + numCommas);
- *curPtr = '\0';
- curPtr--;
-
- for (int i = 0; i < len; i++) {
- *curPtr = bufVal[len - 1 - i];
-
- if ((i + 1) % 3 == 0 && curPtr != bufVal) {
- curPtr--;
- *curPtr = ',';
- }
- curPtr--;
- }
-
- ink_assert(curPtr + 1 == bufVal);
-}
-
// void MbytesFromInt(RecInt bytes, char* bufVal)
// Converts into a string in units of megabytes
// No unit specification is added
@@ -645,20 +461,6 @@ MbytesFromInt(RecInt bytes, char *bufVal
sprintf(bufVal, "%lld", mBytes);
}
-// void MbytesFromLLong(RecLLong bytes, char* bufVal)
-// Converts into a string in units of megabytes
-// No unit specification is added
-//
-// bufVal must point to adequate space a la sprintf
-//
-void
-MbytesFromLLong(RecLLong bytes, char *bufVal)
-{
- RecLLong mBytes = bytes / 1048576;
-
- sprintf(bufVal, "%lld", mBytes);
-}
-
// void bytesFromInt(RecInt bytes, char* bufVal)
//
// Converts mgmt into a string with one of
@@ -696,36 +498,6 @@ bytesFromInt(RecInt bytes, char *bufVal)
}
}
-// void bytesFromLLong(RecLLong bytes, char* bufVal)
-//
-// Converts mgmt into a string with one of
-// GB, MB, KB, B units
-//
-// bufVal must point to adequate space a la sprintf
-void
-bytesFromLLong(RecLLong bytes, char *bufVal)
-{
- const int64 gb = 1073741824;
- const long int mb = 1048576;
- const long int kb = 1024;
- double unitBytes;
-
- if (bytes >= gb) {
- unitBytes = bytes / (double) gb;
- snprintf(bufVal, 15, "%.1f GB", unitBytes);
- } else {
- if (bytes >= mb) {
- unitBytes = bytes / (double) mb;
- snprintf(bufVal, 15, "%.1f MB", unitBytes);
- } else if (bytes >= kb) {
- unitBytes = bytes / (double) kb;
- snprintf(bufVal, 15, "%.1f KB", unitBytes);
- } else {
- snprintf(bufVal, 15, "%lld", bytes);
- }
- }
-}
-
// bool varStrFromName (const char*, char*, int)
//
// Sets the bufVal string to the value of the local manager
@@ -796,19 +568,6 @@ varStrFromName(const char *varNameConst,
}
break;
- case RECD_LLONG:
- RecGetRecordLLong(varName, &data.rec_llong);
- if (formatOption == 'b') {
- bytesFromLLong(data.rec_llong, bufVal);
- } else if (formatOption == 'm') {
- MbytesFromLLong(data.rec_llong, bufVal);
- } else if (formatOption == 'c') {
- commaStrFromLLong(data.rec_llong, bufVal);
- } else {
- sprintf(bufVal, "%lld", data.rec_llong);
- }
- break;
-
case RECD_COUNTER:
RecGetRecordCounter(varName, &data.rec_counter);
if (formatOption == 'b') {
@@ -873,9 +632,6 @@ MgmtData::setFromName(const char *varNam
case RECD_INT:
RecGetRecordInt((char *) varName, &this->data.rec_int);
break;
- case RECD_LLONG:
- RecGetRecordLLong((char *) varName, &this->data.rec_llong);
- break;
case RECD_COUNTER:
RecGetRecordCounter((char *) varName, &this->data.rec_counter);
break;
@@ -930,14 +686,6 @@ MgmtData::compareFromString(const char *
}
}
break;
- case RECD_LLONG:
- if (str && recordRegexCheck("^[0-9]+$", str)) {
- compData.rec_llong = ink_atoi64(str);
- if (data.rec_llong == compData.rec_llong) {
- compare = true;
- }
- }
- break;
case RECD_COUNTER:
if (str && recordRegexCheck("^[0-9]+$", str)) {
compData.rec_counter = ink_atoi64(str);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.h Tue Jun 15 04:02:48 2010
@@ -59,15 +59,12 @@ public:
// Convert to byte units (GB, MB, KB)
void bytesFromInt(RecInt bytes, char *bufVal);
-void bytesFromLLong(RecLLong bytes, char *bufVal);
// Convert to MB
void MbytesFromInt(RecInt bytes, char *bufVal);
-void MbytesFromLLong(RecLLong bytes, char *bufVal);
// Create comma string from int
void commaStrFromInt(RecInt bytes, char *bufVal);
-void commaStrFromLLong(RecLLong bytes, char *bufVal);
// Create percent string from float
void percentStrFromFloat(RecFloat val, char *bufVal);
@@ -78,7 +75,6 @@ bool varSetFromStr(const char *varName,
// Converts where applicable to specified type
bool varIntFromName(const char *varName, RecInt * value);
-bool varLLongFromName(const char *varName, RecLLong * value);
bool varFloatFromName(const char *varName, RecFloat * value);
bool varCounterFromName(const char *varName, RecCounter * value);
@@ -86,7 +82,6 @@ bool varCounterFromName(const char *varN
// type
// Default arguement "convert" added to allow great flexiblity in type checking
bool varSetInt(const char *varName, RecInt value, bool convert = false);
-bool varSetLLong(const char *varName, RecLLong value, bool convert = false);
bool varSetCounter(const char *varName, RecCounter value, bool convert = false);
bool varSetFloat(const char *varName, RecFloat value, bool convert = false);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/MgmtRaf.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/MgmtRaf.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/MgmtRaf.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/MgmtRaf.cc Tue Jun 15 04:02:48 2010
@@ -159,13 +159,6 @@ RafProcessQueryStat(textBuffer * resp, c
snprintf(val_output, 256, "%lld", i);
break;
}
- case RECD_LLONG:
- {
- RecLLong ll = 0;
- RecGetRecordLLong(var, &ll);
- snprintf(val_output, 256, "%lld", ll);
- break;
- }
case RECD_FLOAT:
{
RecFloat f = 0;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc Tue Jun 15 04:02:48 2010
@@ -805,7 +805,6 @@ handle_record_info(WebHttpContext * whc,
rec_type_a[RECT_LOCAL] = "LOCAL";
rec_type_a[RECT_PLUGIN] = "PLUGIN";
data_type_a[RECD_INT] = "INT";
- data_type_a[RECD_LLONG] = "LLONG";
data_type_a[RECD_FLOAT] = "FLOAT";
data_type_a[RECD_STRING] = "STRING";
data_type_a[RECD_COUNTER] = "COUNTER";
@@ -874,15 +873,6 @@ handle_record_info(WebHttpContext * whc,
same = (data == data_default);
}
break;
- case RECD_LLONG:
- {
- RecLLong data = g_records[r].data.rec_llong;
- RecLLong data_default = g_records[r].data_default.rec_llong;
- snprintf(cur_value, BUF_SIZE, "%lld", data);
- snprintf(def_value_rec, BUF_SIZE, "%lld", data_default);
- same = (data == data_default);
- }
- break;
case RECD_FLOAT:
{
RecFloat data = g_records[r].data.rec_float;
@@ -970,7 +960,6 @@ handle_record_info(WebHttpContext * whc,
type_a[LOCAL] = "LOCAL";
type_a[PLUGIN] = "PLUGIN";
value_type_a[INK_INT] = "INT";
- value_type_a[INK_LLONG] = "LLONG";
value_type_a[INK_FLOAT] = "FLOAT";
value_type_a[INK_STRING] = "STRING";
value_type_a[INK_COUNTER] = "COUNTER";
@@ -1056,17 +1045,6 @@ handle_record_info(WebHttpContext * whc,
}
}
break;
- case INK_LLONG:
- {
- MgmtLLong i = lmgmt->record_data->readLLong(RecordsConfig[r].name, &found);
- if (found) {
- snprintf(cur_value, BUF_SIZE, "%lld", i);
- if (i == ink_atoi64(RecordsConfig[r].value)) {
- same = true;
- }
- }
- }
- break;
case INK_FLOAT:
{
float d;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc Tue Jun 15 04:02:48 2010
@@ -317,31 +317,6 @@ overviewRecord::readInteger(const char *
return rec;
}
-RecLLong
-overviewRecord::readLLong(const char *name, bool * found)
-{
- RecLLong rec = 0;
- int rec_status = REC_ERR_OKAY;
- int order = -1;
- if (localNode == false) {
- rec_status = RecGetRecordRelativeOrder(name, &order);
- if (rec_status == REC_ERR_OKAY) {
- ink_release_assert(order < node_rec_data.num_recs);
- ink_debug_assert(order < node_rec_data.num_recs);
- rec = node_rec_data.recs[order].data.rec_llong;
- }
- } else {
- rec_status = RecGetRecordLLong(name, &rec);
- }
-
- if (found) {
- *found = (rec_status == REC_ERR_OKAY);
- } else {
- mgmt_log(stderr, "node variables '%s' not found!\n");
- }
- return rec;
-}
-
RecFloat
overviewRecord::readFloat(const char *name, bool * found)
{
@@ -420,7 +395,6 @@ overviewRecord::varStrFromName(const cha
{
MgmtIntCounter counter_data; /* Data */
MgmtInt int_data;
- MgmtLLong llong_data;
MgmtFloat float_data;
MgmtString string_data;
} data;
@@ -465,18 +439,6 @@ overviewRecord::varStrFromName(const cha
sprintf(bufVal, "%lld", data.int_data);
}
break;
- case RECD_LLONG:
- data.llong_data = this->readLLong(varName, &found);
- if (formatOption == 'b') {
- bytesFromInt(data.llong_data, bufVal);
- } else if (formatOption == 'm') {
- MbytesFromInt(data.int_data, bufVal);
- } else if (formatOption == 'c') {
- commaStrFromInt(data.int_data, bufVal);
- } else {
- sprintf(bufVal, "%lld", data.int_data);
- }
- break;
case RECD_COUNTER:
data.counter_data = this->readCounter(varName, &found);
if (formatOption == 'b') {
Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.h Tue Jun 15 04:02:48 2010
@@ -104,7 +104,6 @@ public:
bool varStrFromName(const char *varName, char *bufVal, int bufLen);
RecCounter readCounter(const char *name, bool * found);
RecInt readInteger(const char *name, bool * found);
- RecLLong readLLong(const char *name, bool * found);
RecFloat readFloat(const char *name, bool * found);
RecString readString(const char *name, bool * found);
bool varIntFromName(const char *varName, RecInt * value);
Modified: trafficserver/traffic/trunk/rc/update_records.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/rc/update_records.cc?rev=954701&r1=954700&r2=954701&view=diff
==============================================================================
--- trafficserver/traffic/trunk/rc/update_records.cc (original)
+++ trafficserver/traffic/trunk/rc/update_records.cc Tue Jun 15 04:02:48 2010
@@ -110,7 +110,6 @@ const char *config_str = "CONFIG";
const char *local_str = "LOCAL";
const char *plugin_str = "PLUGIN";
const char *int_str = "INT";
-const char *llong_str = "LLONG";
const char *string_str = "STRING";
const char *float_str = "FLOAT";
const char *counter_str = "COUNTER";
@@ -308,9 +307,6 @@ generate_rec_ht_from_RecordsConfig()
case INK_INT:
ce->value_type = int_str;
break;
- case INK_LLONG:
- ce->value_type = llong_str;
- break;
case INK_FLOAT:
ce->value_type = float_str;
break;