Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix TS-344 by removing all trailing spaces from the source files

git-svn-id: https://svn.apache.org/repos/asf/trafficserver/traffic/trunk@943821 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 468058a255fe8dc2d618696839f77b474cbc7967 1 parent ac5f3e9
@mturk mturk authored
Showing with 1,316 additions and 1,316 deletions.
  1. +3 −3 example/add-header/add-header.c
  2. +22 −22 example/app-template/app-template.cc
  3. +5 −5 example/append-transform/append-transform.c
  4. +10 −10 example/basic-auth/basic-auth.c
  5. +3 −3 example/blacklist-0/blacklist-0.c
  6. +9 −9 example/blacklist-1/blacklist-1.c
  7. +8 −8 example/bnull-transform/bnull-transform.c
  8. +4 −4 example/cache_scan/cache_scan.cc
  9. +3 −3 example/file-1/file-1.c
  10. +1 −1  example/file_system_cache/DiskCache.cc
  11. +2 −2 example/gzip-transform/gzip.c
  12. +4 −4 example/hello/hello.c
  13. +17 −17 example/null-transform/null-transform.c
  14. +5 −5 example/output-header/output-header.c
  15. +6 −6 example/prefetch/test-hns-plugin.c
  16. +1 −1  example/protocol/Protocol.c
  17. +10 −10 example/protocol/TxnSM.c
  18. +13 −13 example/query_remap/query_remap.c
  19. +26 −26 example/redirect-1/redirect-1.c
  20. +3 −3 example/replace-header/replace-header.c
  21. +18 −18 example/response-header-1/response-header-1.c
  22. +8 −8 example/server-transform/server-transform.c
  23. +1 −1  example/session-1/session-1.c
  24. +4 −4 example/thread-1/thread-1.c
  25. +5 −5 example/thread-pool/psi.c
  26. +4 −4 example/thread-pool/test/SDKTest/psi_server.c
  27. +12 −12 iocore/aio/AIO.cc
  28. +2 −2 iocore/aio/I_AIO.h
  29. +1 −1  iocore/aio/NTAIO.cc
  30. +2 −2 iocore/aio/P_AIO.h
  31. +1 −1  iocore/block-cache/BC_OpenSegment.cc
  32. +6 −6 iocore/block-cache/I_BlockCacheSegmentVConnection.h
  33. +2 −2 iocore/block-cache/I_BlockCacheVConnection.h
  34. +5 −5 iocore/block-cache/P_AtomicDisk.h
  35. +2 −2 iocore/block-cache/P_BC_OpenDir.h
  36. +3 −3 iocore/block-cache/P_BC_OpenDirTable.h
  37. +7 −7 iocore/block-cache/P_BC_OpenSegment.h
  38. +6 −6 iocore/block-cache/P_BlockCacheDir.h
  39. +1 −1  iocore/block-cache/P_BlockCacheKey.h
  40. +1 −1  iocore/block-cache/P_HotWrite.h
  41. +1 −1  iocore/block-cache/P_log.h
  42. +2 −2 iocore/block-cache/alloc2.cc
  43. +56 −56 iocore/cache/Cache.cc
  44. +6 −6 iocore/cache/CacheDir.cc
  45. +1 −1  iocore/cache/CacheDisk.cc
  46. +4 −4 iocore/cache/CacheHosting.cc
  47. +3 −3 iocore/cache/CachePart.cc
  48. +22 −22 iocore/cache/CacheRead.cc
  49. +13 −13 iocore/cache/CacheTest.cc
  50. +30 −30 iocore/cache/CacheWrite.cc
  51. +5 −5 iocore/cache/I_Cache.h
  52. +1 −1  iocore/cache/I_Store.h
  53. +3 −3 iocore/cache/NewCacheVC.cc
  54. +2 −2 iocore/cache/NewCacheVC.h
  55. +7 −7 iocore/cache/P_CacheDir.h
  56. +1 −1  iocore/cache/P_CacheDisk.h
  57. +14 −14 iocore/cache/P_CacheInternal.h
  58. +3 −3 iocore/cache/P_CachePart.h
  59. +1 −1  iocore/cache/P_CacheTest.h
  60. +10 −10 iocore/cache/RamCacheCLFUS.cc
  61. +1 −1  iocore/cache/Store.cc
  62. +8 −8 iocore/cluster/ClusterAPI.cc
  63. +21 −21 iocore/cluster/ClusterCache.cc
  64. +1 −1  iocore/cluster/ClusterConfig.cc
  65. +20 −20 iocore/cluster/ClusterHandler.cc
  66. +5 −5 iocore/cluster/ClusterHandlerBase.cc
  67. +4 −4 iocore/cluster/ClusterLoadMonitor.cc
  68. +1 −1  iocore/cluster/ClusterProcessor.cc
  69. +4 −4 iocore/cluster/ClusterRPC.cc
  70. +6 −6 iocore/cluster/ClusterVConnection.cc
  71. +8 −8 iocore/cluster/P_ClusterCache.h
  72. +5 −5 iocore/cluster/P_ClusterCacheInternal.h
  73. +2 −2 iocore/cluster/P_ClusterHandler.h
  74. +1 −1  iocore/cluster/P_ClusterInternal.h
  75. +1 −1  iocore/cluster/P_ClusterLib.h
  76. +4 −4 iocore/cluster/P_ClusterMachine.h
  77. +3 −3 iocore/cluster/test_I_Cluster.cc
  78. +3 −3 iocore/cluster/test_P_Cluster.cc
  79. +4 −4 iocore/dns/DNS.cc
  80. +1 −1  iocore/dns/I_DNS.h
  81. +1 −1  iocore/dns/I_DNSProcessor.h
  82. +1 −1  iocore/dns/I_SplitDNS.h
  83. +1 −1  iocore/dns/I_SplitDNSProcessor.h
  84. +1 −1  iocore/dns/P_DNS.h
  85. +1 −1  iocore/dns/P_SplitDNS.h
  86. +5 −5 iocore/dns/P_SplitDNSProcessor.h
  87. +8 −8 iocore/dns/SRV.cc
  88. +4 −4 iocore/dns/SplitDNS.cc
  89. +1 −1  iocore/dns/test_I_DNS.cc
  90. +2 −2 iocore/eventsystem/EventSystem.cc
  91. +1 −1  iocore/eventsystem/I_Action.h
  92. +2 −2 iocore/eventsystem/I_EventProcessor.h
  93. +1 −1  iocore/eventsystem/I_IOBuffer.h
  94. +1 −1  iocore/eventsystem/I_ProtectedQueue.h
  95. +2 −2 iocore/eventsystem/I_ProxyAllocator.h
  96. +3 −3 iocore/eventsystem/I_SocketManager.h
  97. +1 −1  iocore/eventsystem/I_VConnection.h
  98. +2 −2 iocore/eventsystem/Lock.cc
  99. +2 −2 iocore/eventsystem/P_EventSystem.h
  100. +3 −3 iocore/eventsystem/P_IOBuffer.h
  101. +4 −4 iocore/eventsystem/P_ProtectedQueue.h
  102. +2 −2 iocore/eventsystem/P_Thread.h
  103. +3 −3 iocore/eventsystem/P_UnixEThread.h
  104. +7 −7 iocore/eventsystem/P_UnixSocketManager.h
  105. +1 −1  iocore/eventsystem/Processor.cc
  106. +6 −6 iocore/eventsystem/ProtectedQueue.cc
  107. +2 −2 iocore/eventsystem/Thread.cc
  108. +5 −5 iocore/eventsystem/UnixEThread.cc
  109. +3 −3 iocore/eventsystem/UnixEvent.cc
  110. +1 −1  iocore/eventsystem/test_Buffer.cc
  111. +1 −1  iocore/fastio/include/IncludeFiles.h
  112. +3 −3 iocore/fastio/include/fastio.h
  113. +1 −1  iocore/fastio/inkfio/fio_dev.c
  114. +1 −1  iocore/fastio/inkfio/fio_dev_sol.c
  115. +3 −3 iocore/fastio/inkfio/fio_ioctl.c
  116. +4 −4 iocore/fastio/inkfio/fio_request.c
  117. +2 −2 iocore/fastio/inkudp/inkudp_recv.c
  118. +2 −2 iocore/fastio/inkudp/inkudp_sched.c
  119. +1 −1  iocore/fastio/inkudp/inkudp_sched.h
  120. +2 −2 iocore/fastio/inkudp/inkudp_sched_no_qos.c
  121. +3 −3 iocore/fastio/inkudp/solaris.c
  122. +3 −3 iocore/fastio/libfastIO/fiotest.c
  123. +10 −10 iocore/fastio/libfastIO/libfastio.c
  124. +10 −10 iocore/fastio/libfastIO/libfastio.h
  125. +3 −3 iocore/fastio/libfastIO/metafiotest.c
  126. +1 −1  iocore/fastio/tools/advbmark/requtil.c
  127. +3 −3 iocore/fastio/tools/advbmark/requtil.h
  128. +3 −3 iocore/fastio/tools/advbmark/udpbmark.c
  129. +9 −9 iocore/hostdb/HostDB.cc
  130. +1 −1  iocore/hostdb/I_HostDB.h
  131. +2 −2 iocore/hostdb/I_HostDBProcessor.h
  132. +1 −1  iocore/hostdb/Inline.cc
  133. +3 −3 iocore/hostdb/MultiCache.cc
  134. +1 −1  iocore/hostdb/P_HostDB.h
  135. +3 −3 iocore/hostdb/P_HostDBProcessor.h
  136. +2 −2 iocore/hostdb/P_MultiCache.h
  137. +5 −5 iocore/hostdb/include/Machine.h
  138. +1 −1  iocore/hostdb/test_I_HostDB.cc
  139. +1 −1  iocore/net/I_NetConfig.h
  140. +1 −1  iocore/net/I_NetProcessor.h
  141. +7 −7 iocore/net/I_NetVConnection.h
  142. +7 −7 iocore/net/I_UDPConnection.h
  143. +5 −5 iocore/net/I_UDPNet.h
  144. +3 −3 iocore/net/I_UDPPacket.h
  145. +1 −1  iocore/net/Net.cc
  146. +1 −1  iocore/net/NetConfig.cc
  147. +2 −2 iocore/net/NetTest-http-server.c
  148. +2 −2 iocore/net/NetTest-simple-proxy.c
  149. +3 −3 iocore/net/NetVCTest.cc
  150. +1 −1  iocore/net/NetVConnection.cc
  151. +5 −5 iocore/net/P_Connection.h
  152. +3 −3 iocore/net/P_InkBulkIO.h
  153. +3 −3 iocore/net/P_Net.h
  154. +3 −3 iocore/net/P_NetAccept.h
  155. +3 −3 iocore/net/P_NetVCTest.h
  156. +3 −3 iocore/net/P_SSLNetAccept.h
  157. +3 −3 iocore/net/P_SSLNetProcessor.h
  158. +1 −1  iocore/net/P_SSLNetVConnection.h
  159. +2 −2 iocore/net/P_UDPConnection.h
  160. +2 −2 iocore/net/P_UDPNet.h
  161. +2 −2 iocore/net/P_UDPPacket.h
  162. +11 −11 iocore/net/P_UnixNet.h
  163. +5 −5 iocore/net/P_UnixNetState.h
  164. +1 −1  iocore/net/P_UnixNetVConnection.h
  165. +2 −2 iocore/net/P_UnixPollDescriptor.h
  166. +2 −2 iocore/net/P_UnixUDPConnection.h
  167. +3 −3 iocore/net/SSLCertLookup.cc
  168. +1 −1  iocore/net/SSLConfig.cc
  169. +7 −7 iocore/net/SSLNet.cc
  170. +9 −9 iocore/net/SSLNetVConnection.cc
  171. +2 −2 iocore/net/SSLUnixNet.cc
  172. +5 −5 iocore/net/Socks.cc
  173. +2 −2 iocore/net/UnixConnection.cc
  174. +10 −10 iocore/net/UnixNet.cc
  175. +1 −1  iocore/net/UnixNetAccept.cc
  176. +1 −1  iocore/net/UnixNetPages.cc
  177. +6 −6 iocore/net/UnixNetProcessor.cc
  178. +6 −6 iocore/net/UnixNetVConnection.cc
  179. +3 −3 iocore/net/UnixUDPConnection.cc
  180. +6 −6 iocore/net/UnixUDPNet.cc
  181. +2 −2 iocore/net/test_I_Net.cc
  182. +1 −1  iocore/net/test_I_UDPNet.cc
  183. +1 −1  iocore/net/test_I_simple_proxy.cc
  184. +1 −1  iocore/net/test_P_UDPNet.cc
  185. +6 −6 iocore/utils/I_MTInteractor.h
  186. +1 −1  iocore/utils/I_OneWayMultiTunnel.h
  187. +5 −5 iocore/utils/I_OneWayTunnel.h
  188. +1 −1  iocore/utils/OneWayMultiTunnel.cc
  189. +1 −1  iocore/utils/OneWayTunnel.cc
  190. +1 −1  libinktomi++/Allocator.cc
  191. +1 −1  libinktomi++/DAllocator.cc
  192. +1 −1  libinktomi++/DAllocator.h
  193. +1 −1  libinktomi++/Diags.cc
  194. +1 −1  libinktomi++/Diags.h
  195. +1 −1  libinktomi++/I_Version.h
  196. +1 −1  libinktomi++/InkPool.h
  197. +1 −1  libinktomi++/InkTime.cc
  198. +1 −1  libinktomi++/InkTime.h
  199. +8 −8 libinktomi++/List.h
  200. +4 −4 libinktomi++/MatcherUtils.cc
  201. +1 −1  libinktomi++/MatcherUtils.h
  202. +2 −2 libinktomi++/ParseRules.cc
  203. +3 −3 libinktomi++/Ptr.h
  204. +2 −2 libinktomi++/RawHashTable.h
  205. +1 −1  libinktomi++/Regression.cc
  206. +5 −5 libinktomi++/SafeShell.cc
  207. +2 −2 libinktomi++/SimpleDBM.cc
  208. +4 −4 libinktomi++/SimpleDBM.h
  209. +13 −13 libinktomi++/SimpleTokenizer.h
  210. +1 −1  libinktomi++/TestHttpHeader.cc
  211. +9 −9 libinktomi++/TextBuffer.cc
  212. +2 −2 libinktomi++/TextBuffer.h
  213. +4 −4 libinktomi++/Tokenizer.cc
  214. +10 −10 libinktomi++/Tokenizer.h
  215. +1 −1  libinktomi++/Version.cc
  216. +9 −9 libinktomi++/fastlz.c
  217. +13 −13 libinktomi++/fastlz.h
  218. +3 −3 libinktomi++/ink_aiocb.h
  219. +1 −1  libinktomi++/ink_args.h
  220. +4 −4 libinktomi++/ink_assert.h
  221. +2 −2 libinktomi++/ink_atomic.h
  222. +2 −2 libinktomi++/ink_bool.h
  223. +1 −1  libinktomi++/ink_config.h
  224. +2 −2 libinktomi++/ink_exception.h
  225. +1 −1  libinktomi++/ink_hrtime.h
  226. +1 −1  libinktomi++/ink_inet.cc
  227. +1 −1  libinktomi++/ink_inout.h
  228. +1 −1  libinktomi++/ink_lockfile.h
  229. +3 −3 libinktomi++/ink_memory.cc
  230. +1 −1  libinktomi++/ink_mutex.h
  231. +7 −7 libinktomi++/ink_queue.cc
  232. +2 −2 libinktomi++/ink_queue.h
  233. +11 −11 libinktomi++/ink_queue_utils.c
  234. +8 −8 libinktomi++/ink_res_init.cc
  235. +7 −7 libinktomi++/ink_res_mkquery.cc
  236. +2 −2 libinktomi++/ink_sock.cc
  237. +1 −1  libinktomi++/ink_sock.h
  238. +2 −2 libinktomi++/ink_sprintf.cc
  239. +2 −2 libinktomi++/ink_sprintf.h
  240. +1 −1  libinktomi++/ink_string++.cc
  241. +1 −1  libinktomi++/ink_string++.h
  242. +39 −39 libinktomi++/ink_string.cc
  243. +4 −4 libinktomi++/ink_string.h
  244. +2 −2 libinktomi++/ink_syslog.cc
  245. +2 −2 libinktomi++/ink_syslog.h
  246. +2 −2 libinktomi++/ink_thread.cc
  247. +1 −1  libinktomi++/ink_thread.h
  248. +1 −1  libinktomi++/ink_time.cc
  249. +1 −1  libinktomi++/ink_time.h
  250. +8 −8 libinktomi++/little_endian.h
  251. +6 −6 libinktomi++/llqueue.cc
  252. +1 −1  libinktomi++/load_http_hdr.cc
  253. +8 −8 libinktomi++/ptrdef.h
  254. +6 −6 libinktomi++/test_List.cc
  255. +1 −1  libinktomi++/test_arena.cc
  256. +3 −3 libinktomi++/test_atomic.cc
  257. +1 −1  librecords/I_RecCore.h
  258. +1 −1  librecords/I_RecDefs.h
  259. +1 −1  librecords/P_RecDefs.h
  260. +1 −1  librecords/RecCore.cc
  261. +1 −1  librecords/RecMessage.cc
  262. +1 −1  librecords/RecProcess.cc
  263. +4 −4 librecords/RecTree.cc
  264. +1 −1  librecords/test_I_RecLocal.cc
  265. +2 −2 proxy/AbstractBuffer.cc
  266. +2 −2 proxy/CacheControl.h
  267. +1 −1  proxy/CacheInspectorAllow.h
  268. +5 −5 proxy/CheckStats.cc
  269. +1 −1  proxy/ClusterHashStandalone.cc
  270. +2 −2 proxy/ClusterHashStandalone.h
  271. +2 −2 proxy/ConfigParse.h
  272. +3 −3 proxy/ControlBase.cc
  273. +4 −4 proxy/CoreUtils.h
  274. +1 −1  proxy/DiagsConfig.cc
  275. +1 −1  proxy/Error.cc
  276. +4 −4 proxy/Error.h
  277. +1 −1  proxy/EventName.cc
  278. +3 −3 proxy/FetchSM.cc
  279. +4 −4 proxy/FetchSM.h
  280. +1 −1  proxy/Freer.h
  281. +12 −12 proxy/ICP.cc
  282. +13 −13 proxy/ICP.h
  283. +3 −3 proxy/ICPConfig.cc
  284. +1 −1  proxy/ICPProcessor.cc
  285. +2 −2 proxy/ICPProcessor.h
  286. +1 −1  proxy/ICPStats.cc
  287. +1 −1  proxy/ICPlog.h
  288. +1 −1  proxy/IPAllow.h
  289. +16 −16 proxy/Initialize.cc
  290. +1 −1  proxy/Initialize.h
  291. +6 −6 proxy/InkAPI.cc
  292. +43 −43 proxy/InkAPITest.cc
  293. +3 −3 proxy/InkIOCoreAPI.cc
  294. +5 −5 proxy/InkXml.cc
  295. +4 −4 proxy/InkXml.h
  296. +12 −12 proxy/Main.cc
  297. +2 −2 proxy/Main.h
  298. +9 −9 proxy/MuxVC.cc
  299. +2 −2 proxy/MuxVC.h
  300. +15 −15 proxy/NTDefs.h
Sorry, we could not display the entire diff because too many files (717) changed.
View
6 example/add-header/add-header.c
@@ -21,15 +21,15 @@
limitations under the License.
*/
-/* add-header.c: a plugin that adds MIME headers to
+/* add-header.c: a plugin that adds MIME headers to
* client request headers.
*
*
- * Usage:
+ * Usage:
* (NT): AddHeader.dll "name1: value1" "name2: value2" ...
* (Solaris): add-header.so "name1: value1" "name2: value2" ...
*
- * namei and valuei are the name and value of the
+ * namei and valuei are the name and value of the
* ith MIME header to be added to the client request
*/
View
44 example/app-template/app-template.cc
@@ -23,7 +23,7 @@
/*
* Example application template to be used with the standalone iocore
- *
+ *
*/
#include "inktomi++.h"
@@ -69,19 +69,19 @@ int tsapp_port = 12345;
AppVersionInfo appVersionInfo;
ArgumentDescription argument_descriptions[] = {
- {"version", 'V', "Print Version Id", "T",
+ {"version", 'V', "Print Version Id", "T",
&version_flag, NULL, NULL},
- {"tsapp_port", 'p', "tsapp port", "I",
+ {"tsapp_port", 'p', "tsapp port", "I",
&tsapp_port, "TSAPP_PORT", NULL},
- {"net_threads", 'n', "Number of Net Threads", "I",
+ {"net_threads", 'n', "Number of Net Threads", "I",
&system_num_of_net_threads, "TSAPP_NET_THREADS", NULL},
- {"accept_thread", 'a', "Use an Accept Thread", "T",
+ {"accept_thread", 'a', "Use an Accept Thread", "T",
&use_accept_thread, "TSAPP_ACCEPT_THREAD", NULL},
- {"poll_timeout", 't', "poll timeout in milliseconds", "I",
+ {"poll_timeout", 't', "poll timeout in milliseconds", "I",
&net_config_poll_timeout, NULL, NULL},
- {"debug_tags", 'T', "Debug Tags ('|' separated)", "S1023",
+ {"debug_tags", 'T', "Debug Tags ('|' separated)", "S1023",
debug_tags, "TSAPP_DEBUG_TAGS", NULL},
- {"action_tags", 'T', "Action Tags ('|' separated)", "S1023",
+ {"action_tags", 'T', "Action Tags ('|' separated)", "S1023",
action_tags, "TSAPP_ACTION_TAGS", NULL},
{"help", 'h', "Help", NULL, NULL, NULL, usage}
};
@@ -95,7 +95,7 @@ void init_app_config() {
"proxy.config.net.max_poll_delay",
128,
RECU_DYNAMIC, RECC_NULL, NULL);
-
+
RecRegisterConfigInt(
RECT_CONFIG,
"proxy.config.net.listen_backlog",
@@ -106,20 +106,20 @@ void init_app_config() {
RECT_CONFIG,
"proxy.config.net.connections_throttle",
8000,
- RECU_DYNAMIC, RECC_NULL, NULL);
+ RECU_DYNAMIC, RECC_NULL, NULL);
RecRegisterConfigInt(
RECT_CONFIG,
"proxy.config.accept_threads",
0,
- RECU_DYNAMIC, RECC_NULL, NULL);
+ RECU_DYNAMIC, RECC_NULL, NULL);
// IO
RecRegisterConfigInt(
RECT_CONFIG,
"proxy.config.io.max_buffer_size",
32768,
- RECU_DYNAMIC, RECC_NULL, NULL);
+ RECU_DYNAMIC, RECC_NULL, NULL);
// Cache, etc
}
@@ -153,7 +153,7 @@ get_ts_directory(char *ts_path, size_t ts_path_len)
if (ts_path[len - 1] == '/') {
ts_path[len - 1] = '\0';
}
-
+
fclose(fp);
} else {
ink_strncpy(ts_path, PREFIX, ts_path_len);
@@ -161,7 +161,7 @@ get_ts_directory(char *ts_path, size_t ts_path_len)
}
if ((err = stat(ts_path, &s)) < 0) {
- fprintf(stderr,"unable to stat() TS PATH '%s': %d %d, %s\n",
+ fprintf(stderr,"unable to stat() TS PATH '%s': %d %d, %s\n",
ts_path, err, errno, strerror(errno));
fprintf(stderr," Please set correct path in env variable TS_ROOT \n");
return -1;
@@ -200,7 +200,7 @@ int main(int argc, char * argv[])
{
char ts_path[PATH_NAME_MAX + 1];
// build the application information structure
- appVersionInfo.setup(PACKAGE_NAME,PROGRAM_NAME, PACKAGE_VERSION, __DATE__,
+ appVersionInfo.setup(PACKAGE_NAME,PROGRAM_NAME, PACKAGE_VERSION, __DATE__,
__TIME__, BUILD_MACHINE, BUILD_PERSON, "");
process_args(argument_descriptions, n_argument_descriptions, argv);
@@ -217,7 +217,7 @@ int main(int argc, char * argv[])
ink_snprintf(system_config_directory, sizeof(system_config_directory), "%s/etc/trafficserver", system_root_dir);
ink_snprintf(system_local_state_dir, sizeof(system_local_state_dir), "%s/var/trafficserver", system_root_dir);
ink_snprintf(system_log_dir, sizeof(system_log_dir), "%s/var/log/trafficserver", system_root_dir);
- }
+ }
if (system_root_dir[0] && (chdir(system_root_dir) < 0)) {
fprintf(stderr,"unable to change to root directory \"%s\" [%d '%s']\n", system_root_dir, errno, strerror(errno));
@@ -230,13 +230,13 @@ int main(int argc, char * argv[])
// Diags
init_system_diags(debug_tags, NULL);
if (is_debug_tag_set("tsapp"))
- diags->dump(stdout);
+ diags->dump(stdout);
// Config & Stats
RecModeT mode_type = RECM_STAND_ALONE;
RecProcessInit(mode_type,diags);
//RecProcessInitMessage(mode_type);
-
+
signal(SIGPIPE, SIG_IGN); // ignore broken pipe
init_buffer_allocators();
@@ -266,11 +266,11 @@ int main(int argc, char * argv[])
// Start processors
eventProcessor.start(system_num_of_net_threads);
- RecProcessStart();
+ RecProcessStart();
init_signals2();
- netProcessor.start();
+ netProcessor.start();
dnsProcessor.start();
@@ -279,9 +279,9 @@ int main(int argc, char * argv[])
//clusterProcessor.init();
- cacheProcessor.start();
+ cacheProcessor.start();
- //udpNet.start(system_num_of_udp_threads); // XXX : broken
+ //udpNet.start(system_num_of_udp_threads); // XXX : broken
//sslNetProcessor.start(getNumSSLThreads());
View
10 example/append-transform/append-transform.c
@@ -24,15 +24,15 @@
/*
* append-transform.c: an example program that appends the text
* contained in a file to all HTTP/text response
- * bodies.
- *
+ * bodies.
*
*
- * Usage:
+ *
+ * Usage:
* (NT): AppendTransform.dll <filename>
* (Solaris): append-transform.so <filename>
- *
- * <filename> is the name of the file containing the
+ *
+ * <filename> is the name of the file containing the
* text to be appended
*
*/
View
20 example/basic-auth/basic-auth.c
@@ -24,9 +24,9 @@
/* basic-auth.c: a plugin that performs basic HTTP proxy
* authentication
*
- *
- * Usage:
- * (NT): BasicAuth.dll
+ *
+ * Usage:
+ * (NT): BasicAuth.dll
* (Solaris): basic-auth.so
*
*/
@@ -84,24 +84,24 @@ base64_decode(const char *input)
static int
authorized(char *user, char *password)
{
- /*
- * This routine checks the validity of the user name and
+ /*
+ * This routine checks the validity of the user name and
* password. Sample NT code is provided for illustration.
* For UNIX systems, enter your own authorization code
- * here.
+ * here.
*/
#if !defined (_WIN32)
#else
- // LogonUser() will work only if the account is set with
+ // LogonUser() will work only if the account is set with
// SE_TCB_NAME privilege. If SE_TCB_NAME is missing,
// Traffic server will attempt to add this privilege to
// the running account, but may fail depending on the access
- // levels provided to the said account. In such a case, an
- // NT systems administrator will have to set the privilege
+ // levels provided to the said account. In such a case, an
+ // NT systems administrator will have to set the privilege
// "Act as part of the operating system" from the NT user manager.
- //
+ //
int nErr = 0;
HANDLE hToken = 0;
BOOL bRet = LogonUser(user, NULL, password, LOGON32_LOGON_NETWORK,
View
6 example/blacklist-0/blacklist-0.c
@@ -21,12 +21,12 @@
limitations under the License.
*/
-/*
- * blacklist-0.c:
+/*
+ * blacklist-0.c:
* original version of blacklist-1, now used for internal testing
*
*
- * Usage:
+ * Usage:
*
*/
View
18 example/blacklist-1/blacklist-1.c
@@ -21,16 +21,16 @@
limitations under the License.
*/
-/* blacklist-1.c: an example program that denies client access
+/* blacklist-1.c: an example program that denies client access
* to blacklisted sites. This plugin illustrates
- * how to use configuration information from a
+ * how to use configuration information from a
* configuration file (blacklist.txt) that can be
* updated through the Traffic Manager UI.
*
*
- * Usage:
- * (NT) : BlackList.dll
- * (Solaris) : blacklist-1.so
+ * Usage:
+ * (NT) : BlackList.dll
+ * (Solaris) : blacklist-1.so
*
*
*/
@@ -111,7 +111,7 @@ handle_dns(INKHttpTxn txnp, INKCont contp)
goto done;
}
- /* We need to lock the sites_mutex as that is the mutex that is
+ /* We need to lock the sites_mutex as that is the mutex that is
protecting the global list of all blacklisted sites. */
ret_code = INKMutexLockTry(sites_mutex, &lock);
@@ -303,9 +303,9 @@ blacklist_plugin(INKCont contp, INKEvent event, void *edata)
break;
}
case INK_EVENT_TIMEOUT:
- /* when mutex lock is not acquired and continuation is rescheduled,
- the plugin is called back with INK_EVENT_TIMEOUT with a NULL
- edata. We need to decide, in which function did the MutexLock
+ /* when mutex lock is not acquired and continuation is rescheduled,
+ the plugin is called back with INK_EVENT_TIMEOUT with a NULL
+ edata. We need to decide, in which function did the MutexLock
failed and call that function again */
if (contp != global_contp) {
cd = (cdata *) INKContDataGet(contp);
View
16 example/bnull-transform/bnull-transform.c
@@ -22,13 +22,13 @@
*/
/* bnull-transform.c: an example program that illustrates a buffered
- * null transform.
- *
+ * null transform.
*
*
- * Usage:
- * (NT): BNullTransform.dll
- * (Solaris): bnull-transform.so
+ *
+ * Usage:
+ * (NT): BNullTransform.dll
+ * (Solaris): bnull-transform.so
*
*
*/
@@ -223,7 +223,7 @@ handle_transform(INKCont contp)
static int
bnull_transform(INKCont contp, INKEvent event, void *edata)
{
- /* Check to see if the transformation has been closed by a
+ /* Check to see if the transformation has been closed by a
call to INKVConnClose. */
if (INKVConnClosedGet(contp)) {
@@ -256,8 +256,8 @@ bnull_transform(INKCont contp, INKEvent event, void *edata)
case INK_EVENT_VCONN_WRITE_READY:
default:
- /* If we get a WRITE_READY event or any other type of event
- (sent, perhaps, because we were reenabled) then we'll attempt
+ /* If we get a WRITE_READY event or any other type of event
+ (sent, perhaps, because we were reenabled) then we'll attempt
to transform more data. */
handle_transform(contp);
break;
View
8 example/cache_scan/cache_scan.cc
@@ -22,7 +22,7 @@
*/
/*
- * cache_scan.cc: use INKCacheScan to print URLs and headers for objects in
+ * cache_scan.cc: use INKCacheScan to print URLs and headers for objects in
* the cache when endpoint /show-cache is requested
*/
@@ -218,8 +218,8 @@ cleanup(INKCont contp)
cache_scan_state *cstate = (cache_scan_state *) INKContDataGet(contp);
if (cstate) {
- // cancel any pending cache scan actions, since we will be destroying the
- // continuation
+ // cancel any pending cache scan actions, since we will be destroying the
+ // continuation
if (cstate->pending_action) {
INKActionCancel(cstate->pending_action);
}
@@ -311,7 +311,7 @@ handle_io(INKCont contp, INKEvent event, void *edata)
{
INKDebug("cache_iter", "ndone: %d total_bytes: %d", INKVIONDoneGet(cstate->write_vio), cstate->total_bytes);
cstate->write_pending = 0;
- // the cache scan handler should call vio reenable when there is
+ // the cache scan handler should call vio reenable when there is
// available data
//INKVIOReenable(cstate->write_vio);
return 0;
View
6 example/file-1/file-1.c
@@ -21,11 +21,11 @@
limitations under the License.
*/
-/* file-1.c: an example program that opens files and reads them
- * into a buffer
+/* file-1.c: an example program that opens files and reads them
+ * into a buffer
*
*
- * Usage:
+ * Usage:
* (NT): File.dll <filename1> <filename2> ...
* (Solaris): file-1.so <filename1> <filename2> ...
*
View
2  example/file_system_cache/DiskCache.cc
@@ -498,7 +498,7 @@ DiskCache::setNumberDirectories(const uint32_t directories)
// set the number of directories to directory with to a power
// each power is another directory level and there is a maximum
- // of 10 levels
+ // of 10 levels
if (directories < _directoryWidth) {
count = 1;
View
4 example/gzip-transform/gzip.c
@@ -169,8 +169,8 @@ gzip_transform_init(INKCont contp, GzipData * data)
data->state = 1;
- /*
- * Mark the output data as having gzip content encoding
+ /*
+ * Mark the output data as having gzip content encoding
*/
INKHttpTxnTransformRespGet(data->txn, &bufp, &hdr_loc);
ce_loc = INKMimeHdrFieldCreate(bufp, hdr_loc);
View
8 example/hello/hello.c
@@ -22,12 +22,12 @@
*/
/* hello.c: an example hello world program
- *
*
*
- * Usage:
- * (NT): Hello.dll
- * (Solaris): hello.so
+ *
+ * Usage:
+ * (NT): Hello.dll
+ * (Solaris): hello.so
*
*
*/
View
34 example/null-transform/null-transform.c
@@ -23,10 +23,10 @@
/* null-transform.c: an example program that does a null transform
* of response body content
- *
*
*
- * Usage:
+ *
+ * Usage:
* (NT): NullTransform.dll
* (Solaris): null-transform.so
*
@@ -85,7 +85,7 @@ handle_transform(INKCont contp)
* ourself. This VIO contains the buffer that we are to read from
* as well as the continuation we are to call when the buffer is
* empty. This is the input VIO (the write VIO for the upstream
- * vconnection).
+ * vconnection).
*/
input_vio = INKVConnWriteVIOGet(contp);
if (input_vio == INK_ERROR_PTR) {
@@ -116,7 +116,7 @@ handle_transform(INKCont contp)
* more WRITE_READY or WRITE_COMPLETE events. For this simplistic
* transformation that means we're done. In a more complex
* transformation we might have to finish writing the transformed
- * data to our output connection.
+ * data to our output connection.
*/
buf_test = INKVIOBufferGet(input_vio);
@@ -141,13 +141,13 @@ handle_transform(INKCont contp)
/* Determine how much data we have left to read. For this null
* transform plugin this is also the amount of data we have left
- * to write to the output connection.
+ * to write to the output connection.
*/
towrite = INKVIONTodoGet(input_vio);
if (towrite > 0) {
/* The amount of data left to read needs to be truncated by
- * the amount of data actually in the read buffer.
+ * the amount of data actually in the read buffer.
*/
avail = INKIOBufferReaderAvail(INKVIOReaderGet(input_vio));
if (towrite > avail) {
@@ -162,7 +162,7 @@ handle_transform(INKCont contp)
}
/* Tell the read buffer that we have read the data and are no
- * longer interested in it.
+ * longer interested in it.
*/
if (INKIOBufferReaderConsume(INKVIOReaderGet(input_vio), towrite)
== INK_ERROR) {
@@ -171,7 +171,7 @@ handle_transform(INKCont contp)
}
/* Modify the input VIO to reflect how much data we've
- * completed.
+ * completed.
*/
if (INKVIONDoneSet(input_vio, INKVIONDoneGet(input_vio) + towrite) == INK_ERROR) {
INKError("[null-plugin] unable to update VIO\n");
@@ -184,21 +184,21 @@ handle_transform(INKCont contp)
}
/* Now we check the input VIO to see if there is data left to
- * read.
+ * read.
*/
if (INKVIONTodoGet(input_vio) > 0) {
if (towrite > 0) {
/* If there is data left to read, then we reenable the output
* connection by reenabling the output VIO. This will wake up
* the output connection and allow it to consume data from the
- * output buffer.
+ * output buffer.
*/
if (INKVIOReenable(data->output_vio) == INK_ERROR) {
INKError("[null-plugin] error reenabling transaction\n");
goto Lerror;
}
/* Call back the input VIO continuation to let it know that we
- * are ready for more data.
+ * are ready for more data.
*/
INKContCall(INKVIOContGet(input_vio), INK_EVENT_VCONN_WRITE_READY, input_vio);
}
@@ -207,7 +207,7 @@ handle_transform(INKCont contp)
* VIO to reflect how much data the output connection should
* expect. This allows the output connection to know when it
* is done reading. We then reenable the output connection so
- * that it can consume the data we just gave it.
+ * that it can consume the data we just gave it.
*/
INKVIONBytesSet(data->output_vio, INKVIONDoneGet(input_vio));
if (INKVIOReenable(data->output_vio) == INK_ERROR) {
@@ -216,7 +216,7 @@ handle_transform(INKCont contp)
}
/* Call back the input VIO continuation to let it know that we
- * have completed the write operation.
+ * have completed the write operation.
*/
INKContCall(INKVIOContGet(input_vio), INK_EVENT_VCONN_WRITE_COMPLETE, input_vio);
}
@@ -230,7 +230,7 @@ static int
null_transform(INKCont contp, INKEvent event, void *edata)
{
/* Check to see if the transformation has been closed by a call to
- * INKVConnClose.
+ * INKVConnClose.
*/
if (INKVConnClosedGet(contp)) {
my_data_destroy(INKContDataGet(contp));
@@ -244,12 +244,12 @@ null_transform(INKCont contp, INKEvent event, void *edata)
/* Get the write VIO for the write operation that was
* performed on ourself. This VIO contains the continuation of
- * our parent transformation. This is the input VIO.
+ * our parent transformation. This is the input VIO.
*/
input_vio = INKVConnWriteVIOGet(contp);
/* Call back the write VIO continuation to let it know that we
- * have completed the write operation.
+ * have completed the write operation.
*/
INKContCall(INKVIOContGet(input_vio), INK_EVENT_ERROR, input_vio);
}
@@ -266,7 +266,7 @@ null_transform(INKCont contp, INKEvent event, void *edata)
default:
/* If we get a WRITE_READY event or any other type of
* event (sent, perhaps, because we were reenabled) then
- * we'll attempt to transform more data.
+ * we'll attempt to transform more data.
*/
handle_transform(contp);
break;
View
10 example/output-header/output-header.c
@@ -21,17 +21,17 @@
limitations under the License.
*/
-/* output_hdr.c: a plugin prints out the client request header
+/* output_hdr.c: a plugin prints out the client request header
* fields to stdout
* A sample internal plugin to use the HdrPrint functions and the INKIOBuffers
* that the functions untilize.
- *
+ *
* The plugin simply prints all the incoming request headers
- *
+ *
*
*
* Note: tested on Solaris only. Probably doesn't compile
- * on NT.
+ * on NT.
*/
#include <stdio.h>
@@ -145,7 +145,7 @@ handle_dns(INKHttpTxn txnp, INKCont contp)
/* We'll get a block pointer back even if there is no data
left to read so check for this condition and break out of
the loop. A block with no data to read means we've exhausted
- buffer of data since if there was more data on a later
+ buffer of data since if there was more data on a later
block in the chain, this block would have been skipped over */
if (block_avail == 0) {
break;
View
12 example/prefetch/test-hns-plugin.c
@@ -27,16 +27,16 @@
*/
-/*
+/*
This plugin tests the Parent Traffic Server handling of parse/prefetch
rules. It prints information to 'stdout' at various stages to verify the
correctness of the parse/prefetch module. It has the following options:
--p. If 0, the plugin returns INK_PREFETCH_DISCONTINUE when called at the
+-p. If 0, the plugin returns INK_PREFETCH_DISCONTINUE when called at the
INK_PREFETCH_PRE_PARSE_HOOK. If 1, the plugin returns
INK_PREFETCH_CONTINUE.
--u. If 0, the plugin returns INK_PREFETCH_DISCONTINUE when called at the
+-u. If 0, the plugin returns INK_PREFETCH_DISCONTINUE when called at the
INK_PREFETCH_EMBEDDED_URL_HOOK. If 1, the plugin returns
INK_PREFETCH_CONTINUE.
@@ -45,12 +45,12 @@ correctness of the parse/prefetch module. It has the following options:
If 2, this field is set to INK_PREFETCH_OBJ_BUF_NEEDED_N_TRANSMITTED
which implies the object is transmitted to the child as well.
--i. If 0, the plugin sets the 'url_response_proto' field in the
- INKPrefetchInfo to INK_PREFETCH_PROTO_UDP. If 1, it sets the
+-i. If 0, the plugin sets the 'url_response_proto' field in the
+ INKPrefetchInfo to INK_PREFETCH_PROTO_UDP. If 1, it sets the
'url_response_proto' field to INK_PREFETCH_PROTO_TCP.
-d. Specifies the directory where the plugin will store all the prefetched
- objects. All prefetched objects are stored in the PkgPreload format in
+ objects. All prefetched objects are stored in the PkgPreload format in
the 'prefetched.objects' file in this directory.
*/
View
2  example/protocol/Protocol.c
@@ -62,7 +62,7 @@ accept_handler(INKCont contp, INKEvent event, void *edata)
break;
default:
- /* Something wrong with the network, if there are any
+ /* Something wrong with the network, if there are any
pending NetAccept, cancel them. */
if (pending_action && !INKActionDone(pending_action))
INKActionCancel(pending_action);
View
20 example/protocol/TxnSM.c
@@ -175,10 +175,10 @@ state_start(INKCont contp, INKEvent event, void *data)
return INK_EVENT_IMMEDIATE;
}
-/* This function is to call proper functions according to the
+/* This function is to call proper functions according to the
VIO argument. If it's read_vio, which means reading request from
client_vc, call state_read_request_from_client. If it's write_vio,
- which means sending response to client_vc, call
+ which means sending response to client_vc, call
state_send_response_to_client. If the event is INK_EVENT_VCONN_EOS,
which means the client closed socket and thus implies the client
drop all jobs between TxnSM and the client, so go to die. */
@@ -323,7 +323,7 @@ static void
load_buffer_cache_data(TxnSM * txn_sm)
{
/* transfer the data from the cache buffer (which must
- fully be consumed on a VCONN_READY event, to the
+ fully be consumed on a VCONN_READY event, to the
server response buffer */
int rdr_avail = INKIOBufferReaderAvail(txn_sm->q_cache_read_buffer_reader);
@@ -417,7 +417,7 @@ state_handle_cache_prepare_for_write(INKCont contp, INKEvent event, INKVConn vc)
return state_build_and_send_request(contp, 0, NULL);
}
-/* Cache miss or error case. Start the process to send the request
+/* Cache miss or error case. Start the process to send the request
the origin server. */
int
state_build_and_send_request(INKCont contp, INKEvent event, void *data)
@@ -481,8 +481,8 @@ state_dns_lookup(INKCont contp, INKEvent event, INKHostLookupResult host_info)
/* Net Processor calls back, if succeeded, the net_vc is returned.
Note here, even if the event is INK_EVENT_NET_CONNECT, it doesn't
- mean the net connection is set up because INKNetConnect is non-blocking.
- Do VConnWrite to the net_vc, if fails, that means there is no net
+ mean the net connection is set up because INKNetConnect is non-blocking.
+ Do VConnWrite to the net_vc, if fails, that means there is no net
connection. */
int
state_connect_to_server(INKCont contp, INKEvent event, INKVConn vc)
@@ -553,7 +553,7 @@ state_interface_with_server(INKCont contp, INKEvent event, INKVIO vio)
return state_write_to_cache(contp, event, vio);
/* Otherwise, handle events from server. */
case INK_EVENT_VCONN_READ_READY:
- /* Actually, we shouldn't get READ_COMPLETE because we set bytes
+ /* Actually, we shouldn't get READ_COMPLETE because we set bytes
count to be INT_MAX. */
case INK_EVENT_VCONN_READ_COMPLETE:
return state_read_response_from_server(contp, event, vio);
@@ -639,7 +639,7 @@ state_read_response_from_server(INKCont contp, INKEvent event, INKVIO vio)
INKVIOReenable(txn_sm->q_cache_write_vio);
txn_sm->q_block_bytes_read = bytes_read;
/*
- txn_sm->q_cache_write_vio = INKVConnWrite (txn_sm->q_cache_vc,
+ txn_sm->q_cache_write_vio = INKVConnWrite (txn_sm->q_cache_vc,
contp,
txn_sm->q_cache_response_buffer_reader,
bytes_read);
@@ -669,7 +669,7 @@ state_write_to_cache(INKCont contp, INKEvent event, INKVIO vio)
case INK_EVENT_VCONN_WRITE_COMPLETE:
INKDebug("protocol", "nbytes %d, ndone %d", INKVIONBytesGet(vio), INKVIONDoneGet(vio));
- /* Since the first write is through INKVConnWrite, which aleady consume
+ /* Since the first write is through INKVConnWrite, which aleady consume
the data in cache_buffer_reader, don't consume it again. */
if (txn_sm->q_cache_response_length > 0 && txn_sm->q_block_bytes_read > 0)
INKIOBufferReaderConsume(txn_sm->q_cache_response_buffer_reader, txn_sm->q_block_bytes_read);
@@ -710,7 +710,7 @@ state_write_to_cache(INKCont contp, INKEvent event, INKVIO vio)
}
/* If the response has been fully written into the client_vc,
- which means this txn is done, close the client_vc. Otherwise,
+ which means this txn is done, close the client_vc. Otherwise,
reenable the write_vio. */
int
state_send_response_to_client(INKCont contp, INKEvent event, INKVIO vio)
View
26 example/query_remap/query_remap.c
@@ -66,20 +66,20 @@ int tsremap_new_instance(int argc,char *argv[],ihandle *ih,char *errbuf,int errb
// 2: query param to hash
// 3,4,... : server hostnames
query_remap_info *qri = (query_remap_info*) INKmalloc(sizeof(query_remap_info));
-
+
qri->param_name = INKstrdup(argv[2]);
qri->param_len = strlen(qri->param_name);
qri->num_hosts = argc - 3;
qri->hosts = (char**) INKmalloc(qri->num_hosts*sizeof(char*));
- INKDebug(PLUGIN_NAME, " - Hash using query parameter [%s] with %d hosts",
- qri->param_name, qri->num_hosts);
+ INKDebug(PLUGIN_NAME, " - Hash using query parameter [%s] with %d hosts",
+ qri->param_name, qri->num_hosts);
for (i=0; i < qri->num_hosts; ++i) {
qri->hosts[i] = INKstrdup(argv[i+3]);
INKDebug(PLUGIN_NAME, " - Host %d: %s", i, qri->hosts[i]);
}
-
+
*ih = (ihandle)qri;
INKDebug(PLUGIN_NAME, "created instance %p", *ih);
return 0;
@@ -93,13 +93,13 @@ void tsremap_delete_instance(ihandle ih)
if (ih) {
query_remap_info *qri = (query_remap_info*)ih;
- if (qri->param_name)
+ if (qri->param_name)
INKfree(qri->param_name);
if (qri->hosts) {
for (i=0; i < qri->num_hosts; ++i) {
INKfree(qri->hosts[i]);
}
- INKfree(qri->hosts);
+ INKfree(qri->hosts);
}
INKfree(qri);
}
@@ -117,7 +117,7 @@ int tsremap_remap(ihandle ih, rhandle rh, TSRemapRequestInfo *rri)
}
INKDebug(PLUGIN_NAME, "tsremap_remap request: %.*s", rri->orig_url_size, rri->orig_url);
-
+
if (rri && rri->request_query && rri->request_query_size > 0) {
char *q, *s, *key;
@@ -130,7 +130,7 @@ int tsremap_remap(ihandle ih, rhandle rh, TSRemapRequestInfo *rri)
//parse query parameters
for (key = strsep(&s, "&"); key != NULL; key = strsep(&s, "&")) {
char *val = strchr(key, '=');
- if (val && (size_t)(val-key) == qri->param_len &&
+ if (val && (size_t)(val-key) == qri->param_len &&
!strncmp(key, qri->param_name, qri->param_len)) {
++val;
//the param key matched the configured param_name
@@ -140,7 +140,7 @@ int tsremap_remap(ihandle ih, rhandle rh, TSRemapRequestInfo *rri)
break;
}
}
-
+
INKfree(q);
if (hostidx >= 0) {
@@ -149,23 +149,23 @@ int tsremap_remap(ihandle ih, rhandle rh, TSRemapRequestInfo *rri)
//copy the chosen host into rri
memcpy(rri->new_host, qri->hosts[hostidx], rri->new_host_size);
- INKDebug(PLUGIN_NAME, "host changed from [%.*s] to [%.*s]",
+ INKDebug(PLUGIN_NAME, "host changed from [%.*s] to [%.*s]",
rri->request_host_size, rri->request_host,
rri->new_host_size, rri->new_host);
return 1; //host has been modified
}
}
}
-
+
//the request was not modified, TS will use the toURL from the remap rule
- INKDebug(PLUGIN_NAME, "request not modified");
+ INKDebug(PLUGIN_NAME, "request not modified");
return 0;
}
// FNV (Fowler/Noll/Vo) hash
// (description: http://www.isthe.com/chongo/tech/comp/fnv/index.html)
-uint32_t
+uint32_t
hash_fnv32(char *buf, size_t len)
{
uint32_t hval = (uint32_t)0x811c9dc5; //FNV1_32_INIT
View
52 example/redirect-1/redirect-1.c
@@ -21,14 +21,14 @@
limitations under the License.
*/
-/*
- * redirect-1.c:
- * an example program which redirects clients based on the source IP
+/*
+ * redirect-1.c:
+ * an example program which redirects clients based on the source IP
*
*
- * Usage:
- * (NT): Redirect.dll block_ip url_redirect
- * (Solaris): redirect-1.so block_ip url_redirect
+ * Usage:
+ * (NT): Redirect.dll block_ip url_redirect
+ * (Solaris): redirect-1.so block_ip url_redirect
*
*
*/
@@ -52,8 +52,8 @@ static in_addr_t ip_deny;
static unsigned int ip_deny;
#endif
-/*
- * uncoupled statistics variables:
+/*
+ * uncoupled statistics variables:
*/
static INKStat method_count_redirected_connect;
static INKStat method_count_redirected_delete;
@@ -68,8 +68,8 @@ static INKStat method_count_redirected_trace;
static INKStat method_count_redirected_unknown;
-/*
- * coupled statistics variables:
+/*
+ * coupled statistics variables:
* coupled stat category for the following stats
* is request_outcomes. The relationship among the stats is:
* requests_all = requests_redirects + requests_unchanged
@@ -104,8 +104,8 @@ handle_client_lookup(INKHttpTxn txnp, INKCont contp)
char *clientstring;
struct in_addr tempstruct;
- /*
- * Here we declare local coupled statistics variables:
+ /*
+ * Here we declare local coupled statistics variables:
*/
INKCoupledStat local_request_outcomes;
INKStat local_requests_all;
@@ -113,13 +113,13 @@ handle_client_lookup(INKHttpTxn txnp, INKCont contp)
INKStat local_requests_unchanged;
/*
- * Create local copy of the global coupled stat category:
+ * Create local copy of the global coupled stat category:
*/
local_request_outcomes = INKStatCoupledLocalCopyCreate("local_request_outcomes", request_outcomes);
- /*
- * Create the local copies of the global coupled stats:
+ /*
+ * Create the local copies of the global coupled stats:
*/
local_requests_all = INKStatCoupledLocalAdd(local_request_outcomes, "requests.all.local", INKSTAT_TYPE_FLOAT);
local_requests_redirects = INKStatCoupledLocalAdd(local_request_outcomes,
@@ -128,8 +128,8 @@ handle_client_lookup(INKHttpTxn txnp, INKCont contp)
"requests.unchanged.local", INKSTAT_TYPE_INT64);
- /*
- * Increment the count of total requests:
+ /*
+ * Increment the count of total requests:
* (it is more natural to treat the number of requests as an
* integer, but we declare this a FLOAT in order to demonstrate
* how to increment coupled FLOAT stats)
@@ -168,7 +168,7 @@ handle_client_lookup(INKHttpTxn txnp, INKCont contp)
goto done;
}
- /*
+ /*
* Check to see if the client is already headed to the redirect site.
*/
if (strncmp(host, url_redirect, host_length) == 0) {
@@ -188,8 +188,8 @@ handle_client_lookup(INKHttpTxn txnp, INKCont contp)
INKHandleMLocRelease(bufp, hdr_loc, url_loc);
INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
- /*
- * Increment the local redirect stat and do global update:
+ /*
+ * Increment the local redirect stat and do global update:
*/
INKStatIncrement(local_requests_redirects);
INKStatsCoupledUpdate(local_request_outcomes);
@@ -200,8 +200,8 @@ handle_client_lookup(INKHttpTxn txnp, INKCont contp)
}
done:
- /*
- * Increment the local number unchanged stat and do global update:
+ /*
+ * Increment the local number unchanged stat and do global update:
*/
INKStatIncrement(local_requests_unchanged);
INKStatsCoupledUpdate(local_request_outcomes);
@@ -236,7 +236,7 @@ handle_response(INKHttpTxn txnp)
INKMimeHdrFieldInsert(bufp, hdr_loc, newfield_loc, -1);
- /*
+ /*
* Note that we can't directly use errormsg_body, as INKHttpTxnErrorBodySet()
* will try to free the passed buffer with INKfree().
*/
@@ -278,8 +278,8 @@ redirect_plugin(INKCont contp, INKEvent event, void *edata)
-/*
- * Global statistics functions:
+/*
+ * Global statistics functions:
*/
void
@@ -406,7 +406,7 @@ INKPluginInit(int argc, const char *argv[])
block_ip = INKstrdup(argv[1]);
/*
- * The Location header must contain an absolute URI:
+ * The Location header must contain an absolute URI:
*/
url_redirect = INKstrdup(argv[2]);
View
6 example/replace-header/replace-header.c
@@ -21,12 +21,12 @@
limitations under the License.
*/
-/*
- * replace-header.c:
+/*
+ * replace-header.c:
* an example program...
*
*
- * Usage:
+ * Usage:
*
*
*/
View
36 example/response-header-1/response-header-1.c
@@ -21,8 +21,8 @@
limitations under the License.
*/
-/*
- * response-header-1.c:
+/*
+ * response-header-1.c:
* an example program which illustrates adding and manipulating
* an HTTP response MIME header:
*
@@ -33,16 +33,16 @@
*
* add read_resp_header hook
* get http response header
- * if 200, then
+ * if 200, then
* add mime extension header with count of zero
* add mime extension header with date response was received
* add "Cache-Control: public" header
- * else if 304, then
+ * else if 304, then
* retrieve cached header
* get old value of mime header count
* increment mime header count
* store mime header with new count
- *
+ *
*
*
*/
@@ -99,8 +99,8 @@ modify_header(INKHttpTxn txnp, INKCont contp)
new_field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc);
INKDebug("resphdr", "Created new resp field with loc %d", new_field_loc);
- /* copy name/values created at init
- * ( "x-num-served-from-cache" ) : ( "0" )
+ /* copy name/values created at init
+ * ( "x-num-served-from-cache" ) : ( "0" )
*/
INKMimeHdrFieldCopy(resp_bufp, resp_loc, new_field_loc, hdr_bufp, hdr_loc, field_loc);
@@ -117,7 +117,7 @@ modify_header(INKHttpTxn txnp, INKCont contp)
INKMimeHdrFieldValueInsert(resp_bufp, resp_loc, new_field_loc,
INK_HTTP_VALUE_PUBLIC, strlen(INK_HTTP_VALUE_PUBLIC), -1);
- /*
+ /*
* mimehdr2_name = INKstrdup( "x-date-200-recvd" ) : CurrentDateTime
*/
new_field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc);
@@ -172,14 +172,14 @@ modify_header(INKHttpTxn txnp, INKCont contp)
* Since INKMimeHdrFieldValueGet returned with valid values
* are we also guaranteed that INKMimeHdrFieldValueGetUint returns
* valid values? There is no erro code for INKMimeHdrFieldValueGetUint
- * and 0 is a valid value.
+ * and 0 is a valid value.
*/
/* Get the cached MIME value for this name in this HTTP header */
/*
- num_refreshes =
- INKMimeHdrFieldValueGetUint(cached_bufp, cached_loc,
+ num_refreshes =
+ INKMimeHdrFieldValueGetUint(cached_bufp, cached_loc,
cached_field_loc, 0);
- INKDebug("resphdr",
+ INKDebug("resphdr",
"Cached header shows %d refreshes so far", num_refreshes );
num_refreshes++ ;
@@ -189,11 +189,11 @@ modify_header(INKHttpTxn txnp, INKCont contp)
* in resp_bufp, resp_loc
*
* Create a new MIME field/value. Cached value has been incremented.
- * Insert new MIME field/value into the server response buffer,
+ * Insert new MIME field/value into the server response buffer,
* allow HTTP processing to continue. This will update
- * (indirectly invalidates) the cached HTTP headers MIME field.
+ * (indirectly invalidates) the cached HTTP headers MIME field.
* It is apparently not necessary to update all of the MIME fields
- * in the in-process response in order to have the cached response
+ * in the in-process response in order to have the cached response
* become invalid.
*/
new_field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc);
@@ -309,8 +309,8 @@ INKPluginInit(int argc, const char *argv[])
mimehdr1_name = INKstrdup("x-num-served-from-cache");
mimehdr1_value = INKstrdup("0");
- /* Create name here and set DateTime value when o.s.
- * response 200 is recieved
+ /* Create name here and set DateTime value when o.s.
+ * response 200 is recieved
*/
mimehdr2_name = INKstrdup("x-date-200-recvd");
@@ -328,7 +328,7 @@ INKPluginInit(int argc, const char *argv[])
/*
* The following code demonstrates how to extract the field_loc from the header.
- * In this plugin, the init buffer and thus field_loc never changes. Code
+ * In this plugin, the init buffer and thus field_loc never changes. Code
* similar to this may be used to extract header fields from any buffer.
*/
View
16 example/server-transform/server-transform.c
@@ -21,13 +21,13 @@
limitations under the License.
*/
-/* server-transform.c: an example program that sends response content
- * to a server to be transformed, and sends the
- * transformed content to the client
+/* server-transform.c: an example program that sends response content
+ * to a server to be transformed, and sends the
+ * transformed content to the client
*
*
- * Usage:
- * (NT): ServerTransform.dll
+ * Usage:
+ * (NT): ServerTransform.dll
* (Solaris): server-transform.so
*
*
@@ -718,10 +718,10 @@ cache_response_ok(INKHttpTxn txnp)
{
/* Is the response we're reading from cache OK for
* transformation. This is a good place to check the cached
- * response to see if it is transformable. The default
+ * response to see if it is transformable. The default
* behavior is to cache transformed content; therefore
* to avoid transforming twice we will not transform
- * content served from the cache.
+ * content served from the cache.
*/
return 0;
}
@@ -732,7 +732,7 @@ server_response_ok(INKHttpTxn txnp)
/* Is the response the server sent OK for transformation. This is
* a good place to check the server's response to see if it is
* transformable. In this example, we will transform only "200 OK"
- * responses.
+ * responses.
*/
INKMBuffer bufp;
View
2  example/session-1/session-1.c
@@ -24,7 +24,7 @@
/* session-1.c: a plugin that illustrates how to use
* session hooks
*
- *
+ *
* Usage: session-1.so
*
*/
View
8 example/thread-1/thread-1.c
@@ -21,12 +21,12 @@
limitations under the License.
*/
-/* thread-1.c: an example program that creates a thread
- *
+/* thread-1.c: an example program that creates a thread
*
*
- * Usage:
- * (NT): Thread.dll
+ *
+ * Usage:
+ * (NT): Thread.dll
* (Solaris): thread-1.so
*
*
View
10 example/thread-pool/psi.c
@@ -21,11 +21,11 @@
limitations under the License.
*/
-/*
- *
+/*
*
*
- * Usage:
+ *
+ * Usage:
* (NT): psi.dll
* (Solaris): psi.so
*
@@ -39,7 +39,7 @@
* The plugin illustrates how to use a pool of threads in order to do blocking
* calls (here, some disk i/o) in a Traffic Server plugin.
*
- *
+ *
* Details:
*
* Refer to README file.
@@ -138,7 +138,7 @@ static int trylock_handler(INKCont contp, INKEvent event, void *edata);
Allocate and initialize a ContData structure associated to a transaction
Input:
- Output:
+ Output:
Return Value:
Pointer on a new allocated ContData structure
-------------------------------------------------------------------------*/
View
8 example/thread-pool/test/SDKTest/psi_server.c
@@ -21,9 +21,9 @@
limitations under the License.
*/
-/* SimSynthServerCache.c
+/* SimSynthServerCache.c
+ *
*
- *
* Description:
* Simulate server response that contains:
* - PSI header
@@ -31,7 +31,7 @@
*
* Ratio for generating PSI response is specifid in config file.
*
- * Added Options in Synth_server.config -
+ * Added Options in Synth_server.config -
* psi_ratio : percentage of response with psi embedded we want to generate
*/
@@ -186,7 +186,7 @@ INKResponsePut(void **resp_id /* return */ ,
}
}
- /* return NULL as the resp_id to indicate
+ /* return NULL as the resp_id to indicate
* if it is the last INKResponsePut call */
if (rid->bytes_not_sent <= 0 || rid->status_code != 200) {
free(rid);
View
24 iocore/aio/AIO.cc
@@ -67,7 +67,7 @@ aio_stats_cb(const char *name, RecDataT data_type, RecData *data, RecRawStatBloc
// The RecGetGlobalXXX stat functions are cheaper than the
// RecGetXXX functions. The Global ones are expensive
// for increments and decrements. But for AIO stats we
- // only do Sets and Gets, so they are cheaper in our case.
+ // only do Sets and Gets, so they are cheaper in our case.
RecGetGlobalRawStatSum(aio_rsb, id, &sum);
RecGetGlobalRawStatCount(aio_rsb, id, &count);
@@ -193,13 +193,13 @@ struct AIOThreadInfo:public Continuation
/* priority scheduling */
/* Have 2 queues per file descriptor - A queue for http requests and another
- for non-http (streaming) request. Each file descriptor has a lock
- and condition variable associated with it. A dedicated number of threads
- (THREADS_PER_DISK) wait on the condition variable associated with the
- file descriptor. The cache threads try to put the request in the
- appropriate queue. If they fail to acquire the lock, they put the
- request in the atomic list. Requests are served in the order of
- highest priority first. If both the queues are empty, the aio threads
+ for non-http (streaming) request. Each file descriptor has a lock
+ and condition variable associated with it. A dedicated number of threads
+ (THREADS_PER_DISK) wait on the condition variable associated with the
+ file descriptor. The cache threads try to put the request in the
+ appropriate queue. If they fail to acquire the lock, they put the
+ request in the atomic list. Requests are served in the order of
+ highest priority first. If both the queues are empty, the aio threads
check if there is any request on the other disks */
@@ -247,7 +247,7 @@ aio_insert(AIOCallback *op, AIO_Reqs *req)
num_requests++;
req->queued++;
#endif
- if (op->aiocb.aio_reqprio == AIO_LOWEST_PRIORITY) // http request
+ if (op->aiocb.aio_reqprio == AIO_LOWEST_PRIORITY) // http request
{
AIOCallback *cb = (AIOCallback *) req->http_aio_todo.tail;
if (!cb)
@@ -320,9 +320,9 @@ aio_queue_req(AIOCallbackInternal *op)
/* insert a new entry */
req = aio_init_fildes(op->aiocb.aio_fildes);
} else {
- /* a new entry was inserted between the time we checked the
- aio_reqs and acquired the mutex. check the aio_reqs array to
- make sure the entry inserted does not correspond to the current
+ /* a new entry was inserted between the time we checked the
+ aio_reqs and acquired the mutex. check the aio_reqs array to
+ make sure the entry inserted does not correspond to the current
file descriptor */
for (thread_ndx = 0; thread_ndx < num_filedes; thread_ndx++) {
if (aio_reqs[thread_ndx]->filedes == op->aiocb.aio_fildes) {
View
4 iocore/aio/I_AIO.h
@@ -25,8 +25,8 @@
Async Disk IO operations.
-
-
+
+
****************************************************************************/
#if !defined (_I_AIO_h_)
#define _I_AIO_h_
View
2  iocore/aio/NTAIO.cc
@@ -25,7 +25,7 @@
NTAIO.cc
-
+
****************************************************************************/
#if !defined (_WIN_9xMe)
View
4 iocore/aio/P_AIO.h
@@ -25,8 +25,8 @@
Async Disk IO operations.
-
-
+
+
****************************************************************************/
#ifndef _P_AIO_h_
#define _P_AIO_h_
View
2  iocore/block-cache/BC_OpenSegment.cc
@@ -69,7 +69,7 @@ class BCOS_impl:public BC_OpenSegment
Queue<BlockCacheSegmentVConnection> m_readers; // who is reading
/**
who is writing. XXX: This implicitly assumes only one writer. I
- think this assumption is reasonable.
+ think this assumption is reasonable.
*/
BlockCacheSegmentVConnection *m_writer;
};
View
12 iocore/block-cache/I_BlockCacheSegmentVConnection.h
@@ -39,12 +39,12 @@
- pinning
- extra metadata
- how should partitioning be specified?
-
+
For testability, these can be created and activated without external
structures, e.g. I_BlockCacheVConnection, BC_OpenDir,
BC_OpenSegment. If the external structures aren't supplied then
default behavior is performed instead.
-
+
*/
class BlockCacheSegmentVConnection:public VConnection
@@ -68,7 +68,7 @@ class BlockCacheSegmentVConnection:public VConnection
@param seg BC_OpenSegment to associate with.
@param type which type of access
-
+
*/
virtual void setBCOpenSegment(BC_OpenSegment * seg, AccessType type);
@@ -82,7 +82,7 @@ class BlockCacheSegmentVConnection:public VConnection
about pending do_io_writes?</i></b> Writes are not serviced until
after the sync. It only is valid to call this after a successful
do_io_close().
-
+
@param c Caller
@return Action* Canceling this cancels the callback, but sync
will still occur.
@@ -142,7 +142,7 @@ class BlockCacheSegmentVConnection:public VConnection
and there is an active reader, then this call fails and the
BlockCacheVConnection lives. Otherwise, it succeeds and
BlockCacheVConnection is closed and data thrown away on disk.
-
+
This is similar to do_io_close with error (i.e. abort), but we don't
allow VC to die if readers are still active. So, caller should only
call this if they are prepared to stay alive until the object is
@@ -174,7 +174,7 @@ class BlockCacheSegmentVConnection:public VConnection
This should really be in a separate header file. The individual
definitions will actually be spread across multiple files, not just
the BlockCacheSegmentVConnection.cc file.
-
+
*/
struct BlockCacheSegmentVConnection_util
{
View
4 iocore/block-cache/I_BlockCacheVConnection.h
@@ -80,7 +80,7 @@ class BlockCacheVConnection:public VConnection
BlockCacheKey_util::new_from_segmentid).
@param len how much data will be written (estimated).
@return cancels the callback.
-
+
*/
Action *open_unabortable_write_segment(Continuation * c, BlockCacheKey * key, int len) = 0;
@@ -101,7 +101,7 @@ class BlockCacheVConnection:public VConnection
@param key of segment to write (this should been created with
BlockCacheKey_util::new_from_segmentid).
@return cancels the callback.
-
+
*/
Action *open_read_segment(Continuation * c, BlockCacheKey * key) = 0;
View
10 iocore/block-cache/P_AtomicDisk.h
@@ -35,7 +35,7 @@ class MIOBuffer;
handle large writes to disk so that they appear to complete
atomically, but use AIO to do it.
-
+
Like other processors, this doesn't have a lock or dedicated thread
of its own. It uses the caller's Continuation's lock and thread for
activity.
@@ -52,7 +52,7 @@ class AtomicDisk
void init();
/**
write IOBufferBlock chain to disk starting at offset.
-
+
data is written out with header and footer blocked into 512 byte
regions.
<pre>
@@ -86,7 +86,7 @@ class AtomicDisk
Action *startRead(Continuation * c, int offset, char *buf);
/**
return how much data in disk region. This region may or may not
- actually be valid (i.e. completely written correctly)
+ actually be valid (i.e. completely written correctly)
@param descriptor
*/
int length(void *descriptor);
@@ -95,10 +95,10 @@ class AtomicDisk
successful if all data was written down,
failure if any of header sequence #s mismatch.
-
+
Callback c when complete with success or failure. Cancel Action
to avoid callback.
-
+
@return Action* Cancellable
@param c Continuation to be called back when complete.
@param descriptor descriptor returned by startRead
View
4 iocore/block-cache/P_BC_OpenDir.h
@@ -60,7 +60,7 @@ class BC_OpenDir:public Continuation
When considering each operation (AccessType), we have to consider
the following situations:
-
+
<ul>
<li> A. no BC_OpenSegment, no Dir entry exists.
<li> B. no BC_OpenSegment, a Dir entry exists (because of hash
@@ -124,7 +124,7 @@ class BC_OpenDir:public Continuation
@param key desired BlockCacheKey of new or existing entry
@param access_type mode of access to the data.
@return BC_OpenSegment* newly created or existing BC_OpenSegment
-
+
*/
BC_OpenSegment *lookupOrCreateOpenSegment(BlockCacheKey * key, AccessType access_type);
View
6 iocore/block-cache/P_BC_OpenDirTable.h
@@ -41,16 +41,16 @@ class BC_OpenDirTable:public Continuation
virtual ~ BC_OpenDirTable();
/**
Return BC_OpenDir entry for key.
-
+
if found in table, then return it.
if found, but in process of being removed, or if not found in
table, then create new BC_OpenDir for key, insert into table and
return it.
-
+
@param key desired BlockCacheKey of new or existing entry
@return newly created or existing BC_OpenDir
-
+
*/
BC_OpenDir *lookupOrCreateOpenDir(BlockCacheKey * key);
private:
View
14 iocore/block-cache/P_BC_OpenSegment.h
@@ -120,32 +120,32 @@ class BC_OpenSegment:public Continuation
@param c caller
@return Action* Cancelling this cancels the callback, but doesn't
cancel the remove.
-
+
*/
Action *remove(Continuation * c);
/**
Wait for directory log to write out.
-
+
@param c caller
@return Action* Cancelling this cancels the callback, but doesn't
cancel the syncing of directory and log to disk.
-
+
*/
Action *sync(Continuation * c);
/**
register BlockVConnection as writer
-
- @param vc
+
+ @param vc
*/
void registerWriter(BlockCacheSegmentVConnection * vc);
/**
register BlockVConnection as reader
-
- @param vc
+
+ @param vc
*/
void registerReader(BlockCacheSegmentVConnection * vc);
View
12 iocore/block-cache/P_BlockCacheDir.h
@@ -27,9 +27,9 @@