nutcracker 0.2.4.mac9 → 0.2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. data/README.md +13 -46
  2. data/Rakefile +20 -15
  3. data/bin/nutcracker +1 -6
  4. data/ext/nutcracker/ChangeLog +0 -9
  5. data/ext/nutcracker/LICENSE +0 -0
  6. data/ext/nutcracker/Makefile.am +0 -0
  7. data/ext/nutcracker/Makefile.in +149 -66
  8. data/ext/nutcracker/NOTICE +0 -0
  9. data/ext/nutcracker/README.md +11 -13
  10. data/ext/nutcracker/aclocal.m4 +201 -112
  11. data/ext/nutcracker/conf/nutcracker.leaf.yml +0 -0
  12. data/ext/nutcracker/conf/nutcracker.root.yml +0 -0
  13. data/ext/nutcracker/conf/nutcracker.yml +0 -0
  14. data/ext/nutcracker/config.h.in +0 -15
  15. data/ext/nutcracker/config/config.guess +84 -23
  16. data/ext/nutcracker/config/config.sub +93 -23
  17. data/ext/nutcracker/config/depcomp +81 -35
  18. data/ext/nutcracker/config/install-sh +122 -109
  19. data/ext/nutcracker/config/ltmain.sh +721 -1053
  20. data/ext/nutcracker/config/missing +29 -20
  21. data/ext/nutcracker/configure +2311 -2113
  22. data/ext/nutcracker/configure.ac +3 -35
  23. data/ext/nutcracker/contrib/Makefile.am +0 -0
  24. data/ext/nutcracker/contrib/Makefile.in +107 -41
  25. data/ext/nutcracker/contrib/yaml-0.1.4.tar.gz +0 -0
  26. data/ext/nutcracker/extconf.rb +5 -3
  27. data/ext/nutcracker/m4/libtool.m4 +492 -553
  28. data/ext/nutcracker/m4/ltoptions.m4 +6 -7
  29. data/ext/nutcracker/m4/ltversion.m4 +5 -5
  30. data/ext/nutcracker/m4/lt~obsolete.m4 +3 -9
  31. data/ext/nutcracker/notes/c-styleguide.txt +0 -0
  32. data/ext/nutcracker/notes/debug.txt +0 -0
  33. data/ext/nutcracker/notes/memcache.txt +0 -0
  34. data/ext/nutcracker/notes/recommendation.md +2 -21
  35. data/ext/nutcracker/notes/redis.md +9 -9
  36. data/ext/nutcracker/notes/socket.txt +0 -0
  37. data/ext/nutcracker/scripts/nutcracker.init +0 -0
  38. data/ext/nutcracker/scripts/nutcracker.spec +0 -0
  39. data/ext/nutcracker/scripts/redis-check.py +0 -0
  40. data/ext/nutcracker/scripts/redis-check.sh +0 -9
  41. data/ext/nutcracker/src/Makefile.am +1 -1
  42. data/ext/nutcracker/src/Makefile.in +153 -74
  43. data/ext/nutcracker/src/hashkit/Makefile.am +0 -1
  44. data/ext/nutcracker/src/hashkit/Makefile.in +64 -39
  45. data/ext/nutcracker/src/hashkit/nc_crc32.c +0 -0
  46. data/ext/nutcracker/src/hashkit/nc_fnv.c +0 -0
  47. data/ext/nutcracker/src/hashkit/nc_hashkit.h +0 -2
  48. data/ext/nutcracker/src/hashkit/nc_hsieh.c +0 -0
  49. data/ext/nutcracker/src/hashkit/nc_jenkins.c +0 -0
  50. data/ext/nutcracker/src/hashkit/nc_ketama.c +0 -0
  51. data/ext/nutcracker/src/hashkit/nc_md5.c +0 -0
  52. data/ext/nutcracker/src/hashkit/nc_modula.c +6 -18
  53. data/ext/nutcracker/src/hashkit/nc_murmur.c +0 -0
  54. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.c +0 -0
  55. data/ext/nutcracker/src/hashkit/nc_random.c +0 -0
  56. data/ext/nutcracker/src/nc.c +0 -0
  57. data/ext/nutcracker/src/nc_array.c +0 -0
  58. data/ext/nutcracker/src/nc_array.h +0 -0
  59. data/ext/nutcracker/src/nc_client.c +0 -0
  60. data/ext/nutcracker/src/nc_client.h +0 -0
  61. data/ext/nutcracker/src/nc_conf.c +35 -14
  62. data/ext/nutcracker/src/nc_conf.h +1 -1
  63. data/ext/nutcracker/src/nc_connection.c +0 -0
  64. data/ext/nutcracker/src/nc_connection.h +0 -0
  65. data/ext/nutcracker/src/nc_core.c +26 -29
  66. data/ext/nutcracker/src/nc_core.h +5 -13
  67. data/ext/nutcracker/src/{nc_epoll.c → nc_event.c} +30 -94
  68. data/ext/nutcracker/src/nc_event.h +13 -33
  69. data/ext/nutcracker/src/nc_log.c +0 -0
  70. data/ext/nutcracker/src/nc_log.h +0 -0
  71. data/ext/nutcracker/src/nc_mbuf.c +0 -0
  72. data/ext/nutcracker/src/nc_mbuf.h +0 -0
  73. data/ext/nutcracker/src/nc_message.c +0 -0
  74. data/ext/nutcracker/src/nc_message.h +0 -2
  75. data/ext/nutcracker/src/nc_proxy.c +8 -8
  76. data/ext/nutcracker/src/nc_proxy.h +0 -0
  77. data/ext/nutcracker/src/nc_queue.h +0 -0
  78. data/ext/nutcracker/src/nc_rbtree.c +0 -0
  79. data/ext/nutcracker/src/nc_rbtree.h +0 -0
  80. data/ext/nutcracker/src/nc_request.c +3 -3
  81. data/ext/nutcracker/src/nc_response.c +6 -4
  82. data/ext/nutcracker/src/nc_server.c +12 -14
  83. data/ext/nutcracker/src/nc_server.h +0 -0
  84. data/ext/nutcracker/src/nc_signal.c +0 -0
  85. data/ext/nutcracker/src/nc_signal.h +0 -0
  86. data/ext/nutcracker/src/nc_stats.c +21 -16
  87. data/ext/nutcracker/src/nc_stats.h +4 -3
  88. data/ext/nutcracker/src/nc_string.c +0 -0
  89. data/ext/nutcracker/src/nc_string.h +0 -0
  90. data/ext/nutcracker/src/nc_util.c +0 -16
  91. data/ext/nutcracker/src/nc_util.h +0 -1
  92. data/ext/nutcracker/src/proto/Makefile.am +0 -0
  93. data/ext/nutcracker/src/proto/Makefile.in +60 -32
  94. data/ext/nutcracker/src/proto/nc_memcache.c +0 -0
  95. data/ext/nutcracker/src/proto/nc_proto.h +0 -0
  96. data/ext/nutcracker/src/proto/nc_redis.c +4 -17
  97. data/lib/nutcracker.rb +2 -187
  98. data/lib/nutcracker/version.rb +1 -1
  99. metadata +10 -256
  100. data/ext/nutcracker/Makefile +0 -643
  101. data/ext/nutcracker/autom4te.cache/output.0 +0 -18664
  102. data/ext/nutcracker/autom4te.cache/output.1 +0 -18664
  103. data/ext/nutcracker/autom4te.cache/output.2 +0 -18664
  104. data/ext/nutcracker/autom4te.cache/requests +0 -494
  105. data/ext/nutcracker/autom4te.cache/traces.0 +0 -2415
  106. data/ext/nutcracker/autom4te.cache/traces.1 +0 -945
  107. data/ext/nutcracker/autom4te.cache/traces.2 +0 -2415
  108. data/ext/nutcracker/config.h +0 -332
  109. data/ext/nutcracker/config.log +0 -2684
  110. data/ext/nutcracker/config.status +0 -2317
  111. data/ext/nutcracker/contrib/Makefile +0 -494
  112. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile +0 -736
  113. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0 +0 -13102
  114. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1 +0 -13085
  115. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.2 +0 -13085
  116. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests +0 -476
  117. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.0 +0 -2339
  118. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1 +0 -545
  119. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2 +0 -2339
  120. data/ext/nutcracker/contrib/yaml-0.1.4/config.h +0 -81
  121. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in~ +0 -80
  122. data/ext/nutcracker/contrib/yaml-0.1.4/config.log +0 -688
  123. data/ext/nutcracker/contrib/yaml-0.1.4/config.status +0 -2032
  124. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/annotated.html +0 -51
  125. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/bc_s.png +0 -0
  126. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/classes.html +0 -41
  127. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/closed.png +0 -0
  128. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.css +0 -656
  129. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.png +0 -0
  130. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/files.html +0 -40
  131. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions.html +0 -91
  132. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x62.html +0 -84
  133. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x63.html +0 -87
  134. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x64.html +0 -83
  135. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x65.html +0 -110
  136. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x66.html +0 -79
  137. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x68.html +0 -80
  138. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x69.html +0 -92
  139. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6b.html +0 -71
  140. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6c.html +0 -88
  141. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6d.html +0 -96
  142. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6e.html +0 -71
  143. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6f.html +0 -80
  144. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x70.html +0 -100
  145. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x71.html +0 -71
  146. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x72.html +0 -87
  147. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x73.html +0 -163
  148. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x74.html +0 -115
  149. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x75.html +0 -71
  150. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x76.html +0 -80
  151. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x77.html +0 -77
  152. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars.html +0 -91
  153. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x62.html +0 -84
  154. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x63.html +0 -87
  155. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x64.html +0 -83
  156. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x65.html +0 -110
  157. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x66.html +0 -79
  158. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x68.html +0 -80
  159. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x69.html +0 -92
  160. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6b.html +0 -71
  161. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6c.html +0 -88
  162. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6d.html +0 -96
  163. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6e.html +0 -71
  164. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6f.html +0 -80
  165. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x70.html +0 -100
  166. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x71.html +0 -71
  167. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x72.html +0 -87
  168. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x73.html +0 -163
  169. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x74.html +0 -115
  170. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x75.html +0 -71
  171. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x76.html +0 -80
  172. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x77.html +0 -77
  173. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals.html +0 -667
  174. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_defs.html +0 -81
  175. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_enum.html +0 -78
  176. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_eval.html +0 -373
  177. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_func.html +0 -196
  178. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_type.html +0 -126
  179. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__basic.html +0 -320
  180. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__emitter.html +0 -819
  181. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__events.html +0 -664
  182. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__export.html +0 -60
  183. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__nodes.html +0 -795
  184. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__parser.html +0 -606
  185. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__styles.html +0 -222
  186. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__tokens.html +0 -246
  187. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__version.html +0 -106
  188. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/index.html +0 -31
  189. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/modules.html +0 -42
  190. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_f.png +0 -0
  191. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_h.png +0 -0
  192. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/open.png +0 -0
  193. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__alias__data__s.html +0 -108
  194. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__document__s.html +0 -235
  195. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__emitter__s.html +0 -1300
  196. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__event__s.html +0 -496
  197. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__mark__s.html +0 -108
  198. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__pair__s.html +0 -91
  199. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__s.html +0 -420
  200. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__parser__s.html +0 -1229
  201. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__simple__key__s.html +0 -97
  202. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__tag__directive__s.html +0 -91
  203. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__token__s.html +0 -413
  204. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__version__directive__s.html +0 -91
  205. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_a.png +0 -0
  206. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_b.png +0 -0
  207. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_h.png +0 -0
  208. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_s.png +0 -0
  209. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tabs.css +0 -59
  210. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/yaml_8h.html +0 -525
  211. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.am +0 -17
  212. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.in +0 -470
  213. data/ext/nutcracker/contrib/yaml-0.1.4/libtool +0 -8890
  214. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile +0 -484
  215. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.lo +0 -12
  216. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.o +0 -0
  217. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.lo +0 -12
  218. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.o +0 -0
  219. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.lo +0 -12
  220. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.o +0 -0
  221. data/ext/nutcracker/contrib/yaml-0.1.4/src/libyaml.la +0 -41
  222. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.lo +0 -12
  223. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.o +0 -0
  224. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.lo +0 -12
  225. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.o +0 -0
  226. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.lo +0 -12
  227. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.o +0 -0
  228. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.lo +0 -12
  229. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.o +0 -0
  230. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.lo +0 -12
  231. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.o +0 -0
  232. data/ext/nutcracker/contrib/yaml-0.1.4/stamp-h1 +0 -1
  233. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile +0 -675
  234. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor +0 -0
  235. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt +0 -0
  236. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.o +0 -0
  237. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.o +0 -0
  238. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter +0 -0
  239. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt +0 -0
  240. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.o +0 -0
  241. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.o +0 -0
  242. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper +0 -0
  243. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.o +0 -0
  244. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter +0 -0
  245. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.o +0 -0
  246. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader +0 -0
  247. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.o +0 -0
  248. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser +0 -0
  249. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.o +0 -0
  250. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner +0 -0
  251. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.o +0 -0
  252. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc +0 -10
  253. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc.in +0 -10
  254. data/ext/nutcracker/libtool +0 -9403
  255. data/ext/nutcracker/src/Makefile +0 -647
  256. data/ext/nutcracker/src/hashkit/Makefile +0 -476
  257. data/ext/nutcracker/src/hashkit/libhashkit.a +0 -0
  258. data/ext/nutcracker/src/hashkit/nc_crc16.c +0 -66
  259. data/ext/nutcracker/src/hashkit/nc_crc16.o +0 -0
  260. data/ext/nutcracker/src/hashkit/nc_crc32.o +0 -0
  261. data/ext/nutcracker/src/hashkit/nc_fnv.o +0 -0
  262. data/ext/nutcracker/src/hashkit/nc_hsieh.o +0 -0
  263. data/ext/nutcracker/src/hashkit/nc_jenkins.o +0 -0
  264. data/ext/nutcracker/src/hashkit/nc_ketama.o +0 -0
  265. data/ext/nutcracker/src/hashkit/nc_md5.o +0 -0
  266. data/ext/nutcracker/src/hashkit/nc_modula.o +0 -0
  267. data/ext/nutcracker/src/hashkit/nc_murmur.o +0 -0
  268. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.o +0 -0
  269. data/ext/nutcracker/src/hashkit/nc_random.o +0 -0
  270. data/ext/nutcracker/src/nc.o +0 -0
  271. data/ext/nutcracker/src/nc_array.o +0 -0
  272. data/ext/nutcracker/src/nc_client.o +0 -0
  273. data/ext/nutcracker/src/nc_conf.o +0 -0
  274. data/ext/nutcracker/src/nc_connection.o +0 -0
  275. data/ext/nutcracker/src/nc_core.o +0 -0
  276. data/ext/nutcracker/src/nc_epoll.o +0 -0
  277. data/ext/nutcracker/src/nc_kqueue.c +0 -296
  278. data/ext/nutcracker/src/nc_kqueue.o +0 -0
  279. data/ext/nutcracker/src/nc_log.o +0 -0
  280. data/ext/nutcracker/src/nc_mbuf.o +0 -0
  281. data/ext/nutcracker/src/nc_message.o +0 -0
  282. data/ext/nutcracker/src/nc_proxy.o +0 -0
  283. data/ext/nutcracker/src/nc_rbtree.o +0 -0
  284. data/ext/nutcracker/src/nc_request.o +0 -0
  285. data/ext/nutcracker/src/nc_response.o +0 -0
  286. data/ext/nutcracker/src/nc_server.o +0 -0
  287. data/ext/nutcracker/src/nc_signal.o +0 -0
  288. data/ext/nutcracker/src/nc_stats.o +0 -0
  289. data/ext/nutcracker/src/nc_string.o +0 -0
  290. data/ext/nutcracker/src/nc_util.o +0 -0
  291. data/ext/nutcracker/src/nutcracker +0 -0
  292. data/ext/nutcracker/src/proto/Makefile +0 -454
  293. data/ext/nutcracker/src/proto/libproto.a +0 -0
  294. data/ext/nutcracker/src/proto/nc_memcache.o +0 -0
  295. data/ext/nutcracker/src/proto/nc_redis.o +0 -0
  296. data/ext/nutcracker/stamp-h1 +0 -1
@@ -10,7 +10,6 @@ noinst_LIBRARIES = libhashkit.a
10
10
  noinst_HEADERS = nc_hashkit.h
11
11
 
12
12
  libhashkit_a_SOURCES = \
13
- nc_crc16.c \
14
13
  nc_crc32.c \
15
14
  nc_fnv.c \
16
15
  nc_hsieh.c \
@@ -1,8 +1,9 @@
1
- # Makefile.in generated by automake 1.10 from Makefile.am.
1
+ # Makefile.in generated by automake 1.11 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
4
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
- # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6
+ # Inc.
6
7
  # This Makefile.in is free software; the Free Software Foundation
7
8
  # gives unlimited permission to copy and/or distribute it,
8
9
  # with or without modifications, as long as this notice is preserved.
@@ -17,8 +18,9 @@
17
18
 
18
19
  VPATH = @srcdir@
19
20
  pkgdatadir = $(datadir)/@PACKAGE@
20
- pkglibdir = $(libdir)/@PACKAGE@
21
21
  pkgincludedir = $(includedir)/@PACKAGE@
22
+ pkglibdir = $(libdir)/@PACKAGE@
23
+ pkglibexecdir = $(libexecdir)/@PACKAGE@
22
24
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23
25
  install_sh_DATA = $(install_sh) -c -m 644
24
26
  install_sh_PROGRAM = $(install_sh) -c
@@ -46,19 +48,20 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
46
48
  mkinstalldirs = $(install_sh) -d
47
49
  CONFIG_HEADER = $(top_builddir)/config.h
48
50
  CONFIG_CLEAN_FILES =
51
+ CONFIG_CLEAN_VPATH_FILES =
49
52
  LIBRARIES = $(noinst_LIBRARIES)
50
53
  ARFLAGS = cru
51
54
  libhashkit_a_AR = $(AR) $(ARFLAGS)
52
55
  libhashkit_a_LIBADD =
53
- am_libhashkit_a_OBJECTS = nc_crc16.$(OBJEXT) nc_crc32.$(OBJEXT) \
54
- nc_fnv.$(OBJEXT) nc_hsieh.$(OBJEXT) nc_jenkins.$(OBJEXT) \
55
- nc_ketama.$(OBJEXT) nc_md5.$(OBJEXT) nc_modula.$(OBJEXT) \
56
- nc_murmur.$(OBJEXT) nc_one_at_a_time.$(OBJEXT) \
57
- nc_random.$(OBJEXT)
56
+ am_libhashkit_a_OBJECTS = nc_crc32.$(OBJEXT) nc_fnv.$(OBJEXT) \
57
+ nc_hsieh.$(OBJEXT) nc_jenkins.$(OBJEXT) nc_ketama.$(OBJEXT) \
58
+ nc_md5.$(OBJEXT) nc_modula.$(OBJEXT) nc_murmur.$(OBJEXT) \
59
+ nc_one_at_a_time.$(OBJEXT) nc_random.$(OBJEXT)
58
60
  libhashkit_a_OBJECTS = $(am_libhashkit_a_OBJECTS)
59
- DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
61
+ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
60
62
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
61
63
  am__depfiles_maybe = depfiles
64
+ am__mv = mv -f
62
65
  COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
63
66
  $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
64
67
  LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -174,6 +177,7 @@ libdir = @libdir@
174
177
  libexecdir = @libexecdir@
175
178
  localedir = @localedir@
176
179
  localstatedir = @localstatedir@
180
+ lt_ECHO = @lt_ECHO@
177
181
  mandir = @mandir@
178
182
  mkdir_p = @mkdir_p@
179
183
  oldincludedir = @oldincludedir@
@@ -196,7 +200,6 @@ AM_CFLAGS = -Wall -Wshadow -Wno-unused-parameter -Wno-unused-value
196
200
  noinst_LIBRARIES = libhashkit.a
197
201
  noinst_HEADERS = nc_hashkit.h
198
202
  libhashkit_a_SOURCES = \
199
- nc_crc16.c \
200
203
  nc_crc32.c \
201
204
  nc_fnv.c \
202
205
  nc_hsieh.c \
@@ -216,14 +219,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
216
219
  @for dep in $?; do \
217
220
  case '$(am__configure_deps)' in \
218
221
  *$$dep*) \
219
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
220
- && exit 0; \
222
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
223
+ && { if test -f $@; then exit 0; else break; fi; }; \
221
224
  exit 1;; \
222
225
  esac; \
223
226
  done; \
224
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/hashkit/Makefile'; \
225
- cd $(top_srcdir) && \
226
- $(AUTOMAKE) --foreign src/hashkit/Makefile
227
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/hashkit/Makefile'; \
228
+ $(am__cd) $(top_srcdir) && \
229
+ $(AUTOMAKE) --foreign src/hashkit/Makefile
227
230
  .PRECIOUS: Makefile
228
231
  Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
229
232
  @case '$?' in \
@@ -241,6 +244,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
241
244
  cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
242
245
  $(ACLOCAL_M4): $(am__aclocal_m4_deps)
243
246
  cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
247
+ $(am__aclocal_m4_deps):
244
248
 
245
249
  clean-noinstLIBRARIES:
246
250
  -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -255,7 +259,6 @@ mostlyclean-compile:
255
259
  distclean-compile:
256
260
  -rm -f *.tab.c
257
261
 
258
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_crc16.Po@am__quote@
259
262
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_crc32.Po@am__quote@
260
263
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_fnv.Po@am__quote@
261
264
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_hsieh.Po@am__quote@
@@ -269,21 +272,21 @@ distclean-compile:
269
272
 
270
273
  .c.o:
271
274
  @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
272
- @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
275
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
273
276
  @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
274
277
  @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
275
278
  @am__fastdepCC_FALSE@ $(COMPILE) -c $<
276
279
 
277
280
  .c.obj:
278
281
  @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
279
- @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
282
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
280
283
  @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
281
284
  @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
282
285
  @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
283
286
 
284
287
  .c.lo:
285
288
  @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
286
- @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
289
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
287
290
  @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
288
291
  @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
289
292
  @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -299,45 +302,49 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
299
302
  unique=`for i in $$list; do \
300
303
  if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
301
304
  done | \
302
- $(AWK) ' { files[$$0] = 1; } \
303
- END { for (i in files) print i; }'`; \
305
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
306
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
304
307
  mkid -fID $$unique
305
308
  tags: TAGS
306
309
 
307
310
  TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
308
311
  $(TAGS_FILES) $(LISP)
309
- tags=; \
312
+ set x; \
310
313
  here=`pwd`; \
311
314
  list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
312
315
  unique=`for i in $$list; do \
313
316
  if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
314
317
  done | \
315
- $(AWK) ' { files[$$0] = 1; } \
316
- END { for (i in files) print i; }'`; \
317
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
318
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
319
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
320
+ shift; \
321
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
318
322
  test -n "$$unique" || unique=$$empty_fix; \
319
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
320
- $$tags $$unique; \
323
+ if test $$# -gt 0; then \
324
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
325
+ "$$@" $$unique; \
326
+ else \
327
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
328
+ $$unique; \
329
+ fi; \
321
330
  fi
322
331
  ctags: CTAGS
323
332
  CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
324
333
  $(TAGS_FILES) $(LISP)
325
- tags=; \
326
- here=`pwd`; \
327
334
  list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
328
335
  unique=`for i in $$list; do \
329
336
  if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
330
337
  done | \
331
- $(AWK) ' { files[$$0] = 1; } \
332
- END { for (i in files) print i; }'`; \
333
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
338
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
339
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
340
+ test -z "$(CTAGS_ARGS)$$unique" \
334
341
  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
335
- $$tags $$unique
342
+ $$unique
336
343
 
337
344
  GTAGS:
338
345
  here=`$(am__cd) $(top_builddir) && pwd` \
339
- && cd $(top_srcdir) \
340
- && gtags -i $(GTAGS_ARGS) $$here
346
+ && $(am__cd) $(top_srcdir) \
347
+ && gtags -i $(GTAGS_ARGS) "$$here"
341
348
 
342
349
  distclean-tags:
343
350
  -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -358,13 +365,17 @@ distdir: $(DISTFILES)
358
365
  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
359
366
  if test -d $$d/$$file; then \
360
367
  dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
368
+ if test -d "$(distdir)/$$file"; then \
369
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
370
+ fi; \
361
371
  if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
362
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
372
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
373
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
363
374
  fi; \
364
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
375
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
365
376
  else \
366
- test -f $(distdir)/$$file \
367
- || cp -p $$d/$$file $(distdir)/$$file \
377
+ test -f "$(distdir)/$$file" \
378
+ || cp -p $$d/$$file "$(distdir)/$$file" \
368
379
  || exit 1; \
369
380
  fi; \
370
381
  done
@@ -392,6 +403,7 @@ clean-generic:
392
403
 
393
404
  distclean-generic:
394
405
  -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
406
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
395
407
 
396
408
  maintainer-clean-generic:
397
409
  @echo "This command is intended for maintainers to use"
@@ -414,6 +426,8 @@ dvi-am:
414
426
 
415
427
  html: html-am
416
428
 
429
+ html-am:
430
+
417
431
  info: info-am
418
432
 
419
433
  info-am:
@@ -422,18 +436,28 @@ install-data-am:
422
436
 
423
437
  install-dvi: install-dvi-am
424
438
 
439
+ install-dvi-am:
440
+
425
441
  install-exec-am:
426
442
 
427
443
  install-html: install-html-am
428
444
 
445
+ install-html-am:
446
+
429
447
  install-info: install-info-am
430
448
 
449
+ install-info-am:
450
+
431
451
  install-man:
432
452
 
433
453
  install-pdf: install-pdf-am
434
454
 
455
+ install-pdf-am:
456
+
435
457
  install-ps: install-ps-am
436
458
 
459
+ install-ps-am:
460
+
437
461
  installcheck-am:
438
462
 
439
463
  maintainer-clean: maintainer-clean-am
@@ -471,6 +495,7 @@ uninstall-am:
471
495
  mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
472
496
  pdf pdf-am ps ps-am tags uninstall uninstall-am
473
497
 
498
+
474
499
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
475
500
  # Otherwise a system limit (for SysV at least) may be exceeded.
476
501
  .NOEXPORT:
File without changes
File without changes
@@ -24,7 +24,6 @@
24
24
  #define HASH_CODEC(ACTION) \
25
25
  ACTION( HASH_ONE_AT_A_TIME, one_at_a_time ) \
26
26
  ACTION( HASH_MD5, md5 ) \
27
- ACTION( HASH_CRC16, crc16 ) \
28
27
  ACTION( HASH_CRC32, crc32 ) \
29
28
  ACTION( HASH_FNV1_64, fnv1_64 ) \
30
29
  ACTION( HASH_FNV1A_64, fnv1a_64 ) \
@@ -57,7 +56,6 @@ uint32_t hash_one_at_a_time(const char *key, size_t key_length);
57
56
  void md5_signature(const unsigned char *key, unsigned int length, unsigned char *result);
58
57
  uint32_t hash_md5(const char *key, size_t key_length);
59
58
  uint32_t hash_crc32(const char *key, size_t key_length);
60
- uint32_t hash_crc16(const char *key, size_t key_length);
61
59
  uint32_t hash_fnv1_64(const char *key, size_t key_length);
62
60
  uint32_t hash_fnv1a_64(const char *key, size_t key_length);
63
61
  uint32_t hash_fnv1_32(const char *key, size_t key_length);
File without changes
File without changes
File without changes
File without changes
@@ -36,8 +36,6 @@ modula_update(struct server_pool *pool)
36
36
  uint32_t continuum_index; /* continuum index */
37
37
  uint32_t continuum_addition; /* extra space in the continuum */
38
38
  uint32_t server_index; /* server index */
39
- uint32_t weight_index; /* weight index */
40
- uint32_t total_weight; /* total live server weight */
41
39
  int64_t now; /* current timestamp in usec */
42
40
 
43
41
  now = nc_usec_now();
@@ -47,7 +45,6 @@ modula_update(struct server_pool *pool)
47
45
 
48
46
  nserver = array_n(&pool->server);
49
47
  nlive_server = 0;
50
- total_weight = 0;
51
48
  pool->next_rebuild = 0LL;
52
49
 
53
50
  for (server_index = 0; server_index < nserver; server_index++) {
@@ -64,13 +61,6 @@ modula_update(struct server_pool *pool)
64
61
  } else {
65
62
  nlive_server++;
66
63
  }
67
-
68
- ASSERT(server->weight > 0);
69
-
70
- /* count weight only for live servers */
71
- if (!pool->auto_eject_hosts || server->next_retry <= now) {
72
- total_weight += server->weight;
73
- }
74
64
  }
75
65
 
76
66
  pool->nlive_server = nlive_server;
@@ -95,9 +85,9 @@ modula_update(struct server_pool *pool)
95
85
  * Allocate the continuum for the pool, the first time, and every time we
96
86
  * add a new server to the pool
97
87
  */
98
- if (total_weight > pool->nserver_continuum) {
88
+ if (nlive_server > pool->nserver_continuum) {
99
89
  struct continuum *continuum;
100
- uint32_t nserver_continuum = total_weight + MODULA_CONTINUUM_ADDITION;
90
+ uint32_t nserver_continuum = nlive_server + MODULA_CONTINUUM_ADDITION;
101
91
  uint32_t ncontinuum = nserver_continuum * MODULA_POINTS_PER_SERVER;
102
92
 
103
93
  continuum = nc_realloc(pool->continuum, sizeof(*continuum) * ncontinuum);
@@ -120,14 +110,12 @@ modula_update(struct server_pool *pool)
120
110
  continue;
121
111
  }
122
112
 
123
- for (weight_index = 0; weight_index < server->weight; weight_index++) {
124
- pointer_per_server = 1;
113
+ pointer_per_server = 1;
125
114
 
126
- pool->continuum[continuum_index].index = server_index;
127
- pool->continuum[continuum_index++].value = 0;
115
+ pool->continuum[continuum_index].index = server_index;
116
+ pool->continuum[continuum_index++].value = 0;
128
117
 
129
- pointer_counter += pointer_per_server;
130
- }
118
+ pointer_counter += pointer_per_server;
131
119
  }
132
120
  pool->ncontinuum = pointer_counter;
133
121
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1109,6 +1109,14 @@ conf_pre_validate(struct conf *cf)
1109
1109
  return NC_OK;
1110
1110
  }
1111
1111
 
1112
+ static int
1113
+ conf_server_pname_cmp(const void *t1, const void *t2)
1114
+ {
1115
+ const struct conf_server *s1 = t1, *s2 = t2;
1116
+
1117
+ return string_compare(&s1->pname, &s2->pname);
1118
+ }
1119
+
1112
1120
  static int
1113
1121
  conf_server_name_cmp(const void *t1, const void *t2)
1114
1122
  {
@@ -1148,10 +1156,27 @@ conf_validate_server(struct conf *cf, struct conf_pool *cp)
1148
1156
 
1149
1157
  /*
1150
1158
  * Disallow duplicate servers - servers with identical "host:port:weight"
1151
- * or "name" combination are considered as duplicates. When server name
1152
- * is configured, we only check for duplicate "name" and not for duplicate
1153
- * "host:port:weight"
1159
+ * or "name" combination are considered as duplicates
1154
1160
  */
1161
+ array_sort(&cp->server, conf_server_pname_cmp);
1162
+ for (valid = true, i = 0; i < nserver - 1; i++) {
1163
+ struct conf_server *cs1, *cs2;
1164
+
1165
+ cs1 = array_get(&cp->server, i);
1166
+ cs2 = array_get(&cp->server, i + 1);
1167
+
1168
+ if (string_compare(&cs1->pname, &cs2->pname) == 0) {
1169
+ log_error("conf: pool '%.*s' has servers with same name '%.*s'",
1170
+ cp->name.len, cp->name.data, cs1->pname.len,
1171
+ cs1->pname.data);
1172
+ valid = false;
1173
+ break;
1174
+ }
1175
+ }
1176
+ if (!valid) {
1177
+ return NC_ERROR;
1178
+ }
1179
+
1155
1180
  array_sort(&cp->server, conf_server_name_cmp);
1156
1181
  for (valid = true, i = 0; i < nserver - 1; i++) {
1157
1182
  struct conf_server *cs1, *cs2;
@@ -1472,7 +1497,7 @@ conf_add_server(struct conf *cf, struct command *cmd, void *conf)
1472
1497
  struct conf_server *field;
1473
1498
  uint8_t *p, *q, *start;
1474
1499
  uint8_t *pname, *addr, *port, *weight, *name;
1475
- uint32_t k, delimlen, pnamelen, addrlen, portlen, weightlen, namelen;
1500
+ uint32_t k, pnamelen, addrlen, portlen, weightlen, namelen;
1476
1501
  struct string address;
1477
1502
  char delim[] = " ::";
1478
1503
 
@@ -1489,7 +1514,7 @@ conf_add_server(struct conf *cf, struct command *cmd, void *conf)
1489
1514
 
1490
1515
  value = array_top(&cf->arg);
1491
1516
 
1492
- /* parse "hostname:port:weight [name]" or "/path/unix_socket:weight [name]" from the end */
1517
+ /* parse "hostname:port:weight [name]" from the end */
1493
1518
  p = value->data + value->len - 1;
1494
1519
  start = value->data;
1495
1520
  addr = NULL;
@@ -1501,8 +1526,6 @@ conf_add_server(struct conf *cf, struct command *cmd, void *conf)
1501
1526
  name = NULL;
1502
1527
  namelen = 0;
1503
1528
 
1504
- delimlen = value->data[0] == '/' ? 2 : 3;
1505
-
1506
1529
  for (k = 0; k < sizeof(delim); k++) {
1507
1530
  q = nc_strrchr(p, start, delim[k]);
1508
1531
  if (q == NULL) {
@@ -1539,8 +1562,8 @@ conf_add_server(struct conf *cf, struct command *cmd, void *conf)
1539
1562
  p = q - 1;
1540
1563
  }
1541
1564
 
1542
- if (k != delimlen) {
1543
- return "has an invalid \"hostname:port:weight [name]\"or \"/path/unix_socket:weight [name]\" format string";
1565
+ if (k != 3) {
1566
+ return "has an invalid \"hostname:port:weight [name]\" format string";
1544
1567
  }
1545
1568
 
1546
1569
  pname = value->data;
@@ -1559,11 +1582,9 @@ conf_add_server(struct conf *cf, struct command *cmd, void *conf)
1559
1582
  return "has an invalid weight in \"hostname:port:weight [name]\" format string";
1560
1583
  }
1561
1584
 
1562
- if (value->data[0] != '/') {
1563
- field->port = nc_atoi(port, portlen);
1564
- if (field->port < 0 || !nc_valid_port(field->port)) {
1565
- return "has an invalid port in \"hostname:port:weight [name]\" format string";
1566
- }
1585
+ field->port = nc_atoi(port, portlen);
1586
+ if (field->port < 0 || !nc_valid_port(field->port)) {
1587
+ return "has an invalid port in \"hostname:port:weight [name]\" format string";
1567
1588
  }
1568
1589
 
1569
1590
  if (name == NULL) {