You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/13 09:09:56 UTC
svn commit: r943821 [12/18] - in /trafficserver/traffic/trunk:
example/add-header/ example/app-template/ example/append-transform/
example/basic-auth/ example/blacklist-0/ example/blacklist-1/
example/bnull-transform/ example/cache_scan/ example/file-1...
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc Thu May 13 07:09:39 2010
@@ -25,8 +25,8 @@
* CoreAPI.cc
*
* Implementation of many of INKMgmtAPI functions, but from local side.
- *
- *
+ *
+ *
***************************************************************************/
#include "ink_config.h"
@@ -63,8 +63,8 @@ INKActionNeedT determine_action_need(con
/*-------------------------------------------------------------------------
* Init
*-------------------------------------------------------------------------
- * performs any necesary initializations for the local API client,
- * eg. set up global structures; called by the INKMgmtAPI::INKInit()
+ * performs any necesary initializations for the local API client,
+ * eg. set up global structures; called by the INKMgmtAPI::INKInit()
*/
INKError
Init(const char *socket_path)
@@ -80,8 +80,8 @@ Init(const char *socket_path)
/*-------------------------------------------------------------------------
* Terminate
*-------------------------------------------------------------------------
- * performs any necesary cleanup of global structures, etc,
- * for the local API client,
+ * performs any necesary cleanup of global structures, etc,
+ * for the local API client,
*/
INKError
Terminate()
@@ -94,7 +94,7 @@ Terminate()
/*-------------------------------------------------------------------------
* Diags
- *-------------------------------------------------------------------------
+ *-------------------------------------------------------------------------
* Uses the Traffic Manager diags object to display the diags output.
*/
void
@@ -149,7 +149,7 @@ Diags(INKDiagsT mode, const char *fmt, v
* ProxyStateGet
*-------------------------------------------------------------------------
* return INK_PROXY_OFF if Traffic Server is off.
- * return INK_PROXY_ON if Traffic Server is on.
+ * return INK_PROXY_ON if Traffic Server is on.
*/
INKProxyStateT
ProxyStateGet()
@@ -165,7 +165,7 @@ ProxyStateGet()
*-------------------------------------------------------------------------
* If state == INK_PROXY_ON, will turn on TS (unless it's already running).
* If steat == INK_PROXY_OFF, will turn off TS (unless it's already off).
- * tsArgs - (optional) a string with space delimited options that user
+ * tsArgs - (optional) a string with space delimited options that user
* wants to start traffic Server with
*/
INKError
@@ -180,7 +180,7 @@ ProxyStateSet(INKProxyStateT state, INKC
switch (state) {
case INK_PROXY_OFF:
- if (!ProxyShutdown()) // from WebMgmtUtils
+ if (!ProxyShutdown()) // from WebMgmtUtils
goto Lerror; // unsuccessful shutdown
break;
case INK_PROXY_ON:
@@ -251,14 +251,14 @@ Reconfigure()
/*-------------------------------------------------------------------------
* Restart
*-------------------------------------------------------------------------
- * Restarts Traffic Manager. Traffic Cop must be running in order to
+ * Restarts Traffic Manager. Traffic Cop must be running in order to
* restart Traffic Manager!!
*/
INKError
Restart(bool cluster)
{
if (cluster) { // Enqueue an event to restart the proxies across the cluster
- // this will kill TM completely;traffic_cop will restart TM/TS
+ // this will kill TM completely;traffic_cop will restart TM/TS
lmgmt->ccom->sendClusterMessage(CLUSTER_MSG_SHUTDOWN_MANAGER);
} else { // just bounce local proxy
lmgmt->mgmtShutdown(0);
@@ -281,12 +281,12 @@ HardRestart()
/**************************************************************************
- * RECORD OPERATIONS
+ * RECORD OPERATIONS
*************************************************************************/
/*-------------------------------------------------------------------------
* MgmtRecordGet
*-------------------------------------------------------------------------
- * rec_ele has allocated memory already but with all empty fields.
+ * rec_ele has allocated memory already but with all empty fields.
* The record info associated with rec_name will be returned in rec_ele.
*/
INKError
@@ -301,7 +301,7 @@ MgmtRecordGet(const char *rec_name, INKR
Debug("RecOp", "[MgmtRecordGet] Start\n");
- // initialize the record name
+ // initialize the record name
rec_ele->rec_name = xstrdup(rec_name);
memset(rec_val, 0, MAX_BUF_SIZE);
@@ -348,8 +348,8 @@ MgmtRecordGet(const char *rec_name, INKR
return INK_ERR_FAIL;
- if (rec_val[0] != '\0') { // non-NULL string value
- // allocate memory & duplicate string value
+ if (rec_val[0] != '\0') { // non-NULL string value
+ // allocate memory & duplicate string value
str_val = xstrdup(rec_val);
} else {
str_val = xstrdup("NULL");
@@ -360,7 +360,7 @@ MgmtRecordGet(const char *rec_name, INKR
Debug("RecOp", "[MgmtRecordGet] Get String Var %s = %s\n", rec_ele->rec_name, rec_ele->string_val);
break;
- default: // UNKOWN TYPE
+ default: // UNKOWN TYPE
Debug("RecOp", "[MgmtRecordGet] Get Failed : %d is Unknown Var type %s\n", rec_type, rec_name);
return INK_ERR_FAIL;
}
@@ -372,8 +372,8 @@ MgmtRecordGet(const char *rec_name, INKR
/*-------------------------------------------------------------------------
* determine_action_need (HELPER FN)
*-------------------------------------------------------------------------
- * reads the RecordsConfig info to determine which type of action is needed
- * when the record rec_name is changed; if the rec_name is invalid,
+ * reads the RecordsConfig info to determine which type of action is needed
+ * when the record rec_name is changed; if the rec_name is invalid,
* then returns INK_ACTION_UNDEFINED
*/
INKActionNeedT
@@ -383,7 +383,7 @@ determine_action_need(const char *rec_na
RecordUpdateType update_t;
// INKqa09916
- // the hashtable lookup will return 0 if there is no binding for the
+ // the hashtable lookup will return 0 if there is no binding for the
// rec_name in the hashtable
if (!RecordsConfigIndex->mgmt_hash_table_lookup((char *) rec_name, (void **) &r))
return INK_ACTION_UNDEFINED; // failed to find the rec_name in the records table
@@ -421,8 +421,8 @@ determine_action_need(const char *rec_na
* value string to get it to the type of the local manager
* variable
*
- * returns true if the variable was successfully set
- * and false otherwise
+ * returns true if the variable was successfully set
+ * and false otherwise
*/
INKError
MgmtRecordSet(const char *rec_name, const char *val, INKActionNeedT * action_need)
@@ -465,7 +465,7 @@ MgmtRecordSetInt(const char *rec_name, M
return MgmtRecordSet(rec_name, str_val, action_need);
/* INKqa10300
- *action_need = determine_action_need(rec_name);
+ *action_need = determine_action_need(rec_name);
if (recordValidityCheck(rec_name, str_val)) {
if (varSetInt(rec_name, int_val))
return INK_ERR_OKAY;
@@ -497,7 +497,7 @@ MgmtRecordSetCounter(const char *rec_nam
/* INKqa10300
*action_need = determine_action_need(rec_name);
if (recordValidityCheck(rec_name, str_val)) {
- if (varSetCounter(rec_name, counter_val))
+ if (varSetCounter(rec_name, counter_val))
return INK_ERR_OKAY;
}
return INK_ERR_FAIL;
@@ -527,11 +527,11 @@ MgmtRecordSetFloat(const char *rec_name,
/* INKqa10300
*action_need = determine_action_need(rec_name);
- if (recordValidityCheck(rec_name, str_val)) {
+ if (recordValidityCheck(rec_name, str_val)) {
if (varSetFloat(rec_name, float_val))
return INK_ERR_OKAY;
}
- return INK_ERR_FAIL;
+ return INK_ERR_FAIL;
*/
}
@@ -549,7 +549,7 @@ MgmtRecordSetString(const char *rec_name
/**************************************************************************
- * FILE OPERATIONS
+ * FILE OPERATIONS
*************************************************************************/
/*-------------------------------------------------------------------------
@@ -608,14 +608,14 @@ ReadFile(INKFileNameT file, char **text,
/*-------------------------------------------------------------------------
* WriteFile
*-------------------------------------------------------------------------
- * Purpose: replaces the current file with the file passed in;
+ * Purpose: replaces the current file with the file passed in;
* does forceUpdate for Rollback and FileManager so correct file
* versioning is maintained
* Input: file - the config file to write
* text - text buffer to write
* size - the size of the buffer to write
- * version - the current version level; new file will have the
- * version number above this one
+ * version - the current version level; new file will have the
+ * version number above this one
*/
INKError
WriteFile(INKFileNameT file, char *text, int size, int version)
@@ -639,7 +639,7 @@ WriteFile(INKFileNameT file, char *text,
}
xfree(fname);
- // if version < 0 then, just use next version in sequence;
+ // if version < 0 then, just use next version in sequence;
// otherwise check if trying to commit an old version
if (version >= 0) {
// check that the current version is equal to or less than the version
@@ -666,14 +666,14 @@ WriteFile(INKFileNameT file, char *text,
}
/**************************************************************************
- * EVENTS
+ * EVENTS
*************************************************************************/
/*-------------------------------------------------------------------------
* EventSignal
*-------------------------------------------------------------------------
- * LAN: THIS FUNCTION IS HACKED AND INCOMPLETE!!!!!
+ * LAN: THIS FUNCTION IS HACKED AND INCOMPLETE!!!!!
* with the current alarm processor system, the argument list is NOT
- * used; a set description is associated with each alarm already;
+ * used; a set description is associated with each alarm already;
* be careful because this alarm description is used to keep track
* of alarms in the current alarm processor
*/
@@ -694,7 +694,7 @@ EventSignal(char *event_name, va_list ap
* EventResolve
*-------------------------------------------------------------------------
* Resolves the event of the given event_name. If the event is already
- * unresolved, just return INK_ERR_OKAY.
+ * unresolved, just return INK_ERR_OKAY.
*/
INKError
@@ -714,7 +714,7 @@ EventResolve(char *event_name)
/*-------------------------------------------------------------------------
* ActiveEventGetMlt
*-------------------------------------------------------------------------
- * returns failure, and an incomplete active_alarms list if any of
+ * returns failure, and an incomplete active_alarms list if any of
* functions fail for a single event
* note: returns list of local alarms at that instant of fn call (snapshot)
*/
@@ -730,8 +730,8 @@ ActiveEventGetMlt(LLQ * active_events)
if (!active_events)
return INK_ERR_PARAMS;
- // Alarms stores a hashtable of all active alarms where:
- // key = alarm_t,
+ // Alarms stores a hashtable of all active alarms where:
+ // key = alarm_t,
// value = alarm_description defined in Alarms.cc alarmText[] array
event_ht = lmgmt->alarm_keeper->getLocalAlarms();
@@ -785,7 +785,7 @@ EventIsActive(char *event_name, bool * i
* This differs from the remote side callback registered. Technically, I think
* we need to redesign the alarm processor before we can handle the callback
* functionality we want to accomplish. Because currently the alarm processor
- * only allow registering callbacks for general alarms.
+ * only allow registering callbacks for general alarms.
* Mimic remote side and have a separate structure (eg. hashtable) of
* event callback functions for each type of event. The functions are also
* stored in the the hashtable, not in the TM alarm processor model
@@ -955,10 +955,10 @@ SnapshotGetMlt(LLQ * snapshots)
* StatsReset
*-------------------------------------------------------------------------
* Iterates through the RecordsConfig table, and for all stats
- * (type PROCESS, NODE, CLUSTER), sets them back to their default value
- * If one stat fails to be set correctly, then continues onto next one,
+ * (type PROCESS, NODE, CLUSTER), sets them back to their default value
+ * If one stat fails to be set correctly, then continues onto next one,
* but will return INK_ERR_FAIL. Only returns INK_ERR_OKAY if all
- * stats are set back to defaults succesfully.
+ * stats are set back to defaults succesfully.
*/
INKError
StatsReset()
@@ -986,7 +986,7 @@ StatsReset()
* EncryptToFile
*-------------------------------------------------------------------------
* Encrypts the password and stores the encrypted password in the
- * location specified by "filepath"
+ * location specified by "filepath"
*/
INKError
EncryptToFile(const char *passwd, const char *filepath)
@@ -1005,5 +1005,5 @@ EncryptToFile(const char *passwd, const
/* Network conifguration functions */
/*-------------------------------------------------------------
- * rmserver.cfg
+ * rmserver.cfg
*-------------------------------------------------------------*/
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.h Thu May 13 07:09:39 2010
@@ -51,9 +51,9 @@ void Diags(INKDiagsT mode, const char *f
INKProxyStateT ProxyStateGet();
INKError ProxyStateSet(INKProxyStateT state, INKCacheClearT clear);
-INKError Reconfigure(); // TS reread config files
-INKError Restart(bool cluster); //restart TM
-INKError HardRestart(); //restart traffic_cop
+INKError Reconfigure(); // TS reread config files
+INKError Restart(bool cluster); //restart TM
+INKError HardRestart(); //restart traffic_cop
/***************************************************************************
* Record Operations
@@ -102,7 +102,7 @@ INKError StatsReset();
INKError EncryptToFile(const char *passwd, const char *filepath);
/*-------------------------------------------------------------
- * rmserver.cfg
+ * rmserver.cfg
*-------------------------------------------------------------*/
/* Define the lists in rmserver.cfg */
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc Thu May 13 07:09:39 2010
@@ -23,12 +23,12 @@
/*****************************************************************************
* Filename: CoreAPIShared.cc
- * Purpose: This file contains functions that are shared by local and remote
+ * Purpose: This file contains functions that are shared by local and remote
* API; in particular it has helper functions used by INKMgmtAPI.cc
* Created: 01/20/00
* Created by: Lan Tran
*
- *
+ *
***************************************************************************/
#include "inktomi++.h"
@@ -339,9 +339,9 @@ poll_write(int fd, int timeout)
/***************************************************************************
* socket_read_timeout
- *
- * purpose: need timeout for socket after sending a request and waiting to
- * read reply check to see if anything to read;
+ *
+ * purpose: need timeout for socket after sending a request and waiting to
+ * read reply check to see if anything to read;
* but only wait for fixed time specified in timeout struct
* input: fd - the socket to wait for
* sec - time to wait in secs
@@ -349,7 +349,7 @@ poll_write(int fd, int timeout)
* output: returns 0 if time expires and the fd is not ready
* return > 0 (actually 1) if fd is ready to read
* reason: the client could send a reply, but if TM is down or has
- * problems sending a reply then the client could end up hanging,
+ * problems sending a reply then the client could end up hanging,
* waiting to read a replay from the local side
***************************************************************************/
int
@@ -371,7 +371,7 @@ socket_read_timeout(int fd, int sec, int
/***************************************************************************
* socket_write_timeout
- *
+ *
* purpose: checks if the specified socket is ready to be written too; only
* checks for the specified time
* input: fd - the socket to wait for
@@ -411,9 +411,9 @@ socket_write_timeout(int fd, int sec, in
* get_event_id
*
* Purpose: Given the event_name, returns the event's corresponding
- * event id
- * Note: this conversion is based on list defined in Alarms.h and
- * the identical list defined in CoreAPIShared.cc
+ * event id
+ * Note: this conversion is based on list defined in Alarms.h and
+ * the identical list defined in CoreAPIShared.cc
*********************************************************************/
int
get_event_id(const char *event_name)
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h Thu May 13 07:09:39 2010
@@ -27,7 +27,7 @@
* Created: 01/29/00
* Created by: Lan Tran
*
- *
+ *
***************************************************************************/
#ifndef _CORE_API_SHARED_H_
@@ -40,9 +40,9 @@
#define MAX_RECORD_SIZE 20 // max length of buffer to hold record values
// LAN - BAD BHACK; copied from Alarms.h !!!!!
-/* Must be same as defined in Alarms.h; the reason we had to
+/* Must be same as defined in Alarms.h; the reason we had to
* redefine them here is because the remote client also needs
- * access to these values for its event handling
+ * access to these values for its event handling
*/
#define MGMT_ALARM_UNDEFINED 0
#define MGMT_ALARM_PROXY_PROCESS_DIED 1
@@ -71,7 +71,7 @@
#define HTTP_PORT 80
#define BUFSIZE 1024
-// used by INKReadFromUrl
+// used by INKReadFromUrl
INKError parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int *bdy_size);
INKError readHTTPResponse(int sock, char *buffer, int bufsize, inku64 timeout);
INKError sendHTTPRequest(int sock, char *request, inku64 timeout);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.cc Thu May 13 07:09:39 2010
@@ -26,7 +26,7 @@
* Purpose: Generic module that deals with callbacks and a callback table
* Created: 01/08/01
* Created by: lant
- *
+ *
***************************************************************************/
#include "ink_config.h"
@@ -58,9 +58,9 @@ create_event_callback(INKEventSignalFunc
/**********************************************************************
* delete_event_callback
- *
+ *
* purpose:frees EventCallbackT
- * input: None
+ * input: None
* output: EventCallbackT
* notes: also frees memory for the data passed in; ASSUMES data was
* dynamically allocated
@@ -71,7 +71,7 @@ delete_event_callback(EventCallbackT * e
if (event_cb) {
// LAN - can't free the data if don't know what it is?
- //if (event_cb->data) xfree(event_cb->data);
+ //if (event_cb->data) xfree(event_cb->data);
xfree(event_cb);
}
return;
@@ -112,8 +112,8 @@ create_callback_table(const char *lock_n
/**********************************************************************
* delete_callback_table
*
- * purpose: frees the memory allocated for a CallbackTable; also
- * destroys the lock
+ * purpose: frees the memory allocated for a CallbackTable; also
+ * destroys the lock
* input: None
* output: None
* notes: doesn't free pointers to functions
@@ -158,7 +158,7 @@ delete_callback_table(CallbackTable * cb
* input: cb_list - the table of callbacks to check
* output: returns a list of event_ids with at least one callback fun;
* returns NULL if all the events have a registered callback
- * notes:
+ * notes:
**********************************************************************/
LLQ *
get_events_with_callbacks(CallbackTable * cb_table)
@@ -194,7 +194,7 @@ get_events_with_callbacks(CallbackTable
* func - the callback function
* first_cb - true only if this is the event's first callback
* output: INK_ERR_xx
- * notes:
+ * notes:
**********************************************************************/
INKError
cb_table_register(CallbackTable * cb_table, char *event_name, INKEventSignalFunc func, void *data, bool * first_cb)
@@ -263,7 +263,7 @@ cb_table_register(CallbackTable * cb_tab
* func - the callback function
* first_cb - true only if this is the event's first callback
* output: INK_ERR_xx
- * notes:
+ * notes:
**********************************************************************/
INKError
cb_table_unregister(CallbackTable * cb_table, char *event_name, INKEventSignalFunc func)
@@ -315,7 +315,7 @@ cb_table_unregister(CallbackTable * cb_t
}
} // end for (int i = 0; i < NUM_EVENTS; i++) {
} else {
- // unregister for specific event
+ // unregister for specific event
int id = get_event_id(event_name);
if (cb_table->event_callback_l[id]) {
int queue_depth;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/EventCallback.h Thu May 13 07:09:39 2010
@@ -23,16 +23,16 @@
/***************************************************************************
* EventCallback.h
- * Purpose: defines the CallbackTable which stores callback functions for
+ * Purpose: defines the CallbackTable which stores callback functions for
* specific events
*
- *
+ *
***************************************************************************/
/*
* EventCallback.h
*
- * defines the CallbackTable which stores callback functions for
- * specific events. Used by both local api and remote api.
+ * defines the CallbackTable which stores callback functions for
+ * specific events. Used by both local api and remote api.
*/
#ifndef _EVENT_CALLBACK_H_
@@ -43,7 +43,7 @@
#include "INKMgmtAPI.h"
#include "CoreAPIShared.h"
-// when registering the callback function, can pass in void* data which
+// when registering the callback function, can pass in void* data which
// will then be passed to the callback function; need to store this data with
// the callback in a struct
typedef struct
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.cc Thu May 13 07:09:39 2010
@@ -23,10 +23,10 @@
/*****************************************************************************
* Filename: EventControlMain.cc
- * Purpose: Handles all event requests from the user.
+ * Purpose: Handles all event requests from the user.
* Created: 01/08/01
* Created by: lant
- *
+ *
***************************************************************************/
#include "inktomi++.h"
@@ -92,11 +92,11 @@ delete_event_client(EventClientT * clien
/*********************************************************************
* remove_event_client
- *
+ *
* purpose: removes the EventClientT from the specified hashtable; includes
* removing the binding and freeing the ClientT
* input: client - the ClientT to remove
- * output:
+ * output:
*********************************************************************/
void
remove_event_client(EventClientT * client, InkHashTable * table)
@@ -118,7 +118,7 @@ remove_event_client(EventClientT * clien
*
* purpose: initializes the mgmt_events queue which is intended to hold
* TM events.
- * input:
+ * input:
* output: INK_ERR_xx
* note: None
*********************************************************************/
@@ -145,9 +145,9 @@ init_mgmt_events()
/*********************************************************************
* delete_mgmt_events
- *
+ *
* purpose: frees the mgmt_events queue.
- * input:
+ * input:
* output: None
* note: None
*********************************************************************/
@@ -201,18 +201,18 @@ delete_event_queue(LLQ * q)
/*********************************************************************
* apiEventCallback
- *
- * purpose: callback function registered with alarm processor so that
- * each time alarm is signalled, can enqueue it in the mgmt_events
+ *
+ * purpose: callback function registered with alarm processor so that
+ * each time alarm is signalled, can enqueue it in the mgmt_events
* queue
- * input:
+ * input:
* output: None
* note: None
*********************************************************************/
void
apiEventCallback(alarm_t newAlarm, char *ip, char *desc)
{
- // create an INKEvent
+ // create an INKEvent
// addEvent(new_alarm, ip, desc) // adds event to mgmt_events
INKEvent *newEvent;
@@ -236,10 +236,10 @@ apiEventCallback(alarm_t newAlarm, char
/*********************************************************************
* event_callback_main
*
- * This function is run as a thread in WebIntrMain.cc that listens on a
- * specified socket. It loops until Traffic Manager dies.
+ * This function is run as a thread in WebIntrMain.cc that listens on a
+ * specified socket. It loops until Traffic Manager dies.
* In the loop, it just listens on a socket, ready to accept any connections,
- * until receives a request from the remote API client. Parse the request
+ * until receives a request from the remote API client. Parse the request
* to determine which CoreAPI call to make.
*********************************************************************/
void *
@@ -329,8 +329,8 @@ event_callback_main(void *arg)
}
} // end if (new_con_fd >= 0 && FD_ISSET(new_con_fd, &selectFDs))
- // some other file descriptor; for each one, service request
- if (fds_ready > 0) { // RECEIVED A REQUEST from remote API client
+ // some other file descriptor; for each one, service request
+ if (fds_ready > 0) { // RECEIVED A REQUEST from remote API client
// see if there are more fd to set - iterate through all entries in hash table
con_entry = ink_hash_table_iterator_first(accepted_clients, &con_state);
while (con_entry) {
@@ -353,7 +353,7 @@ event_callback_main(void *arg)
case EVENT_REG_CALLBACK:
handle_event_reg_callback(client_entry, req);
if (req)
- xfree(req); // free the request allocated by preprocess_msg
+ xfree(req); // free the request allocated by preprocess_msg
if (ret == INK_ERR_NET_WRITE || ret == INK_ERR_NET_EOF) {
Debug("event", "[event_callback_main] ERROR: handle_event_reg_callback\n");
remove_event_client(client_entry, accepted_clients);
@@ -366,7 +366,7 @@ event_callback_main(void *arg)
handle_event_unreg_callback(client_entry, req);
if (req)
- xfree(req); // free the request allocated by preprocess_msg
+ xfree(req); // free the request allocated by preprocess_msg
if (ret == INK_ERR_NET_WRITE || ret == INK_ERR_NET_EOF) {
Debug("event", "[event_callback_main] ERROR: handle_event_unreg_callback\n");
remove_event_client(client_entry, accepted_clients);
@@ -389,13 +389,13 @@ event_callback_main(void *arg)
} // end if (fds_ready > 0)
// ------------ service loop is done, check for events now -------------
- // for each event in the mgmt_events list, uses the event id to check the
+ // for each event in the mgmt_events list, uses the event id to check the
// events_registered queue for each client connection to see if that client
// has a callback registered for that event_id
INKEvent *event;
- if (!mgmt_events || queue_is_empty(mgmt_events)) { //no events to process
+ if (!mgmt_events || queue_is_empty(mgmt_events)) { //no events to process
//fprintf(stderr, "[event_callback_main] NO EVENTS TO PROCESS\n");
Debug("event", "[event_callback_main] NO EVENTS TO PROCESS\n");
continue;
@@ -403,15 +403,15 @@ event_callback_main(void *arg)
// iterate through each event in mgmt_events
while (!queue_is_empty(mgmt_events)) {
ink_mutex_acquire(&mgmt_events_lock); //acquire lock
- event = (INKEvent *) dequeue(mgmt_events); // get what we want
- ink_mutex_release(&mgmt_events_lock); // release lock
+ event = (INKEvent *) dequeue(mgmt_events); // get what we want
+ ink_mutex_release(&mgmt_events_lock); // release lock
if (!event)
continue;
//fprintf(stderr, "[event_callback_main] have an EVENT TO PROCESS\n");
- // iterate through all entries in hash table, if any
+ // iterate through all entries in hash table, if any
con_entry = ink_hash_table_iterator_first(accepted_clients, &con_state);
while (con_entry) {
client_entry = (EventClientT *) ink_hash_table_entry_value(accepted_clients, con_entry);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/EventControlMain.h Thu May 13 07:09:39 2010
@@ -26,7 +26,7 @@
* Purpose: Handles event callbacks only
* Created: 6/26/00
* Created by: lant
- *
+ *
***************************************************************************/
#ifndef EVENT_CONTROL_MAIN_H
@@ -40,7 +40,7 @@
//use events_registered[event_id] as index to check if alarm is registered
typedef struct
{
- SocketInfo sock_info; // stores event socket info
+ SocketInfo sock_info; // stores event socket info
struct sockaddr *adr;
bool events_registered[NUM_EVENTS];
} EventClientT;
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.cc Thu May 13 07:09:39 2010
@@ -27,7 +27,7 @@
/***************************************************************************
* Token
* a token is a name/value pairs of data. The data are of the type char *.
- * The setName and setValue are not meant for data encapsulation, but
+ * The setName and setValue are not meant for data encapsulation, but
* free callers from allocating the memory.
***************************************************************************/
@@ -53,7 +53,7 @@ Token::setName(const char *str)
}
//
-// need to allocate more memory than the actual str len in case
+// need to allocate more memory than the actual str len in case
// more characters are appended to the value
//
void
@@ -106,7 +106,7 @@ Token::Print()
* TokenList
* a token list is a list of token (obviously). It uses List.h to link
* the tokens together. This object includes some queue and stack manlipuation
- * function calls in addition to the common length() and the debugging
+ * function calls in addition to the common length() and the debugging
* print() member functions.
***************************************************************************/
TokenList::TokenList():length(0)
@@ -136,7 +136,7 @@ TokenList::Print()
* a rule is nothing more than just a token list. This object also
* contains a very important member function -- parse(). Depending on
* on the configuration file type, a specific parse function is invoked.
- * Since the user of "Rule" are not expected to access the member data
+ * Since the user of "Rule" are not expected to access the member data
* driectly, the get/set member functions are used for data encapsulation.
***************************************************************************/
@@ -393,7 +393,7 @@ Rule::cacheParse(char *rule, unsigned sh
bool insideQuote = false;
const char *newStr;
- // Sanity Check -- number of token
+ // Sanity Check -- number of token
if (numRuleTok < minNumToken) {
setErrorHint("Expecting more space delimited tokens!");
return NULL;
@@ -446,7 +446,7 @@ Rule::cacheParse(char *rule, unsigned sh
newStr = strtrim(subtoken, '\"');
if (!insideQuote) {
- // printf("!insideQuote: %s\n", subtoken);
+ // printf("!insideQuote: %s\n", subtoken);
token->setValue(newStr);
m_tokenList->enqueue(token);
} else {
@@ -508,7 +508,7 @@ Rule::hostingParse(char *rule)
}
-/**
+/**
* icpParse
* - mimic proxy/ICPConfig/icp_config_change_callback
**/
@@ -522,7 +522,7 @@ Rule::icpParse(char *rule, unsigned shor
Token *token;
TokenList *m_tokenList = NEW(new TokenList());
- // Sanity Check -- number of token
+ // Sanity Check -- number of token
if (numRuleTok < minNumToken) {
setErrorHint("Expecting more ':' delimited tokens!");
return NULL;
@@ -805,7 +805,7 @@ Rule::socksParse(char *rule)
newStr = strtrim(subtoken, '\"');
if (!insideQuote) {
- // printf("!insideQuote: %s\n", subtoken);
+ // printf("!insideQuote: %s\n", subtoken);
token->setValue(newStr);
m_tokenList->enqueue(token);
} else {
@@ -851,7 +851,7 @@ Rule::splitdnsParse(char *rule)
bool insideQuote = false;
const char *newStr;
- // Sanity Check -- number of token
+ // Sanity Check -- number of token
if (numRuleTok < 0) {
setErrorHint("Expecting more space delimited tokens!");
return NULL;
@@ -935,7 +935,7 @@ Rule::updateParse(char *rule)
const char *tokenStr = ruleTok.iterFirst(&ruleTok_state);
// NOTE: ignore white spaces before/after the '\'
- // There should only be 5 tokens; if there are 6 tokens, the
+ // There should only be 5 tokens; if there are 6 tokens, the
// sixth token must be all white spaces
if (numRuleTok<5 || numRuleTok> 6 || (numRuleTok == 6 && strspn(ruleTok[5], " ") != strlen(ruleTok[5]))) {
setErrorHint("Expecting exactly 5 '\' delimited tokens");
@@ -1018,7 +1018,7 @@ Rule::storageParse(char *rule)
/*
* bool Rule::inQuote(char *str)
- * Counts the number of quote found in "str"
+ * Counts the number of quote found in "str"
* RETURN true if "str" contains odd number of quotes (")
* false if "str" contains even number of quotes (including zero)
*/
@@ -1072,9 +1072,9 @@ RuleList::Print()
/*
* void RuleList::parse(char *fileBuf, const char *filename)
- * Takes configuration file buffer, tokenize the buffer according carriage
+ * Takes configuration file buffer, tokenize the buffer according carriage
* return. For each line, pasre it.
- *
+ *
*/
void
RuleList::parse(char *fileBuf, const char *filename)
@@ -1131,13 +1131,13 @@ RuleList::parse(char *fileBuf, const cha
}
/*
- * void RuleList::parse(char *fileBuf, INKFileNameT filetype)
- * Takes configuration file buffer, tokenize the buffer according carriage
+ * void RuleList::parse(char *fileBuf, INKFileNameT filetype)
+ * Takes configuration file buffer, tokenize the buffer according carriage
* return. For each line, pasre it.
* NOTE: (1) comment line must start with '#' as the first character without
* leading spaces
* (2) a line must
- *
+ *
*/
void
RuleList::parse(char *fileBuf, INKFileNameT filetype)
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/GenericParser.h Thu May 13 07:09:39 2010
@@ -24,7 +24,7 @@
/***************************************************************************
GenericParser.h
-
+
***************************************************************************/
#ifndef _STATTYPE_H_
#define _STATTYPE_H_
@@ -44,7 +44,7 @@
/***************************************************************************
* Token
* a token is a name/value pairs of data. The data are of the type char *.
- * The setName and setValue are not meant for data encapsulation, but
+ * The setName and setValue are not meant for data encapsulation, but
* free callers from allocating the memory.
***************************************************************************/
class Token
@@ -67,7 +67,7 @@ public:
* TokenList
* a token list is a list of token (obviously). It uses List.h to link
* the tokens together. This object includes some queue and stack manlipuation
- * function calls in addition to the common length() and the debugging
+ * function calls in addition to the common length() and the debugging
* print() member functions.
***************************************************************************/
class TokenList
@@ -149,7 +149,7 @@ private:
* a rule is nothing more than just a token list. This object also
* contains a very important member function -- parse(). Depending on
* on the configuration file type, a specific parse function is invoked.
- * Since the user of "Rule" are not expected to access the member data
+ * Since the user of "Rule" are not expected to access the member data
* driectly, the get/set member functions are used for data encapsulation.
***************************************************************************/
class Rule
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPIStub.cc Thu May 13 07:09:39 2010
@@ -26,7 +26,7 @@
* Purpose: This file implements the management api stub functions
* Created: 12/17/00
* Created by: Eric Wong
- *
+ *
***************************************************************************/
#include "INKMgmtAPI.h"
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.cc Thu May 13 07:09:39 2010
@@ -27,7 +27,7 @@
Description: mgmt api plugin init code
-
+
****************************************************************************/
#include "inktomi++.h"
@@ -116,9 +116,9 @@ dll_close(void *dlp)
dlclose(dlp);
}
-//
+//
// mgmt_plugin_load
-//
+//
// loads the plugin passing it the argc, argv arguments
//
static void
@@ -187,7 +187,7 @@ mgmt_plugin_expand(char *arg)
return (xstrdup(str));
}
-//
+//
// plugin_init
//
// Reads in the plugin_mgmt.config file and loads each plugin listed
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/MgmtPlugin.h Thu May 13 07:09:39 2010
@@ -27,7 +27,7 @@
Description: mgmt api plugin init declarations
-
+
****************************************************************************/
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsDefs.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsDefs.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsDefs.h Thu May 13 07:09:39 2010
@@ -23,11 +23,11 @@
/***************************************************************************
* NetworkUtilsDefs.h
- *
- * contains general definitions used by both NetworkUtilsRemote and
+ *
+ * contains general definitions used by both NetworkUtilsRemote and
* NetworkUtilsLocal
*
- *
+ *
***************************************************************************/
#ifndef _NETWORK_UTILS_DEFS_H_
@@ -54,7 +54,7 @@
#define SIZE_EVENT_ID 2 // num bytes used to specify event_id
-// the possible operations or msg types sent from remote client to TM
+// the possible operations or msg types sent from remote client to TM
#define TOTAL_NUM_OP_TYPES 22
typedef enum
{
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc Thu May 13 07:09:39 2010
@@ -23,11 +23,11 @@
/***************************************************************************
* NetworkUtilsLocal.cc
- *
+ *
* contains implementation of local networking utility functions, such as
* unmarshalling requests from a remote client and marshalling replies
*
- *
+ *
***************************************************************************/
#include "ink_config.h"
@@ -45,7 +45,7 @@
/**************************************************************************
* socket_flush
*
- * flushes the socket by reading the entire message out of the socket
+ * flushes the socket by reading the entire message out of the socket
* and then gets rid of the msg
**************************************************************************/
INKError
@@ -54,7 +54,7 @@ socket_flush(struct SocketInfo sock_info
int ret, byte_read = 0;
char buf[MAX_BUF_SIZE];
- // check to see if anything to read; wait only for specified time
+ // check to see if anything to read; wait only for specified time
if (socket_read_timeout(sock_info.fd, MAX_TIME_WAIT, 0) <= 0) {
return INK_ERR_NET_TIMEOUT;
}
@@ -86,11 +86,11 @@ socket_flush(struct SocketInfo sock_info
}
/**************************************************************************
- * socket_read_n
- *
- * purpose: guarantees reading of n bytes or return error.
+ * socket_read_n
+ *
+ * purpose: guarantees reading of n bytes or return error.
* input: socket info struct, buffer to read into and number of bytes to read
- * output: number of bytes read
+ * output: number of bytes read
* note: socket_read is implemented in WebUtils.cc
*************************************************************************/
INKError
@@ -98,7 +98,7 @@ socket_read_n(struct SocketInfo sock_inf
{
int ret, byte_read = 0;
- // check to see if anything to read; wait for specified time
+ // check to see if anything to read; wait for specified time
if (socket_read_timeout(sock_info.fd, MAX_TIME_WAIT, 0) <= 0) {
return INK_ERR_NET_TIMEOUT;
}
@@ -130,7 +130,7 @@ socket_read_n(struct SocketInfo sock_inf
/**************************************************************************
* socket_write_n
- *
+ *
* purpose: guarantees writing of n bytes or return error
* input: socket info struct, buffer to write from & number of bytes to write
* output: INK_ERR_xx (depends on num bytes written)
@@ -177,7 +177,7 @@ socket_write_n(struct SocketInfo sock_in
* (OpType + msg_len) and the request portion (used by the handle_xx fns)
* input: sock_info - socket msg is read from
* op_t - the operation type specified in the msg
- * msg - the data from the network message (no OpType or msg_len)
+ * msg - the data from the network message (no OpType or msg_len)
* output: INK_ERR_xx ( if INK_ERR_OKAY, then parameters set successfully)
* notes: Since preprocess_msg already removes the OpType and msg_len, this part o
* the message is not dealt with by the other parsing functions
@@ -222,7 +222,7 @@ preprocess_msg(struct SocketInfo sock_in
Debug("ts_main", "[preprocess_msg] length = %d\n", req_len);
// use req msg length to fetch the rest of the message
- // first check that there is a "rest of the msg", some msgs just
+ // first check that there is a "rest of the msg", some msgs just
// have the op specified
if (req_len == 0) {
*req = NULL;
@@ -259,7 +259,7 @@ Lerror:
* parse_file_read_request
*
* purpose: parses a file read request from a remote API client
- * input: req - data that needs to be parsed
+ * input: req - data that needs to be parsed
* file - the file type sent in the request
* output: INK_ERR_xx
* notes: request format = <INKFileNameT>
@@ -356,7 +356,7 @@ parse_request_name_value(char *req, char
name[name_len] = '\0'; // end string
*name_1 = name;
- // get record value - can be a MgmtInt, MgmtCounter ...
+ // get record value - can be a MgmtInt, MgmtCounter ...
val = (char *) xmalloc(sizeof(char) * (val_len + 1));
if (!val)
return INK_ERR_SYS_CALL;
@@ -434,22 +434,22 @@ parse_proxy_state_request(char *req, INK
}
/**********************************************************************
- * Marshal Replies
+ * Marshal Replies
**********************************************************************/
-/* NOTE: if the send function "return"s before writing to the socket
- then that means that an error occurred, and so the calling function
+/* NOTE: if the send function "return"s before writing to the socket
+ then that means that an error occurred, and so the calling function
must send_reply with the error that occurred. */
/**********************************************************************
* send_reply
*
- * purpose: sends a simple INK_ERR_* reply to the request made
- * input: return value - could be extended to support more complex
+ * purpose: sends a simple INK_ERR_* reply to the request made
+ * input: return value - could be extended to support more complex
* error codes but for now use only INK_ERR_FAIL, INK_ERR_OKAY
* int fd - socket fd to use.
* output: INK_ERR_*
* notes: this function does not need to go through the internal structure
- * so no cleaning up is done.
+ * so no cleaning up is done.
**********************************************************************/
INKError
send_reply(struct SocketInfo sock_info, INKError retval)
@@ -469,15 +469,15 @@ send_reply(struct SocketInfo sock_info,
}
/**********************************************************************
- * send_reply_list
+ * send_reply_list
*
- * purpose: sends the reply in response to a request to get list of string
+ * purpose: sends the reply in response to a request to get list of string
* tokens (delimited by REMOTE_DELIM_STR)
* input: sock_info -
* retval - INKError return type for the CoreAPI call
* list - string delimited list of string tokens
* output: INK_ERR_*
- * notes:
+ * notes:
* format: <INKError> <string_list_len> <delimited_string_list>
**********************************************************************/
INKError
@@ -522,16 +522,16 @@ send_reply_list(struct SocketInfo sock_i
/**********************************************************************
* send_record_get_reply
*
- * purpose: sends reply to the record_get request made
+ * purpose: sends reply to the record_get request made
* input: retval - result of the record get request
* int fd - socket fd to use.
- * val - the value of the record requested
+ * val - the value of the record requested
* val_size - num bytes the value occupies
* rec_type - the type of the record value requested
* output: INK_ERR_*
* notes: this function does not need to go through the internal structure
- * so no cleaning up is done.
- * format = <INKError> <rec_val_len> <rec_type> <rec_val>
+ * so no cleaning up is done.
+ * format = <INKError> <rec_val_len> <rec_type> <rec_val>
**********************************************************************/
INKError
send_record_get_reply(struct SocketInfo sock_info, INKError retval, void *val, int val_size, INKRecordT rec_type)
@@ -579,12 +579,12 @@ send_record_get_reply(struct SocketInfo
/**********************************************************************
* send_record_set_reply
*
- * purpose: sends reply to the record_set request made
- * input:
+ * purpose: sends reply to the record_set request made
+ * input:
* output: INK_ERR_*
* notes: this function does not need to go through the internal structure
- * so no cleaning up is done.
- * format =
+ * so no cleaning up is done.
+ * format =
**********************************************************************/
INKError
send_record_set_reply(struct SocketInfo sock_info, INKError retval, INKActionNeedT action_need)
@@ -619,13 +619,13 @@ send_record_set_reply(struct SocketInfo
/**********************************************************************
* send_file_read_reply
*
- * purpose: sends the reply in response to a file read request
- * input: return value - could be extended to support more complex
+ * purpose: sends the reply in response to a file read request
+ * input: return value - could be extended to support more complex
* error codes but for now use only INK_ERR_FAIL, INK_ERR_OKAY
* int fd - socket fd to use.
* output: INK_ERR_*
* notes: this function does not need to go through the internal structure
- * so no cleaning up is done.
+ * so no cleaning up is done.
* reply format = <INKError> <file_ver> <file_size> <file_text>
**********************************************************************/
INKError
@@ -677,7 +677,7 @@ send_file_read_reply(struct SocketInfo s
* send_proxy_state_get_reply
*
* purpose: sends the reply in response to a request to get state of proxy
- * input:
+ * input:
* int fd - socket fd to use.
* output: INK_ERR_*
* notes: this function DOES NOT HAVE IT"S OWN INKError TO SEND!!!!
@@ -709,7 +709,7 @@ send_proxy_state_get_reply(struct Socket
* retval - INKError return type for the EventIsActive core call
* active - is the requested event active or not?
* output: INK_ERR_*
- * notes:
+ * notes:
* format: <INKError> <bool>
**********************************************************************/
INKError
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.h Thu May 13 07:09:39 2010
@@ -22,18 +22,18 @@
*/
/***************************************************************************
- * NetworkUtils.h
+ * NetworkUtils.h
*
- * Defines interface for marshalling requests and unmarshalling responses
+ * Defines interface for marshalling requests and unmarshalling responses
* between the remote API client and Traffic Manager
*
- *
+ *
***************************************************************************/
/*****************************************************************************
- * NetworkUtils.h
+ * NetworkUtils.h
*
- * Defines interface for marshalling requests and unmarshalling responses
+ * Defines interface for marshalling requests and unmarshalling responses
* between the remote API client and Traffic Manager
*****************************************************************************/
@@ -54,7 +54,7 @@ INKError socket_read_n(struct SocketInfo
INKError socket_write_n(struct SocketInfo sock_info, const char *buf, int bytes);
/*****************************************************************************
- * Unmarshalling/marshalling
+ * Unmarshalling/marshalling
*****************************************************************************/
INKError preprocess_msg(struct SocketInfo sock_info, OpType * op_t, char **msg);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc Thu May 13 07:09:39 2010
@@ -24,10 +24,10 @@
/*****************************************************************************
* Filename: TSControlMain.cc
* Purpose: The main section for traffic server that handles all the requests
- * from the user.
+ * from the user.
* Created: 01/08/01
* Created by: Stephanie Song
- *
+ *
***************************************************************************/
#include "inktomi++.h"
@@ -48,11 +48,11 @@ InkHashTable *accepted_con; // a lis
/*********************************************************************
* create_client
- *
+ *
* purpose: creates a new ClientT and return pointer to it
* input: None
* output: ClientT
- * note: created for each accepted client connection
+ * note: created for each accepted client connection
*********************************************************************/
ClientT *
create_client()
@@ -72,10 +72,10 @@ create_client()
/*********************************************************************
* delete_client
- *
+ *
* purpose: frees dynamic memory allocated for a ClientT
* input: client - the ClientT to free
- * output:
+ * output:
*********************************************************************/
void
delete_client(ClientT * client)
@@ -90,11 +90,11 @@ delete_client(ClientT * client)
/*********************************************************************
* remove_client
- *
+ *
* purpose: removes the ClientT from the specified hashtable; includes
* removing the binding and freeing the ClientT
* input: client - the ClientT to remove
- * output:
+ * output:
*********************************************************************/
void
remove_client(ClientT * client, InkHashTable * table)
@@ -112,12 +112,12 @@ remove_client(ClientT * client, InkHashT
}
/*********************************************************************
- * ts_ctrl_main
- *
- * This function is run as a thread in WebIntrMain.cc that listens on a
- * specified socket. It loops until Traffic Manager dies.
+ * ts_ctrl_main
+ *
+ * This function is run as a thread in WebIntrMain.cc that listens on a
+ * specified socket. It loops until Traffic Manager dies.
* In the loop, it just listens on a socket, ready to accept any connections,
- * until receives a request from the remote API client. Parse the request
+ * until receives a request from the remote API client. Parse the request
* to determine which CoreAPI call to make.
*********************************************************************/
void *
@@ -144,7 +144,7 @@ ts_ctrl_main(void *arg)
InkHashTableEntry *con_entry; // used to obtain client connection info
ClientT *client_entry; // an entry of fd to alarms mapping
InkHashTableIteratorState con_state; // used to iterate through hash table
- int fds_ready; // stores return value for select
+ int fds_ready; // stores return value for select
struct timeval timeout;
int addr_len = (sizeof(struct sockaddr));
@@ -197,8 +197,8 @@ ts_ctrl_main(void *arg)
}
} // end if(new_con_fd >= 0 && FD_ISSET(new_con_fd, &selectFDs))
- // some other file descriptor; for each one, service request
- if (fds_ready > 0) { // RECEIVED A REQUEST from remote API client
+ // some other file descriptor; for each one, service request
+ if (fds_ready > 0) { // RECEIVED A REQUEST from remote API client
// see if there are more fd to set - iterate through all entries in hash table
con_entry = ink_hash_table_iterator_first(accepted_con, &con_state);
while (con_entry) {
@@ -216,7 +216,7 @@ ts_ctrl_main(void *arg)
client_entry->sock_info.fd);
mgmt_log("[ts_ctrl_main] preprocess_msg - remove client %d\n", client_entry->sock_info.fd);
remove_client(client_entry, accepted_con);
- // get next client connection (if any)
+ // get next client connection (if any)
con_entry = ink_hash_table_iterator_next(accepted_con, &con_state);
continue;
}
@@ -290,7 +290,7 @@ ts_ctrl_main(void *arg)
case PROXY_STATE_SET:
ret = handle_proxy_state_set(client_entry->sock_info, req);
if (req)
- xfree(req); // free the request allocated by preprocess_msg
+ xfree(req); // free the request allocated by preprocess_msg
if (ret == INK_ERR_NET_WRITE || ret == INK_ERR_NET_EOF) {
Debug("ts_main", "[ts_ctrl_main] ERROR:handle_proxy_state_set\n");
remove_client(client_entry, accepted_con);
@@ -328,7 +328,7 @@ ts_ctrl_main(void *arg)
case EVENT_RESOLVE:
ret = handle_event_resolve(client_entry->sock_info, req);
if (req)
- xfree(req); // free the request allocated by preprocess_msg
+ xfree(req); // free the request allocated by preprocess_msg
if (ret == INK_ERR_NET_WRITE || ret == INK_ERR_NET_EOF) {
Debug("ts_main", "[ts_ctrl_main] ERROR:handle_event_resolve\n");
remove_client(client_entry, accepted_con);
@@ -340,7 +340,7 @@ ts_ctrl_main(void *arg)
case EVENT_GET_MLT:
ret = handle_event_get_mlt(client_entry->sock_info);
if (req)
- xfree(req); // free the request allocated by preprocess_msg
+ xfree(req); // free the request allocated by preprocess_msg
if (ret == INK_ERR_NET_WRITE || ret == INK_ERR_NET_EOF) {
Debug("ts_main", "[ts_ctrl_main] ERROR:event_get_mlt\n");
remove_client(client_entry, accepted_con);
@@ -352,7 +352,7 @@ ts_ctrl_main(void *arg)
case EVENT_ACTIVE:
ret = handle_event_active(client_entry->sock_info, req);
if (req)
- xfree(req); // free the request allocated by preprocess_msg
+ xfree(req); // free the request allocated by preprocess_msg
if (ret == INK_ERR_NET_WRITE || ret == INK_ERR_NET_EOF) {
Debug("ts_main", "[ts_ctrl_main] ERROR:event_active\n");
remove_client(client_entry, accepted_con);
@@ -458,15 +458,15 @@ ts_ctrl_main(void *arg)
/*-------------------------------------------------------------------------
HANDLER FUNCTIONS
--------------------------------------------------------------------------*/
-/* NOTE: all the handle_xx functions basically, take the request, parse it,
+/* NOTE: all the handle_xx functions basically, take the request, parse it,
* and send a reply back to the remote client. So even if error occurs,
* each handle functions MUST SEND A REPLY BACK!! If an error occurs during
* parsing the request, or while doing the API call, then must send reply back
- * with only the error return value in the msg!!! It's important that if
+ * with only the error return value in the msg!!! It's important that if
* an error does occur, the "send_reply" function is used; otherwise the socket
- * will get written with too much extraneous stuff; the remote side will
+ * will get written with too much extraneous stuff; the remote side will
* only read the INKError type since that's all it expects to be in the message
- * (for an INKError != INK_ERR_OKAY).
+ * (for an INKError != INK_ERR_OKAY).
*/
/**************************************************************************
@@ -477,7 +477,7 @@ ts_ctrl_main(void *arg)
* input: socket information
* req - the msg sent (should = record name to get)
* output: SUCC or ERR
- * note:
+ * note:
*************************************************************************/
INKError
handle_record_get(struct SocketInfo sock_info, char *req)
@@ -547,7 +547,7 @@ handle_record_set(struct SocketInfo sock
ret = send_reply(sock_info, INK_ERR_PARAMS);
return ret;
}
- // parse request msg
+ // parse request msg
ret = parse_request_name_value(req, &name, &val);
if (ret != INK_ERR_OKAY) {
ret = send_reply(sock_info, ret);
@@ -604,7 +604,7 @@ handle_file_read(struct SocketInfo sock_
ret = send_reply(sock_info, ret);
return ret;
}
- // marshal the file info message that can be returned to client
+ // marshal the file info message that can be returned to client
ret = send_file_read_reply(sock_info, ret, version, size, text);
if (ret != INK_ERR_OKAY) {
ret = send_reply(sock_info, ret);
@@ -647,7 +647,7 @@ handle_file_write(struct SocketInfo sock
ret = send_reply(sock_info, ret);
if (text)
- xfree(text); // free memory allocated by parsing fn.
+ xfree(text); // free memory allocated by parsing fn.
return ret;
}
@@ -747,7 +747,7 @@ handle_restart(struct SocketInfo sock_in
if (!req) {
ret = send_reply(sock_info, INK_ERR_PARAMS);
- return ret; // shouldn't get here
+ return ret; // shouldn't get here
}
// the req should be a boolean value - typecase it
memcpy(&cluster, req, SIZE_BOOL);
@@ -764,7 +764,7 @@ handle_restart(struct SocketInfo sock_in
/**************************************************************************
* handle_event_resolve
*
- * purpose: handles request to resolve an event
+ * purpose: handles request to resolve an event
* input: struct SocketInfo sock_info - the socket to use to talk to client
* output: INK_ERR_xx
* note: the req should be the event name
@@ -777,7 +777,7 @@ handle_event_resolve(struct SocketInfo s
// parse msg - don't really need since the request itself is the record name
if (!req) {
ret = send_reply(sock_info, INK_ERR_PARAMS);
- return ret; // shouldn't get here
+ return ret; // shouldn't get here
}
// call CoreAPI call on Traffic Manager side; req == event_name
ret = EventResolve(req);
@@ -833,7 +833,7 @@ handle_event_get_mlt(struct SocketInfo s
/**************************************************************************
* handle_event_active
*
- * purpose: handles request to resolve an event
+ * purpose: handles request to resolve an event
* input: struct SocketInfo sock_info - the socket to use to talk to client
* output: INK_ERR_xx
* note: the req should be the event name
@@ -847,7 +847,7 @@ handle_event_active(struct SocketInfo so
// parse msg - don't really need since the request itself is the record name
if (!req) {
ret = send_reply(sock_info, INK_ERR_PARAMS);
- return ret; // shouldn't get here
+ return ret; // shouldn't get here
}
// call CoreAPI call on Traffic Manager side; req == event_name
ret = EventIsActive(req, &active);
@@ -1038,7 +1038,7 @@ handle_stats_reset(struct SocketInfo soc
/**************************************************************************
* handle_encrypt_to_file
*
- * purpose: handles request to encrypt password to file
+ * purpose: handles request to encrypt password to file
* input: struct SocketInfo sock_info - the socket to use to talk to client
* req - should be NULL
* output: INK_ERR_xx
@@ -1053,7 +1053,7 @@ handle_encrypt_to_file(struct SocketInfo
ret = send_reply(sock_info, INK_ERR_PARAMS);
return ret;
}
- // parse request msg
+ // parse request msg
ret = parse_request_name_value(req, &pwd, &filepath);
if (ret != INK_ERR_OKAY) {
ret = send_reply(sock_info, ret);
Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.h Thu May 13 07:09:39 2010
@@ -24,10 +24,10 @@
/*****************************************************************************
* Filename: TSControlMain.h
* Purpose: The main section for traffic server that handles all the request
- * from the user.
+ * from the user.
* Created: 6/26/00
* Created by: Stephanie Song
- *
+ *
***************************************************************************/
#ifndef TS_CONTROL_MAIN_H