You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2010/05/07 01:40:43 UTC
svn commit: r941972 [2/3] - in /trafficserver/traffic/trunk:
iocore/block-cache/ iocore/cache/ iocore/cluster/ iocore/dns/
iocore/eventsystem/ iocore/fastio/include/ iocore/fastio/inkfio/
iocore/fastio/inkudp/ iocore/fastio/libfastIO/ iocore/fastio/too...
Modified: trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITest.cc Thu May 6 23:40:41 2010
@@ -127,32 +127,6 @@ REGRESSION_TEST(SDK_API_INKTrafficServer
return;
}
-#if 0
-////////////////////////////////////////////////
-// SDK_API_INKPluginRegister
-//
-// Unit Test for API: INKPluginRegister
-////////////////////////////////////////////////
-REGRESSION_TEST(SDK_API_INKPluginRegister) (RegressionTest * test, int atype, int *pstatus) {
- *pstatus = REGRESSION_TEST_INPROGRESS;
-
- /* Assume UT is for SDK3.0 and higher */
- INKPluginRegistrationInfo info;
- info.plugin_name = "hello_world";
- info.vendor_name = "my_company";
- info.support_email = "ts-api-support@my_company.com";
-
- if (!INKPluginRegister(INK_SDK_VERSION_2_0, &info)) {
- SDK_RPRINT(test, "INKPluginRegister", "TestCase1", TC_FAIL, "can't register plugin");
- *pstatus = REGRESSION_TEST_FAILED;
- return;
- }
-
- SDK_RPRINT(test, "INKPluginRegister", "TestCase1", TC_PASS, "ok");
- *pstatus = REGRESSION_TEST_PASSED;
- return;
-}
-#endif
////////////////////////////////////////////////
// SDK_API_INKPluginDirGet
@@ -560,18 +534,6 @@ cache_handler(INKCont contp, INKEvent ev
}
Debug(UTDBG_TAG "_cache_write", "finishing up [d]");
-#if 0
- //
- // [INKqa12105] INKVConnWriteVIOGet is only for VConnection implementors, we are a user here.
- //
- if (INKVConnWriteVIOGet(cache_vconn->write_vconnp) != cache_vconn->write_vio) {
- SDK_RPRINT(SDK_Cache_test, "INKVConnWriteVIOGet", "TestCase1", TC_FAIL, "write_vio/vc is corrupted");
- *SDK_Cache_pstatus = REGRESSION_TEST_FAILED;
- return 1;
- } else {
- SDK_RPRINT(SDK_Cache_test, "INKVConnWriteVIOGet", "TestCase1", TC_PASS, "ok");
- }
-#endif
if (INKVIOBufferGet(cache_vconn->write_vio) != cache_vconn->bufp) {
SDK_RPRINT(SDK_Cache_test, "INKVIOBufferGet", "TestCase1", TC_FAIL, "write_vio corrupted");
@@ -623,22 +585,6 @@ cache_handler(INKCont contp, INKEvent ev
Debug(UTDBG_TAG "_cache_write", "finishing up [h]");
-#if 0 // FIXME? -- we need to decide when/if to change cache vconnection behavior
- // for the cache APIs we cannot used 'VConnClosedGet' currently because the
- // VConnection that we have is not to a INKVConnInternal, its a CacheVC of
- // some sort.
-
- if (INKVConnClosedGet(cache_vconn->write_vconnp) != 1) {
- SDK_RPRINT(SDK_Cache_test, "INKVConnClose", "TestCase1", TC_PASS, "failed to close vc");
- SDK_RPRINT(SDK_Cache_test, "INKVConnClosedGet", "TestCase1", TC_PASS, "failed to close vc");
-
- *SDK_Cache_pstatus = REGRESSION_TEST_FAILED;
- return 1;
- } else {
- SDK_RPRINT(SDK_Cache_test, "INKVConnClose", "TestCase1", TC_PASS, "ok");
- SDK_RPRINT(SDK_Cache_test, "INKVConnClosedGet", "TestCase1", TC_PASS, "ok");
- }
-#endif
// start to read data out of cache
read_counter++;
@@ -672,19 +618,6 @@ cache_handler(INKCont contp, INKEvent ev
*SDK_Cache_pstatus = REGRESSION_TEST_FAILED;
return 1;
}
-#if 0 // FIXME? -- we need to decide when/if to change cache vconnection behavior
- // for the cache APIs we cannot get read/write VIOs currently because the
- // VConnection that we have is not to a INKVConnInternal, its a CacheVC of
- // some sort.
-
- if (INKVConnReadVIOGet(cache_vconn->read_vconnp) != cache_vconn->read_vio) {
- SDK_RPRINT(SDK_Cache_test, "INKVConnReadVIOGet", "TestCase1", TC_FAIL, "read vconn corruputed");
- // no need to continue, return
- *SDK_Cache_pstatus = REGRESSION_TEST_FAILED;
- return 1;
- } else
- SDK_RPRINT(SDK_Cache_test, "INKVConnReadVIOGet", "TestCase1", TC_PASS, "ok");
-#endif
nbytes = INKVIONBytesGet(cache_vconn->read_vio);
ntodo = INKVIONTodoGet(cache_vconn->read_vio);
@@ -1318,31 +1251,6 @@ REGRESSION_TEST(SDK_API_INKActionCancel)
to use reentrant call. But in both cases it's not
guaranteed to get ActionDone.
*/
-#if 0
-static RegressionTest *SDK_ActionDone_test;
-static int *SDK_ActionDone_pstatus;
-
-static INKAction actionp;
-
-int
-action_done_handler(INKCont contp, INKEvent event, void *edata)
-{
- INKContDestroy(contp);
- return 0;
-}
-
-REGRESSION_TEST(SDK_API_INKActionDone) (RegressionTest * test, int atype, int *pstatus) {
- bool test_passed = false;
- *pstatus = REGRESSION_TEST_INPROGRESS;
-
- // For asynchronous APIs, use static vars to store test and pstatus
- SDK_ActionDone_test = test;
- SDK_ActionDone_pstatus = pstatus;
-
- INKCont contp = INKContCreate(action_done_handler, INKMutexCreate());
- actionp = INKContSchedule(contp, 0);
-}
-#endif
/* Continuations */
@@ -1895,50 +1803,6 @@ REGRESSION_TEST(SDK_API_INKIOBufferBlock
}
-#if 0
-//////////////////////////////////////////////////
-// SDK_API_INKIOBuffer
-//
-// Unit Test for API: INKIOBufferBlockDataSizeGet
-//////////////////////////////////////////////////
-
-REGRESSION_TEST(SDK_API_INKIOBufferBlockDataSizeGet) (RegressionTest * test, int atype, int *pstatus) {
- bool test_passed_1 = false;
- bool test_passed_2 = false;
- *pstatus = REGRESSION_TEST_INPROGRESS;
-
- int i = 10000;
- INKIOBuffer bufp = INKIOBufferCreate();
- INKIOBufferData datap = INKIOBufferDataCreate(&i, sizeof(int), INK_DATA_CONSTANT);
- INKIOBufferBlock blockp = INKIOBufferBlockCreate(datap, sizeof(int), 0);
- INKIOBufferAppend(bufp, blockp);
-
- // In this case, the data (BUFFER_FOR_CONSTANT is just the size of the data type (int).
- if (INKIOBufferBlockDataSizeGet(blockp) == sizeof(int)) {
- SDK_RPRINT(test, "INKIOBufferBlockDataSizeGet", "TestCase1", TC_PASS, "ok");
- test_passed_1 = true;
- } else {
- SDK_RPRINT(test, "INKIOBufferBlockDataSizeGet", "TestCase1", TC_FAIL, "size is not for BUFFER_FOR_CONSTANT");
- }
-
- INKIOBufferBlock start_blockp = INKIOBufferStart(bufp);
- if (IOBufferBlockDataSizeGet(start_blockp) == 4096) {
- SDK_RPRINT(test, "INKIOBufferBlockDataSizeGet", "TestCase1", TC_PASS, "ok");
- test_passed_1 = true;
- } else {
- SDK_RPRINT(test, "INKIOBufferBlockDataSizeGet", "TestCase1", TC_FAIL, "size is not for the normal 4K block");
- }
-
- if (test_passed_1 && test_passed_2) {
- *pstatus = REGRESSION_TEST_PASSED;
- } else {
- *pstatus = REGRESSION_TEST_FAILED;
- }
-
- return;
-
-}
-#endif
/* Stats */
@@ -5951,38 +5815,9 @@ REGRESSION_TEST(SDK_API_INKMimeHdrParse)
SDK_RPRINT(test, "INKMimeHdrCopy", "TestCase1", TC_FAIL, "Unable to run test as parsing failed.");
}
-#if 0
- //INKMimeHdrClone
- if (test_passed_parse == true) {
- bufp3 = INKMBufferCreate();
- if (bufp3 == INK_ERROR_PTR) {
- SDK_RPRINT(test, "INKMimeHdrClone", "TestCase1", TC_FAIL, "Cannot create buffer for cloning.");
- } else {
- mime_hdr_loc3 = INKMimeHdrClone(bufp3, bufp1, mime_hdr_loc1);
- if (mime_hdr_loc3 == INK_ERROR_PTR) {
- SDK_RPRINT(test, "INKMimeHdrClone", "TestCase1", TC_FAIL, "Cannot create Mime hdr for cloning");
- if (INKMBufferDestroy(bufp3) == INK_ERROR) {
- SDK_RPRINT(test, "INKMimeHdrCopy", "TestCase1", TC_FAIL, "Error in Destroying MBuffer");
- }
- } else {
- temp = convert_mime_hdr_to_string(bufp3, mime_hdr_loc3); // Implements INKMimeHdrPrint.
- if (strcmp(parse_string, temp) == 0) {
- SDK_RPRINT(test, "INKMimeHdrClone", "TestCase1", TC_PASS, "ok");
- test_passed_mime_hdr_clone = true;
- } else {
- SDK_RPRINT(test, "INKMimeHdrClone", "TestCase1", TC_FAIL, "Value's Mismatch");
- }
- INKfree(temp);
- }
- }
- } else {
- SDK_RPRINT(test, "INKMimeHdrClone", "TestCase1", TC_FAIL, "Unable to run test as parsing failed.");
- }
-#else
bufp3 = INKMBufferCreate();
mime_hdr_loc3 = INKMimeHdrCreate(bufp3);
test_passed_mime_hdr_clone = true;
-#endif
// INKMimeHdrFieldRemove
if (test_passed_mime_hdr_copy == true) {
Modified: trafficserver/traffic/trunk/proxy/Prefetch.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Prefetch.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Prefetch.cc (original)
+++ trafficserver/traffic/trunk/proxy/Prefetch.cc Thu May 6 23:40:41 2010
@@ -563,15 +563,6 @@ PrefetchTransform::hash_add(char *s)
if (normalize_url(s, &str_len) > 0)
Debug("PrefetchParserURLs", "Normalized URL: %s\n", s);
-#if 0
- int i = 0, len = 1;
- while (len <= str_len) {
- i = (i << 8) | s[str_len - len];
- if (len % sizeof(index) == 0)
- index ^= i;
- }
- index %= HASH_TABLE_LENGTH;
-#endif
INK_MD5 md5;
md5.encodeBuffer(s, str_len);
Modified: trafficserver/traffic/trunk/proxy/SimpleHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/SimpleHttp.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/SimpleHttp.cc (original)
+++ trafficserver/traffic/trunk/proxy/SimpleHttp.cc Thu May 6 23:40:41 2010
@@ -33,15 +33,9 @@
#if COMPILE_SIMPLE_HTTP
-#if 0
-#define HISTORY_SIZE 128
-#define HISTORY_DECL int history_idx; int history[HISTORY_SIZE];
-#define HISTORY_MARK() history[history_idx++ % HISTORY_SIZE] = __LINE__
-#else
#define HISTORY_SIZE 0
#define HISTORY_DECL
#define HISTORY_MARK()
-#endif
static int enabled = 0;
Modified: trafficserver/traffic/trunk/proxy/Socks.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Socks.h?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Socks.h (original)
+++ trafficserver/traffic/trunk/proxy/Socks.h Thu May 6 23:40:41 2010
@@ -193,29 +193,5 @@ typedef int (SocksEntry::*SocksEntryHand
extern ClassAllocator<SocksEntry> socksAllocator;
-#if 0
-struct ChangeSocksConfig:Continuation
-{
- int change_config_handler(int etype, void *data)
- {
- socks_conf_struct *new_socks_conf_stuff, *old_socks_conf_stuff;
- (void) data;
- ink_assert(etype == EVENT_IMMEDIATE);
- new_socks_conf_stuff = NEW(new socks_conf_struct);
- loadSocksConfiguration(new_socks_conf_stuff);
- old_socks_conf_stuff = netProcessor.socks_conf_stuff;
- netProcessor.socks_conf_stuff = new_socks_conf_stuff;
- if (file_changed)
- pmgmt->signalManager(MGMT_SIGNAL_CONFIG_FILE_READ, "Socks Config File");
- delete this;
- return EVENT_DONE;
- }
- int file_changed;
-ChangeSocksConfig():Continuation(new_ProxyMutex()) {
- SET_HANDLER(&ChangeSocksConfig::change_config_handler);
- file_changed = 0;
- }
-};
-#endif
#endif //_SOCKS_H_
Modified: trafficserver/traffic/trunk/proxy/StateEventLogger.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StateEventLogger.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StateEventLogger.cc (original)
+++ trafficserver/traffic/trunk/proxy/StateEventLogger.cc Thu May 6 23:40:41 2010
@@ -252,14 +252,6 @@ test_thread(void *i)
start = ink_get_hrtime();
for (j = 0; j < calls; j++) {
(*sel) (TestStateEvent(pi, j));
-#if 0
- if (lrand48() % 1000 < 900) { // sleep 90% of time
- struct timespec x;
- x.tv_sec = 0;
- x.tv_nsec = lrand48() % 1000;
- nanosleep(&x, NULL); // random wait
- }
-#endif
}
#ifdef __alpha
#define LL_FMT "%ld"
Modified: trafficserver/traffic/trunk/proxy/TestPreProc.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/TestPreProc.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/TestPreProc.cc (original)
+++ trafficserver/traffic/trunk/proxy/TestPreProc.cc Thu May 6 23:40:41 2010
@@ -184,15 +184,6 @@ main()
cout << "Elapsed time for " << lc << "loops is " << elapsedTime << endl;
}
-#if 0
- cout << m->getMajorVersion() << endl;
- cout << m->getMinorVersion() << endl;
- cout << m->getMethod() << endl;
- cout << m->getScheme() << endl;
- cout << m->getHeaderFieldValue("Accept") << endl;
- cout << m->getHeaderFieldValue("Accept-Charset") << endl;
- cout << m->getRequestURI() << endl;
-#endif
return (0);
Modified: trafficserver/traffic/trunk/proxy/TestProxy.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/TestProxy.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/TestProxy.cc (original)
+++ trafficserver/traffic/trunk/proxy/TestProxy.cc Thu May 6 23:40:41 2010
@@ -161,27 +161,6 @@ struct TestProxy:Continuation
*portStr = ':';
}
url_end = strchr(url + 1, ' ');
-#if 0
- {
- INK_MD5 md5;
- ink_code_md5((unsigned char *) host, url - host, (unsigned char *) &md5);
- ClusterConfiguration *cc = this_cluster()->current_configuration();
- if (cc->n_machines > 1) {
- inku64 ll = fold_md5(md5);
- ll = ll ^ (ll >> 32);
- unsigned int l = ll;
- Machine *m = cc->machine_hash(l);
- if (m != this_cluster_machine()) {
- // printf("sending remote to %X\n", m->ip);
- *url = '/';
- SET_HANDLER(clusterOpenEvent);
- clusterProcessor.open(this, m, token);
- clusterProcessor.invoke_remote(m, TEST_CLUSTER_FUNCTION, &token, sizeof(token));
- return EVENT_DONE;
- }
- }
- }
-#endif
SET_HANDLER(dnsEvent);
*url = '/';
hostDBProcessor.getbyname(this, host);
Modified: trafficserver/traffic/trunk/proxy/TestRegex.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/TestRegex.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/TestRegex.cc (original)
+++ trafficserver/traffic/trunk/proxy/TestRegex.cc Thu May 6 23:40:41 2010
@@ -28,35 +28,4 @@
void
test()
{
-#if 0
- char **s;
- MultiRegex regex_table;
- char *strings[] = {
- "booble",
- "ofrobbery",
- "ofrobblescum",
- NULL
- };
-
- fprintf(stderr, "\n*** Dumping MultiRegex With No Contents ***\n\n");
- regex_table.dump();
-
- fprintf(stderr, "\n*** Adding Three Patterns ***\n\n");
- regex_table.addPattern("^frobble$", 1.0);
- regex_table.addPattern("^.*frob.*$", 0.0);
- regex_table.addPattern("frobbles", 2.0);
- regex_table.dump();
-
- for (s = strings; *s != NULL; s++) {
- bool is_match;
- MultiRegexCell *cell;
-
- is_match = regex_table.match(*s, &cell);
-
- if (is_match)
- fprintf(stderr, "match(%s) = <priority %f, pattern '%s'>\n", *s, cell->getPriority(), cell->getPattern());
- else
- fprintf(stderr, "match(%s) = <NO MATCH>\n", *s);
- }
-#endif
}
Modified: trafficserver/traffic/trunk/proxy/Update.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Update.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Update.cc (original)
+++ trafficserver/traffic/trunk/proxy/Update.cc Thu May 6 23:40:41 2010
@@ -1596,35 +1596,6 @@ UpdateSM::http_scheme_postproc(UpdateSM
}
// Not used anywhere.
-#if 0
-static int
-rtsp_progress_cont(INKCont contp, INKEvent event, void *data)
-{
- struct MCOPreloadReport *pr = (struct MCOPreloadReport *) data;
- UpdateSM *sm = (UpdateSM *) pr->context;
-
- ink_assert(event == MIXT_API_EVENT_MCO_PRELOAD_REPORT);
- switch (pr->result) {
- case RESULT_DONE:
- {
- sm->handleEvent(VC_EVENT_READ_COMPLETE, 0);
- INKContDestroy(contp);
- break;
- }
- case RESULT_IN_PROGRESS:
- {
- break;
- }
- default:
- {
- sm->handleEvent(VC_EVENT_ERROR, 0);
- INKContDestroy(contp);
- break;
- }
- }
- return 0;
-}
-#endif
int
UpdateSM::rtsp_scheme(UpdateSM * sm)
Modified: trafficserver/traffic/trunk/proxy/api/include/ts_private_frozen.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/api/include/ts_private_frozen.h?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/api/include/ts_private_frozen.h (original)
+++ trafficserver/traffic/trunk/proxy/api/include/ts_private_frozen.h Thu May 6 23:40:41 2010
@@ -321,33 +321,21 @@ extern "C"
* ??
* Return
****************************************************************************/
-#if 0 // Not used.
- inkapi INKIPLookup INKIPLookupCreate();
-#endif
/****************************************************************************
* ??
* Return
****************************************************************************/
-#if 0 // Not used.
- inkapi void INKIPLookupDestroy(INKIPLookup iplu);
-#endif
/****************************************************************************
* ??
* Return
****************************************************************************/
-#if 0 // Not used.
- inkapi INKIPLookupState INKIPLookupStateCreate();
-#endif
/****************************************************************************
* ??
* Return
****************************************************************************/
-#if 0 // Not used.
- inkapi void INKIPLookupStateDestroy(INKIPLookupState iplus);
-#endif
inkapi void INKIPLookupNewEntry(INKIPLookup iplu, INKU32 addr1, INKU32 addr2, void *data);
inkapi int INKIPLookupMatchFirst(INKIPLookup iplu, INKU32 addr, INKIPLookupState iplus, void **data);
@@ -600,10 +588,6 @@ extern "C"
*
* ---------------------------------------------------------------------- */
#define INK_EVENT_MIXT_READ_REQUEST_HDR INK_EVENT_INTERNAL_60201
-#if 0
-#define INK_EVENT_MIXT_CONTINUE INK_EVENT_INTERNAL_60200
-#define INK_EVENT_MIXT_ERROR INK_EVENT_INTERNAL_60202
-#endif
/* ----------------------------------------------------------------------
* Prefetch APIs
* ---------------------------------------------------------------------- */
Modified: trafficserver/traffic/trunk/proxy/cust_log_fmt_cnvrt.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/cust_log_fmt_cnvrt.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/cust_log_fmt_cnvrt.cc (original)
+++ trafficserver/traffic/trunk/proxy/cust_log_fmt_cnvrt.cc Thu May 6 23:40:41 2010
@@ -340,39 +340,6 @@ check_output_file(char *output_file)
return error;
}
-#if 0
-int
-open_output_file(char *output_file)
-{
- int fd = -1;
- int error = 0;
-
- if (!overwrite_existing_file) {
- if (access(output_file, F_OK)) {
- if (errno != ENOENT) {
- cerr << "Error accessing output file " << output_file << ": ";
- perror(0);
- error = 1;
- }
- } else {
- cerr << "Error, output file " << output_file << " already exists."
- "\nSelect a different filename or use the -w flag\n";
- error = 1;
- }
- }
-
- if (!error) {
- fd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
-
- if (fd < 0) {
- cerr << "Error opening output file " << output_file << ": ";
- perror(0);
- }
- }
-
- return fd;
-}
-#endif
int
process_file(const char *in_filename, istream & is, ostream & os)
Modified: trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc (original)
+++ trafficserver/traffic/trunk/proxy/dns_cache/DNS_cache.cc Thu May 6 23:40:41 2010
@@ -314,10 +314,6 @@ DNS_Cache::process_hostdb_info(HostDBInf
char tmp_cname[MAXDNAME];
memset(tmp_cname, 0, MAXDNAME);
-#if 0
- strcpy(tmp_cname, rr->cname((char *) rr));
- if (*tmp_cname) {
-#endif
// for now, in case canonical name is not given, use
// dname to fill in names for round-robin servers.
strncpy(tmp_cname, dname, sizeof(tmp_cname));
@@ -335,10 +331,6 @@ DNS_Cache::process_hostdb_info(HostDBInf
cp += n;
answers++;
-#if 0
- } else {
- }
-#endif
// increment the round-robin count
rr->increment_round_robin();
int current = rr->current % rr->good;
Modified: trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc Thu May 6 23:40:41 2010
@@ -248,20 +248,6 @@ http_init(const char *path)
HTTP_WKSIDX_PUSH = hdrtoken_wks_to_index(HTTP_METHOD_PUSH);
HTTP_WKSIDX_METHODS_CNT++;
-#if 0
- printf("\tHTTP_WKSIDX_CONNECT = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_CONNECT);
- printf("\tHTTP_WKSIDX_DELETE = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_DELETE);
- printf("\tHTTP_WKSIDX_GET = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_GET);
- printf("\tHTTP_WKSIDX_HEAD = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_HEAD);
- printf("\tHTTP_WKSIDX_ICP_QUERY = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_ICP_QUERY);
- printf("\tHTTP_WKSIDX_OPTIONS = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_OPTIONS);
- printf("\tHTTP_WKSIDX_POST = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_POST);
- printf("\tHTTP_WKSIDX_PURGE = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_PURGE);
- printf("\tHTTP_WKSIDX_PUT = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_PUT);
- printf("\tHTTP_WKSIDX_TRACE = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_TRACE);
- printf("\tHTTP_WKSIDX_PUSH = 0x%0lX\n", (unsigned long) HTTP_WKSIDX_PUSH);
- printf("\tTotal HTTP_WKSIDX_METHODS_CNT = %d\n", HTTP_WKSIDX_METHODS_CNT);
-#endif
HTTP_LEN_CONNECT = hdrtoken_wks_to_length(HTTP_METHOD_CONNECT);
HTTP_LEN_DELETE = hdrtoken_wks_to_length(HTTP_METHOD_DELETE);
@@ -1453,284 +1439,6 @@ http_parse_qvalue(const char *&buf, int
/*-------------------------------------------------------------------------
-------------------------------------------------------------------------*/
-#if 0
-HTTPValAccept *
-http_parse_accept(const char *buf, Arena * arena)
-{
- HTTPValAccept *val;
- const char *s;
-
- http_skip_ws(buf);
-
- s = buf;
-
- while (*buf && (*buf != '/')) {
- buf += 1;
- }
-
- if (*buf != '/') {
- return NULL;
- }
-
- val = (HTTPValAccept *) arena->alloc(sizeof(HTTPValAccept));
- val->type = http_str_store(arena, s, buf - s);
-
- s = buf + 1;
-
- while (*buf && (*buf != ';')) {
- buf += 1;
- }
-
- val->subtype = http_str_store(arena, s, buf - s);
- val->qvalue = http_parse_qvalue(buf);
-
- return val;
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-HTTPValAcceptCharset *
-http_parse_accept_charset(const char *buf, Arena * arena)
-{
- HTTPValAcceptCharset *val;
- const char *s;
-
- http_skip_ws(buf);
-
- s = buf;
-
- while (*buf && (*buf != ';')) {
- buf += 1;
- }
-
- val = (HTTPValAcceptCharset *) arena->alloc(sizeof(HTTPValAcceptCharset));
- val->charset = http_str_store(arena, s, buf - s);
- val->qvalue = http_parse_qvalue(buf);
-
- return val;
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-HTTPValAcceptEncoding *
-http_parse_accept_encoding(const char *buf, Arena * arena)
-{
- HTTPValAcceptEncoding *val;
- const char *s;
-
- http_skip_ws(buf);
-
- s = buf;
-
- while (*buf && (*buf != ';')) {
- buf += 1;
- }
-
- val = (HTTPValAcceptEncoding *) arena->alloc(sizeof(HTTPValAcceptEncoding));
- val->encoding = http_str_store(arena, s, buf - s);
- val->qvalue = http_parse_qvalue(buf);
-
- return val;
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-HTTPValAcceptLanguage *
-http_parse_accept_language(const char *buf, Arena * arena)
-{
- HTTPValAcceptLanguage *val;
- const char *s;
-
- http_skip_ws(buf);
-
- s = buf;
-
- while (*buf && (*buf != ';')) {
- buf += 1;
- }
-
- val = (HTTPValAcceptLanguage *) arena->alloc(sizeof(HTTPValAcceptLanguage));
- val->language = http_str_store(arena, s, buf - s);
- val->qvalue = http_parse_qvalue(buf);
-
- return val;
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-const char *
-http_parse_cache_directive(const char **buf)
-{
- int idx;
- const char *end;
-
- http_skip_ws(*buf);
-
- end = *buf;
- while (*end && (*end != '=')) {
- end += 1;
- }
-
- idx = cache_control_names_dfa->match(*buf, end - *buf);
- if (idx < 0) {
- return NULL;
- } else {
- *buf = end;
- return cache_control_values[idx];
- }
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-static int
-http_parse_integer(const char *&buf)
-{
- int val;
- bool negative;
-
- negative = false;
-
- while (*buf && !ParseRules::is_digit(*buf) && (*buf != '-')) {
- buf += 1;
- }
-
- if (*buf == '\0') {
- return 0;
- }
-
- if (*buf == '-') {
- negative = true;
- buf += 1;
- }
-
- val = 0;
- while (*buf && ParseRules::is_digit(*buf)) {
- val = (val * 10) + (*buf++ - '0');
- }
-
- if (negative) {
- return -val;
- } else {
- return val;
- }
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-HTTPValCacheControl *
-http_parse_cache_control(const char *buf, Arena * arena)
-{
- const char *directive;
- HTTPValCacheControl *val;
-
- directive = http_parse_cache_directive(&buf);
-
- if (!directive) {
- val = (HTTPValCacheControl *) arena->alloc(sizeof(HTTPValCacheControl));
- val->directive = directive;
- val->u.field_names = NULL;
- return val;
- } else if ((directive == HTTP_VALUE_MAX_AGE) ||
- (directive == HTTP_VALUE_MAX_STALE) ||
- (directive == HTTP_VALUE_MIN_FRESH) || (directive == HTTP_VALUE_S_MAXAGE)) {
- val = (HTTPValCacheControl *) arena->alloc(sizeof(HTTPValCacheControl));
- val->directive = directive;
- val->u.delta_seconds = 0;
-
- if (*buf == '=') {
- buf += 1;
- val->u.delta_seconds = http_parse_integer(buf);
- }
-
- return val;
- } else if ((directive == HTTP_VALUE_NO_CACHE) || (directive == HTTP_VALUE_PRIVATE)) {
- HTTPValFieldList *list;
- HTTPValFieldList *prev;
- const char *s, *e;
-
- val = (HTTPValCacheControl *) arena->alloc(sizeof(HTTPValCacheControl));
- val->directive = directive;
- val->u.field_names = NULL;
-
- while (*buf && (*buf != '"')) {
- buf += 1;
- }
- buf += 1;
-
- list = NULL;
- prev = NULL;
-
- while (*buf && (*buf != '"')) {
- s = buf;
- while (*s && ParseRules::is_ws(*s)) {
- s += 1;
- }
- e = s;
- while (*e && !ParseRules::is_ws(*e)) {
- e += 1;
- }
-
- list = (HTTPValFieldList *) arena->alloc(sizeof(HTTPValFieldList));
- list->name = http_str_store(arena, s, e - s);
- list->next = NULL;
-
- if (prev) {
- prev->next = list;
- } else {
- val->u.field_names = list;
- }
- prev = list;
-
- buf = e;
- if (*buf == ',') {
- buf += 1;
- }
- }
-
- return val;
- } else if ((directive == HTTP_VALUE_NO_STORE) ||
- (directive == HTTP_VALUE_NO_TRANSFORM) ||
- (directive == HTTP_VALUE_MUST_REVALIDATE) ||
- (directive == HTTP_VALUE_ONLY_IF_CACHED) ||
- (directive == HTTP_VALUE_PROXY_REVALIDATE) ||
- (directive == HTTP_VALUE_PUBLIC) || (directive == HTTP_VALUE_NEED_REVALIDATE_ONCE)) {
- val = (HTTPValCacheControl *) arena->alloc(sizeof(HTTPValCacheControl));
- val->directive = directive;
- val->u.field_names = NULL;
- return val;
- }
-
- return NULL;
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-/*-------------------------------------------------------------------------
- ranges-specifier = byte-ranges-specifier
- byte-ranges-specifier = bytes-unit "=" byte-range-set
- byte-range-set = 1#( byte-range-spec | suffix-byte-range-spec )
- byte-range-spec = first-byte-pos "-" [last-byte-pos]
- first-byte-pos = 1*DIGIT
- last-byte-pos = 1*DIGIT
- -------------------------------------------------------------------------*/
-
-HTTPValRange *
-http_parse_range(const char *buf, Arena * arena)
-{
- return NULL;
-}
-
-/*-------------------------------------------------------------------------
- -------------------------------------------------------------------------*/
-
-#endif
/*-------------------------------------------------------------------------
TE = "TE" ":" #( t-codings )
Modified: trafficserver/traffic/trunk/proxy/hdrs/URL.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/URL.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/URL.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/URL.cc Thu May 6 23:40:41 2010
@@ -1546,23 +1546,6 @@ int
url_print(URLImpl * url, char *buf_start, int buf_length, int *buf_index_inout, int *buf_chars_to_skip_inout)
{
#define TRY(x) if (!x) return 0
-#if 0 //added by YTS Team, yamsat bug fix
-
- // fast path for simple path-only request and enough buffer space
-
- if ((buf_start != NULL) &&
- ((url->m_len_scheme + url->m_len_user + url->m_len_host
- + url->m_len_params + url->m_len_query + url->m_len_fragment
- + *buf_chars_to_skip_inout) == 0) &&
- (1 + url->m_len_path < buf_length - *buf_index_inout)) {
-
- char *p = buf_start + *buf_index_inout;
- *p++ = '/';
- memcpy(p, url->m_ptr_path, url->m_len_path);
- *buf_index_inout += 1 + url->m_len_path;
- return 1;
- }
-#endif
if (url->m_ptr_scheme) {
TRY(mime_mem_print(url->m_ptr_scheme, url->m_len_scheme,
Modified: trafficserver/traffic/trunk/proxy/hdrs/test_header.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/test_header.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/test_header.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/test_header.cc Thu May 6 23:40:41 2010
@@ -782,12 +782,10 @@ test_http()
test_http_aux(request_09p, response0);
test_http_aux(request_09ht, response0);
test_http_aux(request_11, response0);
-#if 1
test_http_aux(request_unterminated, response_unterminated);
test_http_aux(request_blank, response_blank);
test_http_aux(request_blank2, response_blank2);
test_http_aux(request_blank3, response_blank3);
-#endif
}
static void
Modified: trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc Thu May 6 23:40:41 2010
@@ -80,26 +80,6 @@ public:
* string 's', in a comma seperated manner, if 'a' is not already
* in 's'.
*/
-#if 0
-char *
-add_comma_sep_string(char *s, char *a)
-{
- if ((s == NULL) || (strstr(s, a) == NULL)) {
- int len = (s == NULL) ? 0 : strlen(s);
- char *t = (char *) xmalloc(len + strlen(a) + 3);
- if (s != NULL) {
- strcpy(t, s);
- strcat(t + len, ", ");
- strcat(t + len, a);
- xfree(s);
- } else {
- strcpy(t, a);
- }
- s = t;
- }
- return s;
-}
-#endif
////////////////////////////////////////////////////////////////
//
Modified: trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Thu May 6 23:40:41 2010
@@ -4369,7 +4369,6 @@ HttpSM::do_http_server_open(bool raw)
return;
}
}
-#if 1
// We did not manage to get an exisiting session
// and need to open a new connection
@@ -4460,23 +4459,6 @@ HttpSM::do_http_server_open(bool raw)
pending_action = connect_action_handle;
historical_action = pending_action;
}
-#else
- NetVConnection *vc = NULL;
- Action *connect_action_handle = netProcessor.connect(this,
- &vc,
- t_state.current.server->ip, // host_op
- t_state.current.server->port, // host_port
- t_state.http_config_param->outgoing_ip_to_bind_saddr,
- &opt);
-
- if (connect_action_handle != ACTION_RESULT_DONE) {
- ink_assert(!pending_action);
- pending_action = connect_action_handle;
- historical_action = pending_action;
- } else {
- state_http_server_open(NET_EVENT_OPEN, vc);
- }
-#endif
return;
}
Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Thu May 6 23:40:41 2010
@@ -1919,15 +1919,6 @@ HttpTransact::HandleFiltering(State * s)
// from build_request.
//
// strip out the headers content control says we need to remove
-#if 0
- HeaderFilter *aclHdrs = s->content_control.hdrs;
- while (aclHdrs != NULL) {
- if (aclHdrs->hdr_action == ACCESS_HDR_STRIP) {
- s->hdr_info.client_request.field_delete(aclHdrs->header_name, strlen(aclHdrs->header_name));
- }
- aclHdrs = aclHdrs->next;
- }
-#endif
// request is not black listed so now decided if we ought to
// lookup the cache
@@ -6482,18 +6473,6 @@ HttpTransact::is_request_cache_lookupabl
return false;
}
}
-#if 0 // ckwong (already fixed and no need this) see build_request()
- // if the request has authorization don't look up the cache
- // Putting this request through the cachable path will cause
- // conditional headers to be unecessarily stripped (INKqa04463)
- // We don't cache responses that were obtained with authorization
- // headers anyway. Even if they come with Cache-Control: public
- // see is_response_cacheable()
- if (s->hdr_info.client_request.presence(MIME_PRESENCE_AUTHORIZATION) && s->http_config_param->cache_ignore_auth == 0) {
- SET_VIA_STRING(VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_AUTHORIZATION);
- return false;
- }
-#endif
// Don't cache if it's a RANGE request but the cache is not enabled for RANGE.
if (!s->http_config_param->cache_range_lookup && s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE)) {
Modified: trafficserver/traffic/trunk/proxy/http2/remap/UrlRewrite.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/remap/UrlRewrite.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/remap/UrlRewrite.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/remap/UrlRewrite.cc Thu May 6 23:40:41 2010
@@ -2052,16 +2052,6 @@ UrlRewrite::BuildTable()
}
xfree(toHost_null_ended);
}
-#if 0
- char *dFrom = new_mapping->fromURL.string_get(NULL);
- char *dTo = new_mapping->toURL.string_get(NULL);
-
- Debug("url_rewrite", "[BuildTable] Added From URL \"%s\"", dFrom);
- Debug("url_rewrite", "[BuildTable] Added To URL \"%s\"", dTo);
-
- xfree(dFrom);
- xfree(dTo);
-#endif
// Check "remap" plugin options and load .so object
if ((bti.remap_optflg & REMAP_OPTFLG_PLUGIN) != 0 && (maptype == FORWARD_MAP || maptype == FORWARD_MAP_REFERER)) {
Modified: trafficserver/traffic/trunk/proxy/http2/test_socket_close.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/test_socket_close.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/test_socket_close.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/test_socket_close.cc Thu May 6 23:40:41 2010
@@ -484,14 +484,6 @@ set_nonblocking_socket(int s)
cout << "fcntl F_SETFD O_NDELAY failed (" << error << ")" << endl;
return (error);
}
-#if 0
- if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(int)) < 0) {
- error = -errno;
- ::close(s);
- cout << "setsockopt failed (" << error << ")" << endl;
- return (error);
- }
-#endif
return (s);
}
Modified: trafficserver/traffic/trunk/proxy/logging/Log.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/Log.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/Log.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/Log.cc Thu May 6 23:40:41 2010
@@ -206,26 +206,6 @@ Log::add_to_inactive(LogObject * object)
just in case it's sleeping on the job.
-------------------------------------------------------------------------*/
-#if 0
-struct PeriodicWakeup;
-typedef int (PeriodicWakeup::*PeriodicWakeupHandler) (int, void *);
-struct PeriodicWakeup:Continuation
-{
-
- int wakeup(int event, Event * e)
- {
- NOWARN_UNUSED(event);
- NOWARN_UNUSED(e);
- ink_cond_signal(&Log::flush_cond);
- return EVENT_CONT;
- }
-
- PeriodicWakeup():Continuation(new_ProxyMutex())
- {
- SET_HANDLER((PeriodicWakeupHandler) & PeriodicWakeup::wakeup);
- }
-};
-#endif
/*-------------------------------------------------------------------------
Log::periodic_tasks
Modified: trafficserver/traffic/trunk/proxy/logging/LogConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogConfig.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogConfig.cc Thu May 6 23:40:41 2010
@@ -1836,20 +1836,6 @@ LogConfig::update_space_used()
// issue any alarms or warnings about space
//
-#if 0
- // CVR See if we need to roll the files based on the configured rolling
- // log dir size - 11445
- if ((m_space_used >= ((ink64) max_space_mb_for_rolling * LOG_MEGABYTE)) && rolling_based_on_directory_size_enabled) {
-
- long now;
- now = LogUtils::timestamp();
- log_object_manager.roll_files_size_exceed(now);
- rolling_based_on_directory_size_enabled = false;
-
- LogUtils::manager_alarm(LogUtils::LOG_ALARM_ERROR, ROLLING_LIMIT_EXCEEDED_MESSAGE);
- Warning(ROLLING_LIMIT_EXCEEDED_MESSAGE);
- }
-#endif // if 0
if (!space_to_write(headroom)) {
logging_space_exhausted = true;
Modified: trafficserver/traffic/trunk/proxy/logging/LogFile.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFile.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFile.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFile.cc Thu May 6 23:40:41 2010
@@ -882,69 +882,6 @@ LogFile::do_filesystem_checks()
/***************************************************************************
LogFileList IS NOT USED
****************************************************************************/
-#if 0
-
-/**************************************************************************
-
- LogFileList methods
-
- **************************************************************************/
-
-LogFileList::LogFileList()
-{
-}
-
-LogFileList::~LogFileList()
-{
- clear();
-}
-
-void
-LogFileList::add(LogFile * out, bool copy)
-{
- ink_assert(out != NULL);
- if (copy) {
- m_output_list.enqueue(NEW(new LogFile(*out)));
- } else {
- m_output_list.enqueue(out);
- }
-}
-
-unsigned
-LogFileList::count()
-{
- unsigned cnt = 0;
- for (LogFile * out = first(); out; out = next(out)) {
- cnt++;
- }
- return cnt;
-}
-
-void
-LogFileList::write(LogBuffer * lb, size_t * to_disk, size_t * to_net, size_t * to_file)
-{
- for (LogFile * out = first(); out; out = next(out)) {
- out->write(lb, to_disk, to_net, to_file);
- }
-}
-
-void
-LogFileList::clear()
-{
- LogFile *out;
- while ((out = m_output_list.dequeue())) {
- delete out;
- }
-}
-
-void
-LogFileList::display(FILE * fd)
-{
- for (LogFile * out = first(); out; out = next(out)) {
- out->display(fd);
- }
-}
-#endif
/****************************************************************************
Modified: trafficserver/traffic/trunk/proxy/logging/LogFile.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogFile.h?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogFile.h (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogFile.h Thu May 6 23:40:41 2010
@@ -248,45 +248,5 @@ private:
/***************************************************************************
LogFileList IS NOT USED
****************************************************************************/
-#if 0
-
-/*-------------------------------------------------------------------------
- LogFileList
- -------------------------------------------------------------------------*/
-
-class LogFileList
-{
-public:
- LogFileList();
- ~LogFileList();
-
- void add(LogFile * out, bool copy = true);
- void write(LogBuffer * lb, size_t * to_disk, size_t * to_net, size_t * to_pipe);
- void clear();
- unsigned count();
-
- LogFile *first()
- {
- return m_output_list.head;
- }
- LogFile *next(LogFile * here)
- {
- return (here->link).next;
- }
- LogFile *dequeue()
- {
- return m_output_list.dequeue();
- }
-
- void display(FILE * fd = stdout);
-
-private:
- Queue<LogFile> m_output_list;
-
- // -- member functions not allowed --
- LogFileList(const LogFileList &);
- LogFileList & operator=(const LogFileList &);
-};
-#endif
#endif
Modified: trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/LocalManager.cc Thu May 6 23:40:41 2010
@@ -474,14 +474,7 @@ LocalManager::initMgmtProcessServer()
struct sockaddr_un serv_addr;
snprintf(fpath, sizeof(fpath), "%s/%s", pserver_path, LM_CONNECTION_SERVER);
-#if 0 /* (HOST_OS == freebsd) */
- char ulpath[1024];
- strcpy(ulpath, fpath);
- ulpath[strlen(fpath) - 1] = 0;
- unlink(ulpath);
-#else
unlink(fpath);
-#endif
if ((process_server_sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
mgmt_fatal(stderr, "[LocalManager::initMgmtProcessServer] Unable to open socket exiting\n");
}
Modified: trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/Main.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/Main.cc Thu May 6 23:40:41 2010
@@ -1478,12 +1478,6 @@ runAsUser(char *userName)
result = NULL;
int res = getpwnam_r(&userName[0], &passwdInfo, buf, bufSize, &ppasswd);
-#if 0
-// non-POSIX
- struct passwd *ppasswd = NULL;
- result = NULL;
- int res = (int) getpwnam_r(&userName[0], ppasswd, buf, bufSize);
-#endif
if (!res && ppasswd) {
result = ppasswd;
}
Modified: trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/MgmtDBM.cc Thu May 6 23:40:41 2010
@@ -94,19 +94,8 @@ MgmtDBM::mgmt_batch_open()
time_t start = time(NULL);
-#if 0
- while ((status = WaitForSingleObject(mgmt_hsem, 0)) == WAIT_TIMEOUT) {
- time_t current = time(NULL);
- if ((current - start) > 60) {
- break;
- }
- mgmt_sleep_msec(20);
- }
-
-#else
/* Wait for 60 secs for the semaphore */
status = WaitForSingleObject(mgmt_hsem, 60 * 1000);
-#endif
if (status != WAIT_OBJECT_0) {
time_t current = time(NULL);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextImpl.h Thu May 6 23:40:41 2010
@@ -341,30 +341,6 @@ private:
INKLogObjectEle * m_ele;
};
-#if 0
-/* log_hosts.config *******************************************/
-class LogHostsObj:public CfgEleObj
-{
-public:
- LogHostsObj(INKLogHostsEle * ele);
- LogHostsObj(TokenList * tokens);
- ~LogHostsObj();
-
- virtual char *formatEleToRule();
- virtual bool isValid();
- virtual INKCfgEle *getCfgEle()
- {
- return (INKCfgEle *) m_ele;
- }
- virtual INKRuleTypeT getRuleType()
- {
- return m_ele->cfg_ele.type;
- }
-
-private:
- INKLogHostsEle * m_ele;
-};
-#endif
/* mgmt_allow.config *******************************************/
class MgmtAllowObj:public CfgEleObj
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CfgContextUtils.cc Thu May 6 23:40:41 2010
@@ -1525,10 +1525,6 @@ filename_to_string(INKFileNameT file)
case INK_FNAME_IP_ALLOW:
return xstrdup("ip_allow.config");
-#if 0
- case INK_FNAME_LOG_HOSTS:
- return xstrdup("log_hosts.config");
-#endif
case INK_FNAME_LOGS_XML:
return xstrdup("logs_xml.config");
@@ -2066,10 +2062,6 @@ create_ele_obj_from_rule_node(Rule * rul
case INK_IP_ALLOW: /* ip_allow.config */
ele = (CfgEleObj *) new IpAllowObj(token_list);
break;
-#if 0
- case INK_LOG_HOSTS: /* log_hosts.config */
- break;
-#endif
case INK_LOG_FILTER: /* logs_xml.config */
case INK_LOG_OBJECT:
@@ -2327,10 +2319,6 @@ get_rule_type(TokenList * token_list, IN
case INK_FNAME_IP_ALLOW: /* ip_allow.config */
return INK_IP_ALLOW;
-#if 0
- case INK_FNAME_LOG_HOSTS: /* log_hosts.config */
- return INK_LOG_HOSTS;
-#endif
case INK_FNAME_LOGS_XML: /* logs_xml.config */
printf(" *** CfgContextUtils.cc: NOT DONE YET! **\n");
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc Thu May 6 23:40:41 2010
@@ -218,10 +218,6 @@ Rule::parse(const char *const_rule, INKF
return icpParse(rule, 8, 8);
case INK_FNAME_IP_ALLOW: /* ip_allow.config */
return ip_allowParse(rule);
-#if 0
- case INK_FNAME_LOG_HOSTS: /* log_hosts.config */
- return log_hostsParse(rule);;
-#endif
case INK_FNAME_LOGS_XML: /* logs_xml.config */
return logs_xmlParse(rule);
case INK_FNAME_MGMT_ALLOW: /* mgmt_allow.config */
@@ -1101,10 +1097,6 @@ RuleList::parse(char *fileBuf, const cha
m_filetype = INK_FNAME_IP_ALLOW; /* ip_allow.config */
} else if (strstr(filename, "logs.config")) {
m_filetype = INK_FNAME_UNDEFINED; /* logs.config */
-#if 0
- } else if (strstr(filename, "log_hosts.config")) {
- m_filetype = INK_FNAME_LOG_HOSTS; /* log_hosts.config */
-#endif
} else if (strstr(filename, "logs_xml.config")) {
m_filetype = INK_FNAME_LOGS_XML; /* logs_xml.config */
} else if (strstr(filename, "mgmt_allow.config")) {
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc Thu May 6 23:40:41 2010
@@ -1199,12 +1199,6 @@ test_error_records()
ret = INKRecordSetInt("proy.config.cop.core_signal", new_port, &action);
print_err("INKRecordSetInt", ret);
-#if 0
- fprintf(stderr, "Test invalid record values\n");
- printf("[INKRecordSetInt] proxy.config.arm.enabled = 2\n");
- ret = INKRecordSetInt("proxy.config.arm.enabled", 2, &action);
- print_err("INKRecordsSetInt", ret);
-#endif
printf("[INKRecordSetString] proxy.config.ldap.proc.ldap.server.name = invalid name\n");
ret = INKRecordSetString("proxy.config.ldap.proc.ldap.server.name", "invalid name", &action);
@@ -1626,7 +1620,6 @@ test_read_url(bool valid)
if (header)
INKfree(header);
-#if 1 // try invalid url second time
err = INKReadFromUrlEx("http://sadfasdfi.com:80/", &header, &headerSize, &body, &bodySize, 50000);
if (err != INK_ERR_OKAY) {
print_err("INKReadFromUrlEx", err);
@@ -1640,7 +1633,6 @@ test_read_url(bool valid)
INKfree(header);
if (body)
INKfree(body);
-#endif
} else { // use valid urls
err = INKReadFromUrlEx("lakota.inktomi.com:80/", &header, &headerSize, &body, &bodySize, 50000);
@@ -1873,7 +1865,6 @@ test_cfg_context_move(char *args)
int count = INKCfgContextGetCount(ctx);
printf("%d rules in file: %s\n", count, name);
-#if 1
// shift all the ele's up so that the top ele is now the bottom ele
printf("\nShift all ele's up so that top ele is now bottom ele\n");
for (i = 1; i < count; i++) {
@@ -1883,9 +1874,7 @@ test_cfg_context_move(char *args)
goto END;
}
}
-#endif
-#if 1
// shift all the ele's down so that the next to bottom ele is now top ele
// move all ele's above the last ele down; bottom ele becomes top ele
printf("\nShift all Ele's above second to last ele down; bottom ele becomes top ele\n");
@@ -1896,7 +1885,6 @@ test_cfg_context_move(char *args)
goto END;
}
}
-#endif
// clean up; commit change
INKCfgContextCommit(ctx, NULL, NULL);
@@ -1930,7 +1918,6 @@ test_cfg_context_ops()
int count = INKCfgContextGetCount(ctx);
printf("# ele's = %d\n", count);
-#if 1
printf("\nShifted all Ele's < %d up\n", rm_index);
// move all ele's below rm_index up one; this shifts the rm_index ele to
// bottom of INKCfgContext
@@ -1942,9 +1929,7 @@ test_cfg_context_ops()
}
}
//print_VirtIpAddr_ele_list(ctx);
-#endif
-#if 1
printf("\nREMOVE LAST ELE (originally the first ele)\n");
// remove the last ele (which was originally the first ele)
err = INKCfgContextRemoveEleAt(ctx, (count - 1));
@@ -1952,18 +1937,14 @@ test_cfg_context_ops()
printf("ERROR: removing ele at index %d\n", count - 1);
goto END;
}
-#endif
-#if 1 // remove second to last ele
printf("\nRemoving second to last Ele \n");
err = INKCfgContextRemoveEleAt(ctx, (count - 2));
if (err != INK_ERR_OKAY) {
printf("ERROR: removing ele at index %d\n", count - 2);
goto END;
}
-#endif
-#if 1
// append a new ele
printf("\nappend new ele\n");
ele = INKVirtIpAddrEleCreate();
@@ -1985,10 +1966,8 @@ test_cfg_context_ops()
printf("Can't create VirtIpAddrEle\n");
}
//print_VirtIpAddr_ele_list(ctx);
-#endif
insert_at = 1;
-#if 1
// insert a new ele in insert_at index
printf("\nINSERT NEW ELE at %d index\n", insert_at);
ele = INKVirtIpAddrEleCreate();
@@ -2010,10 +1989,8 @@ test_cfg_context_ops()
printf("Can't create VirtIpAddrEle\n");
}
//print_VirtIpAddr_ele_list(ctx);
-#endif
-#if 1 // move the newly inserted ele to bottom of list
printf("\nMove ele at index %d to botoom of list\n", insert_at);
for (i = insert_at; i < INKCfgContextGetCount(ctx); i++) {
err = INKCfgContextMoveEleDown(ctx, i);
@@ -2023,9 +2000,7 @@ test_cfg_context_ops()
}
}
//print_VirtIpAddr_ele_list(ctx);
-#endif
-#if 1 // move all ele's above the last ele down; bottom ele becomes top ele
printf("\nShift all Ele's above last ele down; bottom ele becomes top ele\n");
count = INKCfgContextGetCount(ctx);
for (i = count - 2; i >= 0; i--) {
@@ -2036,7 +2011,6 @@ test_cfg_context_ops()
}
}
//print_VirtIpAddr_ele_list(ctx);
-#endif
// commit change
@@ -2069,7 +2043,6 @@ test_cfg_plugin()
if (INKCfgContextGet(ctx) != INK_ERR_OKAY)
printf("ERROR READING FILE\n");
-#if 1
// retrieve and modify ele
printf("test_cfg_plugin: modifying the first ele...\n");
cfg_ele = INKCfgContextGetEleAt(ctx, 0);
@@ -2078,15 +2051,11 @@ test_cfg_plugin()
//free(ele->name);
ele->name = xstrdup("change-plugin.so");
}
-#endif
-#if 1
// remove the second ele
printf("test_cfg_plugin: removing the second ele...\n");
INKCfgContextRemoveEleAt(ctx, 1);
-#endif
-#if 1
// create and add new ele
printf("test_socks_set: appending a new ele...\n");
ele = INKPluginEleCreate();
@@ -2097,7 +2066,6 @@ test_cfg_plugin()
INKStringListEnqueue(ele->args, xstrdup("arg1"));
INKStringListEnqueue(ele->args, xstrdup("arg2"));
INKCfgContextAppendEle(ctx, (INKCfgEle *) ele);
-#endif
// commit change
INKCfgContextCommit(ctx, NULL, NULL);
@@ -2125,7 +2093,6 @@ test_cfg_socks()
if (INKCfgContextGet(ctx) != INK_ERR_OKAY)
printf("ERROR READING FILE\n");
-#if 1
// retrieving an ele
printf("test_socks_set: modifying the fourth ele...\n");
cfg_ele = INKCfgContextGetEleAt(ctx, 3);
@@ -2134,15 +2101,11 @@ test_cfg_socks()
if (ele->rr != INK_RR_NONE)
ele->rr = INK_RR_FALSE;
}
-#endif
-#if 1
// remove the second ele
printf("test_socks_set: removing the second ele...\n");
INKCfgContextRemoveEleAt(ctx, 1);
-#endif
-#if 1
// create new structs for new rules
INKIpAddrEle *ip1 = INKIpAddrEleCreate();
ip1->type = INK_IP_SINGLE;
@@ -2177,7 +2140,6 @@ test_cfg_socks()
} else {
printf("Can't create SocksEle\n");
}
-#endif
// commit change
INKCfgContextCommit(ctx, NULL, NULL);
@@ -2591,12 +2553,10 @@ sync_test()
else
printf("[INKRecordSet] proxy.config.http.cache.fuzz.probability=-0.3333\n");
-#if 1
INKError ret;
if ((ret = INKProxyStateSet(INK_PROXY_OFF, INK_CACHE_CLEAR_OFF)) != INK_ERR_OKAY)
printf("[INKProxyStateSet] turn off FAILED\n");
print_err("stop_TS", ret);
-#endif
}
void
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIeventHandler.cc Thu May 6 23:40:41 2010
@@ -1536,17 +1536,7 @@ CmdLine_EventHandler::ConfigureLevel(voi
CLI_globals::Help(cli_data->output, CL_CONF_HOSTDB, cli_data->advui, cli_data->featset);
break;
case CL_EV_EIGHT: // Snapshots
-#if 0 /* Don't handle for now */
- Debug("cli_event", "ConfigureLevel: entered snapshots case \n");
- command_prompt(CLI_globals::cmdLD[CL_CONF_SNAPSHOTS].cmdprompt);
- command_mode(cli_data->cmdmode);
- arguments(cli_data->args);
- current_state(CL_CONF_SNAPSHOTS);
- CLI_globals::set_response(cli_data->output, CLI_globals::successStr, " ", CL_CONF_SNAPSHOTS);
- break;
-#else
/* Fall through */
-#endif
case CL_EV_NINE:
/* Fall through */
case CL_EV_TEN:
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIhelp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIhelp.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIhelp.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIhelp.cc Thu May 6 23:40:41 2010
@@ -58,10 +58,6 @@ static const char *HelpStrings[numCmd] =
"7. bounce_cluster # Restarts the traffic_server (cluster wide)\n",
"8. restart_local # Restarts the traffic_manager (local node)\n",
"9. restart_cluster # Restarts the traffic_manager (cluster wide)\n",
-#if 0 /* Don't allow clearing of statistics */
- "10. clear_cluster # Clears Statistics (cluster wide)\n",
- "11. clear_node # Clears Statistics (local node)\n",
-#endif
" Select above options by number \n",
"help # displays a list of commands\n",
"exit # exits the cmd line tool\n"
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIlineBuffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIlineBuffer.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIlineBuffer.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLIlineBuffer.cc Thu May 6 23:40:41 2010
@@ -78,14 +78,6 @@ CLIlineBuffer::reset()
{
//n_fields = 0;
c_fields = 0;
-#if 0
- if (f_format)
- (*f_format).clear();
- if (o_string)
- (*o_string).clear();
- if (f_widths)
- (*f_widths).clear();
-#endif
}
int
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLImonitor.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLImonitor.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLImonitor.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLImonitor.cc Thu May 6 23:40:41 2010
@@ -274,17 +274,6 @@ const
"Update Failures", "%-*s %*s\n",
10, 10, 50, 3},
// Links
-#if 0
- {"proxy.process.cache.link.active\\c", NULL,
- "Links in Progress", "%-*s %*s\n",
- 10, 10, 50, 3},
- {"proxy.process.cache.link.success\\c", NULL,
- "Link Sucesses", "%-*s %*s\n",
- 10, 10, 50, 3},
- {"proxy.process.cache.link.failure\\c", NULL,
- "Link Failures", "%-*s %*s\n",
- 10, 10, 50, 3},
-#endif
// Removes
{"proxy.process.cache.remove.active\\c", NULL,
"Removes in Progress", "%-*s %*s\n",
@@ -499,12 +488,6 @@ CLI_monitor::doMonitorProtocolStats(CLI_
const char *line12 = " Queries Originating From This Node \n";
const char *line13 = " Queries Originating From ICP Peers\n";
// const char *line14 = " Operations\n";
-#if 0
- const char *line15 = " WCCP\n";
- const char *line16 = " Router Statistics\n";
- const char *line17 = " Node Statistics\n";
- const char *line18 = " Protocol Statistics\n";
-#endif
const char *line19 = " RTSP\n";
const char *line20 = " Client Statistics\n";
const char *line21 = " Server Statistics\n";
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateCommands.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateCommands.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateCommands.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateCommands.cc Thu May 6 23:40:41 2010
@@ -50,10 +50,6 @@ CliCreateCommands()
createCommand("show:version", Cmd_ShowVersion, NULL, CLI_COMMAND_EXTERNAL, "show:version", "Version information");
-#if 0
- // Tech Support wants us to handle all ports in their protocol or function area
- createCommand("show:ports", Cmd_ShowPorts, NULL, CLI_COMMAND_EXTERNAL, "show:ports", "Port value assignments");
-#endif
createCommand("show:security", Cmd_ShowSecurity, NULL, CLI_COMMAND_EXTERNAL, "show:security", "Security information");
@@ -172,11 +168,6 @@ CliCreateCommands()
createCommand("config:remap", Cmd_ConfigRemap, NULL, CLI_COMMAND_EXTERNAL,
"config:remap <url>", "Update remap configuration file <url>");
-#if 0
- // Tech Support wants us to handle all ports in their protocol or function area
- createCommand("config:ports", Cmd_ConfigPorts, CmdArgs_ConfigPorts, CLI_COMMAND_EXTERNAL,
- "config:ports <port> <value>", "Configure port number assignments");
-#endif
createCommand("config:snmp", Cmd_ConfigSnmp, CmdArgs_ConfigSnmp, CLI_COMMAND_EXTERNAL,
"config:snmp status <on|off>", "Configure SNMP <on|off>");
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateUpgradeCmd.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateUpgradeCmd.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateUpgradeCmd.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli2/CliCreateUpgradeCmd.cc Thu May 6 23:40:41 2010
@@ -40,42 +40,6 @@ CliCreateUpgradeCmd()
// Fix INKqa12225: removed config:write, config:read, config:save-url since they
// are not used by the OTW Upgrade feature
-#if 0
- createCommand("config:write", Cmd_ConfigWrite, CmdArgs_ConfigWrite, CLI_COMMAND_EXTERNAL,
- "config:write ifc-head ts-version <ts_version> build-date <date> platform <platform> nodes <no_of_nodes>\n"
- "config:write feature <feature-string>\n"
- "config:write tar <tarfilelist>\n"
- "config:write tar-info <tarball-name> filelist <filelist>\n"
- "config:write tar-common <filelist>\n"
- "config:write bin-dir <sub-dir> filelist <dir-file-lists>\n"
- "config:write bin-group <filelist>\n"
- "config:write bin-common <filelist>\n"
- "config:write lib-dir <sub-dir> filelist <dir-file-lists>\n"
- "config:write lib-group <filelist>\n"
- "config:write lib-common <filelist>\n"
- "config:write config-dir <sub-dir> filelist <dir-file-filelists>\n"
- "config:write config-group <filelist>\n"
- "config:write config-common <filelist>\n" "config:write common-file <filelist>", "Write the ifc file");
-
- createCommand("config:read", Cmd_ConfigRead, CmdArgs_ConfigRead, CLI_COMMAND_EXTERNAL,
- "config:read ifc-head\n "
- "config:read feature \n"
- "config:read tar \n"
- "config:read tar-info \n"
- "config:read tar-common \n"
- "config:read bin-dir \n"
- "config:read bin-group \n"
- "config:read bin-common \n"
- "config:read lib-dir \n"
- "config:read lib-group \n"
- "config:read lib-common \n"
- "config:read config-dir \n"
- "config:read config-group \n"
- "config:read config-common \n" "config:read common-file ", "Read the ifc file");
-
- createCommand("config:save-url", Cmd_ConfigSaveUrl,
- CmdArgs_ConfigSaveUrl, CLI_COMMAND_EXTERNAL, NULL, "save the URL file");
-#endif
return CLI_OK;
}
Modified: trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Thu May 6 23:40:41 2010
@@ -101,23 +101,6 @@ static int manager_failures = 0;
static int server_failures = 0;
static int server_not_found = 0;
-#if 0 // TODO: REMOVE RNI
-// connect to proxy port and hand it the RTSP port
-static time_t rni_last_restart = 0;
-static int rni_proxy_start_succeed = 1;
-static int rni_watcher_enabled = 0;
-static char rni_proxy_pid_path[PATH_MAX] = "";
-static char rni_proxy_restart_cmd[PATH_MAX] = "";
-static char rni_proxy_binary[PATH_MAX] = "";
-
-#define RNI_RPASS_LOCK "rpass.lock"
-
-// non-Real passthrough
-static int rni_rpass_watcher_enabled = 0;
-static char rni_rpass_lockfile[PATH_MAX];
-static char rni_rpass_restart_cmd[PATH_MAX] = "";
-static char rni_rpass_binary[PATH_MAX] = "";
-#endif
static const int sleep_time = 10; // 10 sec
static const int manager_timeout = 3 * 60; // 3 min
@@ -140,12 +123,6 @@ static ink_hrtime manager_flap_retry_sta
static const int kill_timeout = 1 * 60; // 1 min
-#if 0 // TODO: REMOVE RNI
-#define DEFAULT_RNI_RESTART_INTERVAL 20 // 20 seconds
-static int rni_restart_interval = DEFAULT_RNI_RESTART_INTERVAL;
-#define DEFAULT_RNI_RPASS_SWITCH_INTERVAL 60
-static int rni_rpass_switch_interval = DEFAULT_RNI_RPASS_SWITCH_INTERVAL;
-#endif
static int child_pid = 0;
static int child_status = 0;
@@ -617,34 +594,6 @@ ConfigIntFatalError:
exit(1);
}
-#if 0 // Used by RNI
-// extract the binary name from a cmd
-static void
-get_binary_from_cmd(char *cmdline, char *binary)
-{
- char *bin, *path, *cmd;
-
-
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Entering get_binary_from_cmd(%s, <ptr>)\n", cmdline);
-#endif
- cmd = xstrdup(cmdline);
- bin = path = strtok(cmd, " \t");
- while (*bin != '\0')
- bin++;
- while ((bin > path) && (*bin != '/'))
- bin--;
- if (*bin == '/')
- bin++;
- if (bin) {
- ink_strncpy(binary, bin, PATH_MAX);
- }
- xfree(cmd);
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Leaving get_binary_from_cmd(%s, <%s>)\n", cmdline, binary);
-#endif
-}
-#endif
static void
read_config()
@@ -729,118 +678,11 @@ read_config()
read_config_int("proxy.config.cop.linux_min_swapfree_kb", &check_memory_min_swapfree_kb);
read_config_int("proxy.config.cop.linux_min_memfree_kb", &check_memory_min_memfree_kb);
-#if 0 // TODO: REMOVE RNI
- // Real Networks stuff
- read_config_int("proxy.config.rni.watcher_enabled", &rni_watcher_enabled);
- if (rni_watcher_enabled) {
- read_config_string("proxy.config.rni.proxy_pid_path", rni_proxy_pid_path, sizeof(rni_proxy_pid_path));
- read_config_int("proxy.config.rni.proxy_restart_interval", &rni_restart_interval);
- read_config_string("proxy.config.rni.proxy_restart_cmd", rni_proxy_restart_cmd, sizeof(rni_proxy_restart_cmd));
- // extract the rni_proxy_binary name
- if ((strcmp(rni_proxy_restart_cmd, "NULL") != 0) && (*rni_proxy_restart_cmd != '\0')) {
- get_binary_from_cmd(rni_proxy_restart_cmd, rni_proxy_binary);
- }
- }
- // initialize rni_proxy_start_succeed to rni_watcher_enabled
- // so that rpass can be started if RealProxy is not available
- rni_proxy_start_succeed = rni_watcher_enabled;
-
- // Real Passthrough stuff
- read_config_int("proxy.config.rni.rpass_watcher_enabled", &rni_rpass_watcher_enabled);
- if (rni_rpass_watcher_enabled) {
- read_config_int("proxy.config.rni.proxy_restart_interval", &rni_restart_interval);
-
- read_config_string("proxy.config.rni.rpass_restart_cmd", rni_rpass_restart_cmd, sizeof(rni_rpass_restart_cmd));
- // extract the rni_rpass_binary name
- if ((strcmp(rni_rpass_restart_cmd, "NULL") != 0) && (*rni_rpass_restart_cmd != '\0')) {
- get_binary_from_cmd(rni_rpass_restart_cmd, rni_rpass_binary);
- }
- }
-#endif
#ifdef TRACE_LOG_COP
cop_log(COP_DEBUG, "Leaving read_config()\n");
#endif
}
-#if 0 // Used by RNI
-//
-// Get process ID in file
-//
-static pid_t
-getholding_pid(const char *pid_path)
-{
- int err;
- int fd;
- int size;
- int val;
- char buf[16];
- char *t = NULL;
- pid_t holding_pid;
-
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Entering getholding_pid(%s)\n", pid_path);
-#endif
- // Can not use 'locfile_open()' to get the lockfile.
- // Instead see if the lockfile exists and get the holding pid
- // coverity[fs_check_call]
- if (0 == access(pid_path, R_OK)) {
- // Open file Read-only
- do {
- // coverity[toctou]
- fd = open(pid_path, O_RDONLY, 0600);
- } while ((fd < 0) && (errno == EINTR));
-
- if (fd < 0) {
- cop_log(COP_WARNING, "Failed to open proccess id file %s(%d)\n", pid_path, errno);
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Leaving getholding_pid(%s) --> %d\n", pid_path, 0);
-#endif
- return 0;
- }
-
- t = buf;
- for (size = 15; size > 0;) {
- do {
- err = read(fd, t, size);
- } while ((err < 0) && (errno == EINTR));
-
- if (err < 0) {
- cop_log(COP_WARNING, "Failed to read pid from file %s(%d)\n", pid_path, errno);
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Leaving getholding_pid(%s) --> %d\n", pid_path, 0);
-#endif
- return 0;
- }
- if (err == 0)
- break;
-
- size -= err;
- t += err;
- }
- *t = '\0';
-
- // buf is null-terminated and it is read to an integer type, disable coverity check
- // coverity[secure_coding]
- if (sscanf(buf, "%d\n", &val) != 1) {
- holding_pid = 0;
- } else {
- holding_pid = val;
- }
- // cleanup
- if (fd)
- close(fd);
-
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Leaving getholding_pid(%s) --> %d\n", pid_path, holding_pid);
-#endif
- return holding_pid;
- }
-#ifdef TRACE_LOG_COP
- cop_log(COP_DEBUG, "Leaving getholding_pid(%s) --> %d\n", pid_path, 0);
-#endif
- return 0;
-}
-#endif
static void
spawn_manager()
@@ -944,219 +786,6 @@ spawn_manager()
#endif
}
-#if 0 // TODO: REMOVE RNI
-//
-// Spawn G2 Real Server
-//
-static void
-spawn_rni()
-{
-
- static time_t last_restart = 0;
-
- // Check to see if we are restarting
- // the rmserver too quickly.
- if (last_restart != 0 && rni_restart_interval != 0) {
- time_t time_diff = time(NULL) - last_restart;
- if (time_diff < rni_restart_interval) {
- return;
- }
- }
-
- char *restart_cmd = NULL;
- int err;
-
- // Grab binary and args
- // deal with multiple args
-#define MAX_ARGS 10
- restart_cmd = strdup(rni_proxy_restart_cmd);
- char *args[MAX_ARGS + 1];
- {
- int i;
- for (i = 0; i < MAX_ARGS + 1; i++)
- args[i] = NULL;
- char *p;
- i = 0;
- p = restart_cmd;
- char *tok;
- int max_args = 0;
- while ((tok = strtok(p, " \t"))) {
- if (i < MAX_ARGS) {
- if (i == 0) {
- // first argument should be the program argument
- // that required RealProxy to be under Traffic Server
- // install directory to start, use absolute path otherwise
- if (strstr(tok, root_dir)) {
- tok = tok + strlen(root_dir) + 1;
- }
- }
- args[i] = strdup(tok);
- i++;
- } else {
- max_args = 1;
- }
- p = NULL;
- }
- if (max_args) {
- cop_log(COP_WARNING, "more than %d args in '%s'\n", MAX_ARGS, rni_proxy_restart_cmd);
- }
- }
- if (args[0]) {
- last_restart = time(NULL);
- rni_last_restart = last_restart;
- err = fork();
- if (err == 0) {
- err = execv(args[0], &args[0]);
- if (-1 == err) {
- cop_log(COP_WARNING, "unable to execv[%s,%s,...]\n", args[0], args[1]);
- exit(1);
- }
- } else if (err == -1) {
- cop_log(COP_FATAL, "unable to fork [%d '%s']\n", errno, strerror(errno));
- exit(1);
- }
- for (int i = 0; i < MAX_ARGS; i++) {
- if (args[i]) {
- free(args[i]);
- }
- }
- if (restart_cmd)
- free(restart_cmd);
- }
-}
-
-//
-// Kill G2 Real Server
-//
-// This doesn't seem to be used.
-static void INK_UNUSED
-safe_kill_rni(void)
-{
- int err;
- pid_t pid;
-
- set_alarm_warn();
- alarm(kill_timeout);
- // Can not use lockfile_kill()
- // lockfile_kill (rni_proxy_pid_path, killsig, coresig);
- pid = getholding_pid(rni_proxy_pid_path);
- if (pid != 0) {
- pid = -pid;
- if (coresig > 0) {
- kill(pid, coresig);
- // Sleep for a bit give time for the first signal
- // to be delivered
- sleep(1);
- }
- do {
- err = kill(pid, rni_killsig);
- } while ((err == 0) || ((err < 0) && (errno == EINTR)));
-#if (HOST_OS == linux)
- // linux: be sure that we've killed all of the process
- ink_killall(rni_proxy_binary, killsig);
-#endif
- }
-
- alarm(0);
- set_alarm_death();
- // remove old rmserver.pid file
- unlink(rni_proxy_pid_path);
-}
-
-
-//
-// Spawn G2 non-Real passthrough
-//
-static void
-spawn_rpass()
-{
- int err;
- FILE *fd;
- char *restart_cmd = NULL;
- static time_t last_restart = 0;
-
- // Check to see if we are restarting
- // the rtspd too quickly.
- if (last_restart != 0 && rni_restart_interval != 0) {
- time_t time_diff = time(NULL) - last_restart;
- if (time_diff < rni_restart_interval) {
- return;
- }
- }
-
- // Grab binary and args
- // deal with multiple args
-#define MAX_ARGS 10
- restart_cmd = strdup(rni_rpass_restart_cmd);
- char *args[MAX_ARGS + 3];
- {
- int i;
- for (i = 0; i < MAX_ARGS + 3; i++)
- args[i] = NULL;
- char *p;
- i = 0;
- p = restart_cmd;
- char *tok;
- int max_args = 0;
- while ((tok = strtok(p, " \t"))) {
- if (i < MAX_ARGS) {
- if (i == 0) {
- // first argument should be the program argument
- // that required Real Passthrough to be under Traffic Server
- // install directory to start, use absolute path otherwise
- if (strstr(tok, root_dir)) {
- tok = tok + strlen(root_dir) + 1;
- }
- }
- args[i] = strdup(tok);
- i++;
- } else {
- max_args = 1;
- }
- p = NULL;
- }
- if (max_args) {
- cop_log(COP_WARNING, "more than %d args in '%s'\n", MAX_ARGS, rni_rpass_restart_cmd);
- }
- // add the '-d pid_path' arguments at the end of the args list
- args[i] = strdup("-d");
- args[i + 1] = strdup(rni_rpass_lockfile);
- }
- if (args[0]) {
- last_restart = time(NULL);
- err = fork();
-
- if (err == 0) {
- fd = fopen(rni_rpass_lockfile, "w+");
- if (fd > 0) {
-#if (HOST_OS == solaris)
- fprintf(fd, "%d\n", (int)getpid());
-#else
- fprintf(fd, "%d\n", getpid());
-#endif
- fclose(fd);
- }
-
- err = execv(args[0], &args[0]);
- if (-1 == err) {
- cop_log(COP_WARNING, "unable to execv[%s,%s,...]\n", args[0], args[1]);
- exit(1);
- }
- } else if (err == -1) {
- cop_log(COP_FATAL, "unable to fork [%d '%s']\n", errno, strerror(errno));
- exit(1);
- }
- for (int i = 0; i < MAX_ARGS + 2; i++) {
- if (args[i]) {
- free(args[i]);
- }
- }
- if (restart_cmd)
- free(restart_cmd);
- }
-}
-
-#endif // TODO: REMOVE RNI
static int
@@ -1744,62 +1373,6 @@ server_up()
}
}
-#if 0 // TODO: REMOVE RNI
-//
-// Check health status for G2 Real Server
-//
-static void
-check_rni()
-{
-#ifndef _WIN32
- // Cannot use 'lockfile_open()' to get the lockfile.
- // Instead see if the pid file exists and get the holding pid
- pid_t rni_pid = getholding_pid(rni_proxy_pid_path);
-
- // Make sure the pid is valid
- if (rni_pid == 0 || kill(rni_pid, 0) == -1) {
-#if (HOST_OS == linux)
- // linux: the pid is invalid, killall to be safe
- ink_killall(rni_proxy_binary, rni_killsig);
-#endif
- // Spawn G2 Real Server
- cop_log(COP_WARNING, "restarting G2 Real server\n");
- spawn_rni();
- }
-}
-
-//
-// Check health status for Real Passthrough
-//
-static void
-check_rpass()
-{
- pid_t rpass_pid;
-
- // Cannot use 'lockfile_open()' to get the lockfile.
- // Instead see if the pid file exists and get the holding pid
- rpass_pid = getholding_pid(rni_rpass_lockfile);
-
- // rni_rpass_spawned is used here to only spawn the Real Passthrough
- // process, but not monitoring here 'cause we can't find
- // a way to get the pid of the rtspd process correctly here
- // the pid returned by fork() doesn't match the actual pid of
- // rtspd. One possibility is that after rtspd is exec, the binary
- // itself exec another process afterwards.
-
- // Make sure the pid is valid
- if (rpass_pid == 0 || kill(rpass_pid, 0) == -1) {
-#if (HOST_OS == linux)
- // linux: the pid is invalid, killall to be safe
- ink_killall(rni_rpass_binary, rni_killsig);
-#endif
- // Spawn G2 Real Server
- cop_log(COP_WARNING, "restarting Real Passthrough Daemon\n");
- spawn_rpass();
- }
-#endif
-}
-#endif // TODO: REMOVE RNI
// | state | status | action
// --------|---------|----------|---------------
@@ -1825,39 +1398,6 @@ check_programs()
#ifdef TRACE_LOG_COP
cop_log(COP_DEBUG, "Entering check_programs()\n");
#endif
-#if 0 // TODO: REMOVE RNI
- pid_t rni_pid;
- if (rni_last_restart > 0) {
- rni_pid = getholding_pid(rni_proxy_pid_path);
- if (rni_pid == 0 || kill(rni_pid, 0) == -1) {
- time_t time_diff = time(NULL) - rni_last_restart;
- if (time_diff > rni_restart_interval && time_diff < rni_rpass_switch_interval) {
- // we should switch from RealProxy to Real Passthrough
- if (rni_proxy_start_succeed) {
-
- fprintf(stderr, "**********************************************************\n");
- fprintf(stderr, "* Traffic Cop is unable to start RealProxy successfully. *\n");
- fprintf(stderr, "* It may be due to one of the following reasons *\n");
- fprintf(stderr, "* - invalid or missing license file *\n");
- fprintf(stderr, "* - port dependency with other applications (eg:TM) *\n");
- fprintf(stderr, "* - signals from other applications *\n");
- fprintf(stderr, "* RealNetworks streams will be bypassed instead of be *\n");
- fprintf(stderr, "* cached. If you have RealProxy license purchased, *\n");
- fprintf(stderr, "* make sure it is installed correctly and check the *\n");
- fprintf(stderr, "* proxyerr.log for errors. *\n");
- fprintf(stderr, "**********************************************************\n\n");
- }
- rni_proxy_start_succeed = 0;
- }
- }
- }
- if (rni_watcher_enabled && rni_proxy_start_succeed) {
- check_rni();
- }
- if (rni_rpass_watcher_enabled && !rni_proxy_start_succeed) {
- check_rpass();
- }
-#endif // TODO: REMOVE RNI
// Try to get the manager lock file. If we succeed in doing this,
// it means there is no manager running.
@@ -2297,9 +1837,6 @@ init_lockfiles()
snprintf(cop_lockfile, sizeof(cop_lockfile), "%s%s%s", local_state_dir, DIR_SEP, COP_LOCK);
snprintf(manager_lockfile, sizeof(manager_lockfile), "%s%s%s", local_state_dir, DIR_SEP, MANAGER_LOCK);
snprintf(server_lockfile, sizeof(server_lockfile), "%s%s%s", local_state_dir, DIR_SEP, SERVER_LOCK);
-#if 0 // TODO: REMOVE RNI
- snprintf(rni_rpass_lockfile, sizeof(rni_rpass_lockfile), "%s%s%s", local_state_dir, DIR_SEP, RNI_RPASS_LOCK);
-#endif
#ifdef TRACE_LOG_COP
cop_log(COP_DEBUG, "Leaving init_lockfiles()\n");
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/MgmtConverter.cc Thu May 6 23:40:41 2010
@@ -2673,7 +2673,6 @@ testConvertFile_ts(char *file)
xfree(xml_file);
xml_file = NULL;
}
-#if 1
// convert files in alphabetical order so easy to compare
// to template "correct" file
int i = 0;
@@ -2689,23 +2688,6 @@ testConvertFile_ts(char *file)
}
i++;
}
-# else
- // order of conversion depends on how inserted in file_info_ht
- InkHashTableEntry *entry;
- InkHashTableIteratorState iterator_state;
- for (entry = ink_hash_table_iterator_first(file_info_ht, &iterator_state);
- entry != NULL; entry = ink_hash_table_iterator_next(file_info_ht, &iterator_state)) {
- filename = (char *) ink_hash_table_entry_key(file_info_ht, entry);
- convertFile_ts(filename, &xml_file);
- if (xml_file) {
- fprintf(fp, "\n\n<!-- CONVERT %s: -->\n%s\n\n", filename, xml_file);
- xfree(xml_file);
- xml_file = NULL;
- } else {
- fprintf(fp, "\n\n<!-- CONVERT %s: ERROR -->\n\n", filename);
- }
- }
-#endif
} else {
convertFile_ts(file, &xml_file);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/SimpleQueue.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/SimpleQueue.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/SimpleQueue.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/SimpleQueue.cc Thu May 6 23:40:41 2010
@@ -231,20 +231,3 @@ SimpleQueue::isEmpty()
return (head == NULL);
}
-#if 0
-// SimpleQueue::Print()
-//
-// Prints out the queue. For DEBUG only, not thread safe
-//
-void
-SimpleQueue::Print()
-{
- SimpleQueueEntry *current = head;
- cout << "Simple Queue: " << this << endl;
- while (current != NULL) {
- cout << "\tdata: " << current->data << " next: " << current->next << " prev: " << current->prev << endl;
- current = current->next;
- }
- cout << "-----------------------------------------" << endl;
-}
-#endif
Modified: trafficserver/traffic/trunk/test/SDKtest/client/Config.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/SDKtest/client/Config.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/SDKtest/client/Config.cc (original)
+++ trafficserver/traffic/trunk/test/SDKtest/client/Config.cc Thu May 6 23:40:41 2010
@@ -307,9 +307,6 @@ Config::Config(long warmup, char *config
strcpy(log_file, rhs);
} else if (!strcmp(lhs, "users")) {
users = atoi(rhs);
-#if 0
- assert((users) > 0 && (users) < MAX_USERS);
-#endif
assert((users) > 0);
} else if (!strcmp(lhs, "execution_interval")) {
execution_interval = atoi(rhs);
@@ -385,10 +382,6 @@ Config::Config(long warmup, char *config
}
origin_server_ports[j] = p + 1;
*p = '\0';
-#if 0
- fprintf(stderr, "Origin server %d is host '%s' port '%s'\n",
- j, origin_server_names[j], origin_server_ports[j]);
-#endif
}
} else if (!strcmp(lhs, "docsize_dist_file")) {
strcpy(docsize_dist_file, rhs);
Modified: trafficserver/traffic/trunk/test/SDKtest/client/DoTest.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/SDKtest/client/DoTest.h?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/SDKtest/client/DoTest.h (original)
+++ trafficserver/traffic/trunk/test/SDKtest/client/DoTest.h Thu May 6 23:40:41 2010
@@ -203,9 +203,6 @@ struct DoTest
cumulative_target_byterate_prob[num_thinktimes-1]
must be 1.0 */
-#if 0
- UserInfo user_info[MAX_USERS];
-#endif
UserInfo *user_info;
int debug; /* Debugging Messages */
int ssl; /* ssl flad */
@@ -225,9 +222,6 @@ struct DoTest
struct timeval rr_time;
int total_reqs_last_poll;
-#if 0
- struct pollfd poll_vector[MAX_USERS];
-#endif
struct pollfd *poll_vector;
char read_buf[MAX_READBUF_SIZE];
Modified: trafficserver/traffic/trunk/test/SDKtest/client/Hist.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/SDKtest/client/Hist.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/SDKtest/client/Hist.cc (original)
+++ trafficserver/traffic/trunk/test/SDKtest/client/Hist.cc Thu May 6 23:40:41 2010
@@ -168,12 +168,6 @@ main(int argc, char *argv[])
/* histogram_display(&H); */
for (j = 0; j < npoints; j++) {
val = random() % (1000 * nintervals);
-#if 0
- if ((random() % 5) == 0)
- val = 0.0;
- if ((random() % 5) == 0)
- val = 1000.0 * nintervals;
-#endif
histogram_point(&H, val);
}
histogram_display(&H);
Modified: trafficserver/traffic/trunk/test/SDKtest/client/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/SDKtest/client/Main.cc?rev=941972&r1=941971&r2=941972&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/SDKtest/client/Main.cc (original)
+++ trafficserver/traffic/trunk/test/SDKtest/client/Main.cc Thu May 6 23:40:41 2010
@@ -227,11 +227,7 @@ main(int argc, char *argv[])
warmup = (long) config->hotset;
// if warmup is true, we pass the hotset to do_test
}
-#if 0
- alarm(config->reporting_interval);
-#else
alarm(config->execution_interval);
-#endif
do_test = new DoTest(config->debug,
config->ssl,