pvxslibs 1.1.4a1__tar.gz → 1.2.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pvxslibs might be problematic. Click here for more details.

Files changed (245) hide show
  1. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/MANIFEST.in +3 -0
  2. {pvxslibs-1.1.4a1/python/pvxslibs.egg-info → pvxslibs-1.2.0a1}/PKG-INFO +1 -1
  3. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/arc4random.c +10 -4
  4. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/buffer.c +47 -35
  5. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/buffer_iocp.c +1 -1
  6. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent-internal.h +2 -2
  7. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent.c +5 -5
  8. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_mbedtls.c +28 -5
  9. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_openssl.c +4 -2
  10. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_ratelim.c +1 -1
  11. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_ssl.c +3 -1
  12. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/epoll.c +19 -4
  13. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evdns.c +145 -128
  14. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/event-config.h.cmake +12 -3
  15. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/event.c +44 -23
  16. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evmap.c +3 -2
  17. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evsignal-internal.h +13 -0
  18. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evthread-internal.h +2 -2
  19. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evthread_pthread.c +22 -7
  20. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evutil.c +58 -18
  21. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/http-internal.h +15 -1
  22. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/http.c +228 -49
  23. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event.h +1 -1
  24. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/bufferevent_ssl.h +16 -3
  25. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/dns.h +14 -2
  26. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/event.h +21 -2
  27. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/http.h +55 -2
  28. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/http_struct.h +1 -1
  29. pvxslibs-1.2.0a1/bundle/libevent/include/event2/ws.h +58 -0
  30. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/listener.c +7 -6
  31. pvxslibs-1.2.0a1/bundle/libevent/mbedtls-compat.h +30 -0
  32. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/openssl-compat.h +2 -1
  33. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/poll.c +2 -1
  34. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/select.c +2 -1
  35. pvxslibs-1.2.0a1/bundle/libevent/sha1.c +301 -0
  36. pvxslibs-1.2.0a1/bundle/libevent/sha1.h +14 -0
  37. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/signal.c +24 -17
  38. pvxslibs-1.2.0a1/bundle/libevent/signalfd.c +213 -0
  39. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/util-internal.h +7 -1
  40. pvxslibs-1.2.0a1/bundle/libevent/ws.c +458 -0
  41. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/configure/CONFIG_PVXS_VERSION +4 -3
  42. pvxslibs-1.2.0a1/ioc/channel.cpp +37 -0
  43. pvxslibs-1.2.0a1/ioc/channel.h +50 -0
  44. pvxslibs-1.2.0a1/ioc/credentials.cpp +48 -0
  45. pvxslibs-1.2.0a1/ioc/credentials.h +39 -0
  46. pvxslibs-1.2.0a1/ioc/dbentry.h +64 -0
  47. pvxslibs-1.2.0a1/ioc/dberrormessage.cpp +37 -0
  48. pvxslibs-1.2.0a1/ioc/dberrormessage.h +60 -0
  49. pvxslibs-1.2.0a1/ioc/dbeventcontextdeleter.h +31 -0
  50. pvxslibs-1.2.0a1/ioc/dblocker.h +48 -0
  51. pvxslibs-1.2.0a1/ioc/dbmanylocker.h +115 -0
  52. pvxslibs-1.2.0a1/ioc/demo.cpp +86 -0
  53. pvxslibs-1.2.0a1/ioc/dummygroup.cpp +23 -0
  54. pvxslibs-1.2.0a1/ioc/dummysingle.cpp +8 -0
  55. pvxslibs-1.2.0a1/ioc/field.cpp +85 -0
  56. pvxslibs-1.2.0a1/ioc/field.h +57 -0
  57. pvxslibs-1.2.0a1/ioc/fieldconfig.h +57 -0
  58. pvxslibs-1.2.0a1/ioc/fielddefinition.cpp +32 -0
  59. pvxslibs-1.2.0a1/ioc/fielddefinition.h +43 -0
  60. pvxslibs-1.2.0a1/ioc/fieldname.cpp +109 -0
  61. pvxslibs-1.2.0a1/ioc/fieldname.h +111 -0
  62. pvxslibs-1.2.0a1/ioc/fieldnamecomponent.h +72 -0
  63. pvxslibs-1.2.0a1/ioc/fieldsubscriptionctx.cpp +35 -0
  64. pvxslibs-1.2.0a1/ioc/fieldsubscriptionctx.h +63 -0
  65. pvxslibs-1.2.0a1/ioc/group.cpp +111 -0
  66. pvxslibs-1.2.0a1/ioc/group.h +84 -0
  67. pvxslibs-1.2.0a1/ioc/groupconfig.h +37 -0
  68. pvxslibs-1.2.0a1/ioc/groupconfigprocessor.cpp +1184 -0
  69. pvxslibs-1.2.0a1/ioc/groupconfigprocessor.h +94 -0
  70. pvxslibs-1.2.0a1/ioc/groupdefinition.h +45 -0
  71. pvxslibs-1.2.0a1/ioc/groupprocessorcontext.cpp +90 -0
  72. pvxslibs-1.2.0a1/ioc/groupprocessorcontext.h +54 -0
  73. pvxslibs-1.2.0a1/ioc/groupsource.cpp +566 -0
  74. pvxslibs-1.2.0a1/ioc/groupsource.h +76 -0
  75. pvxslibs-1.2.0a1/ioc/groupsourcehooks.cpp +245 -0
  76. pvxslibs-1.2.0a1/ioc/groupsrcsubscriptionctx.h +53 -0
  77. pvxslibs-1.2.0a1/ioc/iochooks.cpp +321 -0
  78. pvxslibs-1.2.0a1/ioc/iocshargument.h +82 -0
  79. pvxslibs-1.2.0a1/ioc/iocshcommand.h +116 -0
  80. pvxslibs-1.2.0a1/ioc/iocshindex.h +54 -0
  81. pvxslibs-1.2.0a1/ioc/iocsource.cpp +704 -0
  82. pvxslibs-1.2.0a1/ioc/iocsource.h +82 -0
  83. pvxslibs-1.2.0a1/ioc/localfieldlog.cpp +30 -0
  84. pvxslibs-1.2.0a1/ioc/localfieldlog.h +34 -0
  85. pvxslibs-1.2.0a1/ioc/pvxs/iochooks.h +94 -0
  86. pvxslibs-1.2.0a1/ioc/securityclient.cpp +55 -0
  87. pvxslibs-1.2.0a1/ioc/securityclient.h +77 -0
  88. pvxslibs-1.2.0a1/ioc/securitylogger.h +45 -0
  89. pvxslibs-1.2.0a1/ioc/singlesource.cpp +444 -0
  90. pvxslibs-1.2.0a1/ioc/singlesource.h +50 -0
  91. pvxslibs-1.2.0a1/ioc/singlesourcehooks.cpp +189 -0
  92. pvxslibs-1.2.0a1/ioc/singlesrcsubscriptionctx.cpp +28 -0
  93. pvxslibs-1.2.0a1/ioc/singlesrcsubscriptionctx.h +60 -0
  94. pvxslibs-1.2.0a1/ioc/subscriptionctx.h +74 -0
  95. pvxslibs-1.2.0a1/ioc/typeutils.cpp +92 -0
  96. pvxslibs-1.2.0a1/ioc/typeutils.h +37 -0
  97. pvxslibs-1.2.0a1/ioc/yajlcallbackhandler.h +51 -0
  98. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs/test/test_load.py +5 -0
  99. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1/python/pvxslibs.egg-info}/PKG-INFO +1 -1
  100. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs.egg-info/SOURCES.txt +61 -1
  101. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/setup.py +58 -0
  102. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/client.cpp +105 -33
  103. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientconn.cpp +1 -1
  104. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientdiscover.cpp +1 -1
  105. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientget.cpp +1 -0
  106. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientimpl.h +16 -5
  107. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientintrospect.cpp +1 -0
  108. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientmon.cpp +20 -21
  109. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/config.cpp +16 -68
  110. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/data.cpp +10 -2
  111. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/evhelper.cpp +18 -7
  112. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/evhelper.h +3 -3
  113. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/log.cpp +4 -0
  114. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/nt.cpp +14 -2
  115. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/client.h +3 -0
  116. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/nt.h +8 -2
  117. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/server.h +3 -0
  118. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/source.h +4 -1
  119. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/unittest.h +2 -0
  120. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/server.cpp +49 -2
  121. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/serverconn.cpp +9 -0
  122. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/serverget.cpp +3 -0
  123. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/serverintrospect.cpp +2 -0
  124. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/servermon.cpp +86 -24
  125. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/sharedpv.cpp +1 -0
  126. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/udp_collector.cpp +28 -13
  127. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/udp_collector.h +2 -2
  128. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/unittest.cpp +10 -0
  129. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/util.cpp +36 -6
  130. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/utilpvt.h +26 -10
  131. pvxslibs-1.1.4a1/bundle/libevent/mbedtls-compat.h +0 -11
  132. pvxslibs-1.1.4a1/src/instcounters.h +0 -38
  133. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/COPYRIGHT +0 -0
  134. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/LICENSE +0 -0
  135. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/README.md +0 -0
  136. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/LICENSE +0 -0
  137. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_async.c +0 -0
  138. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_filter.c +0 -0
  139. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_pair.c +0 -0
  140. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/bufferevent_sock.c +0 -0
  141. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/changelist-internal.h +0 -0
  142. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/cmake/VersionViaGit.cmake +0 -0
  143. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/compat/sys/queue.h +0 -0
  144. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/defer-internal.h +0 -0
  145. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/devpoll.c +0 -0
  146. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/epoll_sub.c +0 -0
  147. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/epolltable-internal.h +0 -0
  148. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evbuffer-internal.h +0 -0
  149. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evconfig-private.h.cmake +0 -0
  150. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/event-internal.h +0 -0
  151. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/event_iocp.c +0 -0
  152. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/event_tagging.c +0 -0
  153. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evmap-internal.h +0 -0
  154. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evport.c +0 -0
  155. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evrpc-internal.h +0 -0
  156. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evrpc.c +0 -0
  157. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evthread.c +0 -0
  158. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evthread_win32.c +0 -0
  159. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evutil_rand.c +0 -0
  160. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/evutil_time.c +0 -0
  161. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/ht-internal.h +0 -0
  162. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/evdns.h +0 -0
  163. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/buffer.h +0 -0
  164. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/buffer_compat.h +0 -0
  165. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/bufferevent.h +0 -0
  166. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/bufferevent_compat.h +0 -0
  167. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/bufferevent_struct.h +0 -0
  168. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/dns_compat.h +0 -0
  169. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/dns_struct.h +0 -0
  170. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/event_compat.h +0 -0
  171. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/event_struct.h +0 -0
  172. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/http_compat.h +0 -0
  173. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/keyvalq_struct.h +0 -0
  174. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/listener.h +0 -0
  175. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/rpc.h +0 -0
  176. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/rpc_compat.h +0 -0
  177. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/rpc_struct.h +0 -0
  178. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/tag.h +0 -0
  179. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/tag_compat.h +0 -0
  180. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/thread.h +0 -0
  181. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/util.h +0 -0
  182. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/visibility.h +0 -0
  183. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/event2/watch.h +0 -0
  184. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/evhttp.h +0 -0
  185. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/evrpc.h +0 -0
  186. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/include/evutil.h +0 -0
  187. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/iocp-internal.h +0 -0
  188. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/ipv6-internal.h +0 -0
  189. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/kqueue-internal.h +0 -0
  190. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/kqueue.c +0 -0
  191. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/log-internal.h +0 -0
  192. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/log.c +0 -0
  193. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/minheap-internal.h +0 -0
  194. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/mm-internal.h +0 -0
  195. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/ratelim-internal.h +0 -0
  196. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/ssl-compat.h +0 -0
  197. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/strlcpy-internal.h +0 -0
  198. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/strlcpy.c +0 -0
  199. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/time-internal.h +0 -0
  200. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/watch.c +0 -0
  201. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/wepoll.c +0 -0
  202. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/wepoll.h +0 -0
  203. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/bundle/libevent/win32select.c +0 -0
  204. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/pyproject.toml +0 -0
  205. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs/__init__.py +0 -0
  206. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs/lib/__init__.py +0 -0
  207. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs/path.py +0 -0
  208. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs/test/__init__.py +0 -0
  209. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs/version.py +0 -0
  210. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs.egg-info/dependency_links.txt +0 -0
  211. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs.egg-info/not-zip-safe +0 -0
  212. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs.egg-info/requires.txt +0 -0
  213. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/python/pvxslibs.egg-info/top_level.txt +0 -0
  214. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/setup.cfg +0 -0
  215. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/bitmask.cpp +0 -0
  216. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/bitmask.h +0 -0
  217. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/clientreq.cpp +0 -0
  218. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/conn.cpp +0 -0
  219. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/conn.h +0 -0
  220. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/dataencode.cpp +0 -0
  221. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/datafmt.cpp +0 -0
  222. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/dataimpl.h +0 -0
  223. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/describe.cpp +0 -0
  224. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/describe.h@ +0 -0
  225. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/os/WIN32/osdSockExt.cpp +0 -0
  226. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/os/default/osdSockExt.cpp +0 -0
  227. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/osgroups.cpp +0 -0
  228. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/osiSockExt.h +0 -0
  229. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvaproto.h +0 -0
  230. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvrequest.cpp +0 -0
  231. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvrequest.h +0 -0
  232. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/data.h +0 -0
  233. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/log.h +0 -0
  234. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/netcommon.h +0 -0
  235. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/sharedArray.h +0 -0
  236. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/sharedpv.h +0 -0
  237. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/srvcommon.h +0 -0
  238. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/util.h +0 -0
  239. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/version.h +0 -0
  240. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/pvxs/versionNum.h@ +0 -0
  241. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/serverchan.cpp +0 -0
  242. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/serverconn.h +0 -0
  243. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/serversource.cpp +0 -0
  244. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/sharedarray.cpp +0 -0
  245. {pvxslibs-1.1.4a1 → pvxslibs-1.2.0a1}/src/type.cpp +0 -0
@@ -11,6 +11,9 @@ include src/pvxs/*.h
11
11
  include src/pvxs/*.h@
12
12
  include src/os/default/*.cpp
13
13
  include src/os/WIN32/*.cpp
14
+ include ioc/*.h
15
+ include ioc/*.cpp
16
+ include ioc/pvxs/*.h
14
17
 
15
18
  include bundle/libevent/LICENSE
16
19
  include bundle/libevent/cmake/VersionViaGit.cmake
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pvxslibs
3
- Version: 1.1.4a1
3
+ Version: 1.2.0a1
4
4
  Summary: PVXS libraries packaged for python
5
5
  Home-page: https://mdavidsaver.github.io/pvxs
6
6
  Author: Michael Davidsaver
@@ -75,8 +75,7 @@
75
75
  /* Add platform entropy 32 bytes (256 bits) at a time. */
76
76
  #define ADD_ENTROPY 32
77
77
 
78
- /* Re-seed from the platform RNG after generating this many bytes. */
79
- #define BYTES_BEFORE_RESEED 1600000
78
+ #define REKEY_BASE (1024*1024) /* NB. should be a power of 2 */
80
79
 
81
80
  struct arc4_stream {
82
81
  unsigned char i;
@@ -343,10 +342,13 @@ arc4_seed(void)
343
342
  return ok ? 0 : -1;
344
343
  }
345
344
 
345
+ static inline unsigned int
346
+ arc4_getword(void);
346
347
  static int
347
348
  arc4_stir(void)
348
349
  {
349
350
  int i;
351
+ ARC4RANDOM_UINT32 rekey_fuzz;
350
352
 
351
353
  if (!rs_initialized) {
352
354
  arc4_init();
@@ -377,7 +379,9 @@ arc4_stir(void)
377
379
  for (i = 0; i < 12*256; i++)
378
380
  (void)arc4_getbyte();
379
381
 
380
- arc4_count = BYTES_BEFORE_RESEED;
382
+ rekey_fuzz = arc4_getword();
383
+ /* rekey interval should not be predictable */
384
+ arc4_count = REKEY_BASE + (rekey_fuzz % REKEY_BASE);
381
385
 
382
386
  return 0;
383
387
  }
@@ -414,7 +418,7 @@ arc4_getword(void)
414
418
  {
415
419
  unsigned int val;
416
420
 
417
- val = arc4_getbyte() << 24;
421
+ val = (unsigned)arc4_getbyte() << 24;
418
422
  val |= arc4_getbyte() << 16;
419
423
  val |= arc4_getbyte() << 8;
420
424
  val |= arc4_getbyte();
@@ -467,6 +471,7 @@ arc4random(void)
467
471
  }
468
472
  #endif
469
473
 
474
+ #ifndef EVENT__HAVE_ARC4RANDOM_BUF
470
475
  ARC4RANDOM_EXPORT void
471
476
  arc4random_buf(void *buf_, size_t n)
472
477
  {
@@ -480,6 +485,7 @@ arc4random_buf(void *buf_, size_t n)
480
485
  }
481
486
  ARC4_UNLOCK_();
482
487
  }
488
+ #endif /* #ifndef EVENT__HAVE_ARC4RANDOM_BUF */
483
489
 
484
490
  #ifndef ARC4RANDOM_NOUNIFORM
485
491
  /*
@@ -158,17 +158,7 @@ evbuffer_chain_new(size_t size)
158
158
  if (size > EVBUFFER_CHAIN_MAX - EVBUFFER_CHAIN_SIZE)
159
159
  return (NULL);
160
160
 
161
- size += EVBUFFER_CHAIN_SIZE;
162
-
163
- /* get the next largest memory that can hold the buffer */
164
- if (size < EVBUFFER_CHAIN_MAX / 2) {
165
- to_alloc = MIN_BUFFER_SIZE;
166
- while (to_alloc < size) {
167
- to_alloc <<= 1;
168
- }
169
- } else {
170
- to_alloc = size;
171
- }
161
+ to_alloc = size + EVBUFFER_CHAIN_SIZE;
172
162
 
173
163
  /* we get everything in one chunk */
174
164
  if ((chain = mm_malloc(to_alloc)) == NULL)
@@ -188,6 +178,29 @@ evbuffer_chain_new(size_t size)
188
178
  return (chain);
189
179
  }
190
180
 
181
+ static struct evbuffer_chain *
182
+ evbuffer_chain_new_membuf(size_t size)
183
+ {
184
+ size_t to_alloc;
185
+
186
+ if (size > EVBUFFER_CHAIN_MAX - EVBUFFER_CHAIN_SIZE)
187
+ return (NULL);
188
+
189
+ size += EVBUFFER_CHAIN_SIZE;
190
+
191
+ /* get the next largest memory that can hold the buffer */
192
+ if (size < EVBUFFER_CHAIN_MAX / 2) {
193
+ to_alloc = MIN_BUFFER_SIZE;
194
+ while (to_alloc < size) {
195
+ to_alloc <<= 1;
196
+ }
197
+ } else {
198
+ to_alloc = size;
199
+ }
200
+
201
+ return evbuffer_chain_new(to_alloc - EVBUFFER_CHAIN_SIZE);
202
+ }
203
+
191
204
  static inline void
192
205
  evbuffer_chain_free(struct evbuffer_chain *chain)
193
206
  {
@@ -326,7 +339,7 @@ static inline struct evbuffer_chain *
326
339
  evbuffer_chain_insert_new(struct evbuffer *buf, size_t datlen)
327
340
  {
328
341
  struct evbuffer_chain *chain;
329
- if ((chain = evbuffer_chain_new(datlen)) == NULL)
342
+ if ((chain = evbuffer_chain_new_membuf(datlen)) == NULL)
330
343
  return NULL;
331
344
  evbuffer_chain_insert(buf, chain);
332
345
  return chain;
@@ -849,7 +862,7 @@ PRESERVE_PINNED(struct evbuffer *src, struct evbuffer_chain **first,
849
862
  struct evbuffer_chain *tmp;
850
863
 
851
864
  EVUTIL_ASSERT(pinned == src->last_with_datap);
852
- tmp = evbuffer_chain_new(chain->off);
865
+ tmp = evbuffer_chain_new_membuf(chain->off);
853
866
  if (!tmp)
854
867
  return -1;
855
868
  memcpy(tmp->buffer, chain->buffer + chain->misalign,
@@ -1418,7 +1431,7 @@ evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size)
1418
1431
  size -= old_off;
1419
1432
  chain = chain->next;
1420
1433
  } else {
1421
- if ((tmp = evbuffer_chain_new(size)) == NULL) {
1434
+ if ((tmp = evbuffer_chain_new_membuf(size)) == NULL) {
1422
1435
  event_warn("%s: out of memory", __func__);
1423
1436
  goto done;
1424
1437
  }
@@ -1655,7 +1668,7 @@ evbuffer_search_eol(struct evbuffer *buffer,
1655
1668
  if (evbuffer_strchr(&it, '\n') < 0)
1656
1669
  goto done;
1657
1670
  extra_drain = 1;
1658
- /* ... optionally preceeded by a CR. */
1671
+ /* ... optionally preceded by a CR. */
1659
1672
  if (it.pos == start_pos)
1660
1673
  break; /* If the first character is \n, don't back up */
1661
1674
  /* This potentially does an extra linear walk over the first
@@ -1766,10 +1779,9 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
1766
1779
  /* If there are no chains allocated for this buffer, allocate one
1767
1780
  * big enough to hold all the data. */
1768
1781
  if (chain == NULL) {
1769
- chain = evbuffer_chain_new(datlen);
1782
+ chain = evbuffer_chain_insert_new(buf, datlen);
1770
1783
  if (!chain)
1771
1784
  goto done;
1772
- evbuffer_chain_insert(buf, chain);
1773
1785
  }
1774
1786
 
1775
1787
  if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
@@ -1808,7 +1820,7 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
1808
1820
  to_alloc <<= 1;
1809
1821
  if (datlen > to_alloc)
1810
1822
  to_alloc = datlen;
1811
- tmp = evbuffer_chain_new(to_alloc);
1823
+ tmp = evbuffer_chain_new_membuf(to_alloc);
1812
1824
  if (tmp == NULL)
1813
1825
  goto done;
1814
1826
 
@@ -1858,10 +1870,9 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
1858
1870
  chain = buf->first;
1859
1871
 
1860
1872
  if (chain == NULL) {
1861
- chain = evbuffer_chain_new(datlen);
1873
+ chain = evbuffer_chain_insert_new(buf, datlen);
1862
1874
  if (!chain)
1863
1875
  goto done;
1864
- evbuffer_chain_insert(buf, chain);
1865
1876
  }
1866
1877
 
1867
1878
  /* we cannot touch immutable buffers */
@@ -1898,7 +1909,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
1898
1909
  }
1899
1910
 
1900
1911
  /* we need to add another chain */
1901
- if ((tmp = evbuffer_chain_new(datlen)) == NULL)
1912
+ if ((tmp = evbuffer_chain_new_membuf(datlen)) == NULL)
1902
1913
  goto done;
1903
1914
  buf->first = tmp;
1904
1915
  if (buf->last_with_datap == &buf->first && chain->off)
@@ -2027,7 +2038,7 @@ evbuffer_expand_singlechain(struct evbuffer *buf, size_t datlen)
2027
2038
  * MAX_TO_COPY_IN_EXPAND bytes. */
2028
2039
  /* figure out how much space we need */
2029
2040
  size_t length = chain->off + datlen;
2030
- struct evbuffer_chain *tmp = evbuffer_chain_new(length);
2041
+ struct evbuffer_chain *tmp = evbuffer_chain_new_membuf(length);
2031
2042
  if (tmp == NULL)
2032
2043
  goto err;
2033
2044
 
@@ -2073,12 +2084,11 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
2073
2084
  if (chain == NULL || (chain->flags & EVBUFFER_IMMUTABLE)) {
2074
2085
  /* There is no last chunk, or we can't touch the last chunk.
2075
2086
  * Just add a new chunk. */
2076
- chain = evbuffer_chain_new(datlen);
2087
+ chain = evbuffer_chain_insert_new(buf, datlen);
2077
2088
  if (chain == NULL)
2078
2089
  return (-1);
2079
-
2080
- evbuffer_chain_insert(buf, chain);
2081
- return (0);
2090
+ else
2091
+ return (0);
2082
2092
  }
2083
2093
 
2084
2094
  used = 0; /* number of chains we're using space in. */
@@ -2116,7 +2126,7 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
2116
2126
  * chains; we can add another. */
2117
2127
  EVUTIL_ASSERT(chain == NULL);
2118
2128
 
2119
- tmp = evbuffer_chain_new(datlen - avail);
2129
+ tmp = evbuffer_chain_new_membuf(datlen - avail);
2120
2130
  if (tmp == NULL)
2121
2131
  return (-1);
2122
2132
 
@@ -2148,7 +2158,7 @@ evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
2148
2158
  evbuffer_chain_free(chain);
2149
2159
  }
2150
2160
  EVUTIL_ASSERT(datlen >= avail);
2151
- tmp = evbuffer_chain_new(datlen - avail);
2161
+ tmp = evbuffer_chain_new_membuf(datlen - avail);
2152
2162
  if (tmp == NULL) {
2153
2163
  if (rmv_all) {
2154
2164
  ZERO_CHAIN(buf);
@@ -3054,7 +3064,7 @@ evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg)
3054
3064
  const ev_off_t length = seg->length;
3055
3065
  const ev_off_t offset = seg->file_offset;
3056
3066
 
3057
- if (seg->contents)
3067
+ if (seg->contents || seg->is_mapping)
3058
3068
  return 0; /* already materialized */
3059
3069
 
3060
3070
  #if defined(EVENT__HAVE_MMAP)
@@ -3070,7 +3080,11 @@ evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg)
3070
3080
  offset_leftover = offset % page_size;
3071
3081
  offset_rounded = offset - offset_leftover;
3072
3082
  }
3083
+ #if defined(EVENT__HAVE_MMAP64)
3084
+ mapped = mmap64(NULL, length + offset_leftover,
3085
+ #else
3073
3086
  mapped = mmap(NULL, length + offset_leftover,
3087
+ #endif
3074
3088
  PROT_READ,
3075
3089
  #ifdef MAP_NOCACHE
3076
3090
  MAP_NOCACHE | /* ??? */
@@ -3213,12 +3227,10 @@ evbuffer_add_file_segment(struct evbuffer *buf,
3213
3227
  if (buf->flags & EVBUFFER_FLAG_DRAINS_TO_FD) {
3214
3228
  can_use_sendfile = 1;
3215
3229
  } else {
3216
- if (!seg->contents) {
3217
- if (evbuffer_file_segment_materialize(seg)<0) {
3218
- EVLOCK_UNLOCK(seg->lock, 0);
3219
- EVBUFFER_UNLOCK(buf);
3220
- return -1;
3221
- }
3230
+ if (evbuffer_file_segment_materialize(seg)<0) {
3231
+ EVLOCK_UNLOCK(seg->lock, 0);
3232
+ EVBUFFER_UNLOCK(buf);
3233
+ return -1;
3222
3234
  }
3223
3235
  }
3224
3236
  EVLOCK_UNLOCK(seg->lock, 0);
@@ -69,7 +69,7 @@ struct evbuffer_overlapped {
69
69
  WSABUF buffers[MAX_WSABUFS];
70
70
  };
71
71
 
72
- /** Given an evbuffer, return the correponding evbuffer structure, or NULL if
72
+ /** Given an evbuffer, return the corresponding evbuffer structure, or NULL if
73
73
  * the evbuffer isn't overlapped. */
74
74
  static inline struct evbuffer_overlapped *
75
75
  upcast_evbuffer(struct evbuffer *buf)
@@ -485,8 +485,8 @@ bufferevent_socket_set_conn_address_(struct bufferevent *bev, struct sockaddr *a
485
485
  #define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_private, bev)
486
486
 
487
487
  #ifdef EVENT__DISABLE_THREAD_SUPPORT
488
- #define BEV_LOCK(b) EVUTIL_NIL_STMT_
489
- #define BEV_UNLOCK(b) EVUTIL_NIL_STMT_
488
+ #define BEV_LOCK(b) (void)(b)
489
+ #define BEV_UNLOCK(b) (void)(b)
490
490
  #else
491
491
  /** Internal: Grab the lock (if any) on a bufferevent */
492
492
  #define BEV_LOCK(b) do { \
@@ -501,7 +501,7 @@ bufferevent_enable(struct bufferevent *bufev, short event)
501
501
  if (impl_events && bufev->be_ops->enable(bufev, impl_events) < 0)
502
502
  r = -1;
503
503
  if (r)
504
- event_debug(("%s: cannot enable 0x%hx on %p", __func__, event, bufev));
504
+ event_debug(("%s: cannot enable 0x%hx on %p", __func__, event, (void *)bufev));
505
505
 
506
506
  bufferevent_decref_and_unlock_(bufev);
507
507
  return r;
@@ -585,7 +585,7 @@ bufferevent_disable(struct bufferevent *bufev, short event)
585
585
  if (bufev->be_ops->disable(bufev, event) < 0)
586
586
  r = -1;
587
587
  if (r)
588
- event_debug(("%s: cannot disable 0x%hx on %p", __func__, event, bufev));
588
+ event_debug(("%s: cannot disable 0x%hx on %p", __func__, event, (void *)bufev));
589
589
 
590
590
  BEV_UNLOCK(bufev);
591
591
  return r;
@@ -876,7 +876,7 @@ bufferevent_setfd(struct bufferevent *bev, evutil_socket_t fd)
876
876
  if (bev->be_ops->ctrl)
877
877
  res = bev->be_ops->ctrl(bev, BEV_CTRL_SET_FD, &d);
878
878
  if (res)
879
- event_debug(("%s: cannot set fd for %p to "EV_SOCK_FMT, __func__, bev, fd));
879
+ event_debug(("%s: cannot set fd for %p to "EV_SOCK_FMT, __func__, (void *)bev, fd));
880
880
  BEV_UNLOCK(bev);
881
881
  return res;
882
882
  }
@@ -903,7 +903,7 @@ bufferevent_replacefd(struct bufferevent *bev, evutil_socket_t fd)
903
903
  }
904
904
  }
905
905
  if (err)
906
- event_debug(("%s: cannot replace fd for %p from "EV_SOCK_FMT" to "EV_SOCK_FMT, __func__, bev, old_fd, fd));
906
+ event_debug(("%s: cannot replace fd for %p from "EV_SOCK_FMT" to "EV_SOCK_FMT, __func__, (void *)bev, old_fd, fd));
907
907
  BEV_UNLOCK(bev);
908
908
 
909
909
  return err;
@@ -919,7 +919,7 @@ bufferevent_getfd(struct bufferevent *bev)
919
919
  if (bev->be_ops->ctrl)
920
920
  res = bev->be_ops->ctrl(bev, BEV_CTRL_GET_FD, &d);
921
921
  if (res)
922
- event_debug(("%s: cannot get fd for %p", __func__, bev));
922
+ event_debug(("%s: cannot get fd for %p", __func__, (void *)bev));
923
923
  BEV_UNLOCK(bev);
924
924
  return (res<0) ? -1 : d.fd;
925
925
  }
@@ -24,8 +24,15 @@
24
24
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
25
  */
26
26
 
27
+
28
+ /* Mbed-TLS 3.x does not currently expose a function to retrieve
29
+ the bio parameters from the SSL object. When the above issue has been
30
+ fixed, remove the MBEDTLS_ALLOW_PRIVATE_ACCESS define and use the
31
+ appropriate getter function in bufferevent_mbedtls_socket_new rather than
32
+ accessing the struct fields directly. */
33
+ #define MBEDTLS_ALLOW_PRIVATE_ACCESS
27
34
  #include "mbedtls-compat.h"
28
- #include <mbedtls/config.h>
35
+ #include <mbedtls/version.h>
29
36
  #include <mbedtls/ssl.h>
30
37
  #include <mbedtls/error.h>
31
38
 
@@ -40,7 +47,7 @@
40
47
  #include "mm-internal.h"
41
48
 
42
49
  struct mbedtls_context {
43
- mbedtls_ssl_context *ssl;
50
+ mbedtls_dyncontext *ssl;
44
51
  mbedtls_net_context net;
45
52
  };
46
53
  static void *
@@ -58,7 +65,7 @@ mbedtls_context_free(void *ssl, int flags)
58
65
  {
59
66
  struct mbedtls_context *ctx = ssl;
60
67
  if (flags & BEV_OPT_CLOSE_ON_FREE)
61
- mbedtls_ssl_free(ctx->ssl);
68
+ bufferevent_mbedtls_dyncontext_free(ctx->ssl);
62
69
  mm_free(ctx);
63
70
  }
64
71
  static int
@@ -302,7 +309,7 @@ bufferevent_get_mbedtls_error(struct bufferevent *bufev)
302
309
  static struct le_ssl_ops le_mbedtls_ops = {
303
310
  mbedtls_context_init,
304
311
  mbedtls_context_free,
305
- (void (*)(void *))mbedtls_ssl_free,
312
+ (void (*)(void *))bufferevent_mbedtls_dyncontext_free,
306
313
  mbedtls_context_renegotiate,
307
314
  mbedtls_context_write,
308
315
  mbedtls_context_read,
@@ -345,7 +352,7 @@ bufferevent_mbedtls_filter_new(struct event_base *base,
345
352
 
346
353
  err:
347
354
  if (options & BEV_OPT_CLOSE_ON_FREE)
348
- mbedtls_ssl_free(ssl);
355
+ bufferevent_mbedtls_dyncontext_free(ssl);
349
356
  return NULL;
350
357
  }
351
358
 
@@ -400,3 +407,19 @@ bufferevent_mbedtls_socket_new(struct event_base *base, evutil_socket_t fd,
400
407
  err:
401
408
  return NULL;
402
409
  }
410
+
411
+ mbedtls_dyncontext *
412
+ bufferevent_mbedtls_dyncontext_new(struct mbedtls_ssl_config *conf)
413
+ {
414
+ mbedtls_dyncontext *ctx = mm_calloc(1, sizeof(*ctx));
415
+ mbedtls_ssl_init(ctx);
416
+ mbedtls_ssl_setup(ctx, conf);
417
+ return ctx;
418
+ }
419
+
420
+ void
421
+ bufferevent_mbedtls_dyncontext_free(mbedtls_dyncontext *ctx)
422
+ {
423
+ mbedtls_ssl_free(ctx);
424
+ mm_free(ctx);
425
+ }
@@ -259,7 +259,9 @@ conn_closed(struct bufferevent_ssl *bev_ssl, int when, int errcode, int ret)
259
259
  bufferevent_ssl_put_error(bev_ssl, errcode);
260
260
  break;
261
261
  case SSL_ERROR_SSL:
262
- /* Protocol error. */
262
+ /* Protocol error; possibly a dirty shutdown. */
263
+ if (ret == 0 && SSL_is_init_finished(bev_ssl->ssl) == 0)
264
+ dirty_shutdown = 1;
263
265
  bufferevent_ssl_put_error(bev_ssl, errcode);
264
266
  break;
265
267
  case SSL_ERROR_WANT_X509_LOOKUP:
@@ -475,7 +477,7 @@ bufferevent_openssl_socket_new(struct event_base *base,
475
477
  This is probably an error on our part. Fail. */
476
478
  goto err;
477
479
  }
478
- BIO_set_close(bio, 0);
480
+ (void)BIO_set_close(bio, 0);
479
481
  } else {
480
482
  /* The SSL isn't configured with a BIO with an fd. */
481
483
  if (fd >= 0) {
@@ -76,7 +76,7 @@ ev_token_bucket_update_(struct ev_token_bucket *bucket,
76
76
  ev_uint32_t current_tick)
77
77
  {
78
78
  /* It's okay if the tick number overflows, since we'll just
79
- * wrap around when we do the unsigned substraction. */
79
+ * wrap around when we do the unsigned subtraction. */
80
80
  unsigned n_ticks = current_tick - bucket->last_updated;
81
81
 
82
82
  /* Make sure some ticks actually happened, and that time didn't
@@ -385,7 +385,9 @@ do_write(struct bufferevent_ssl *bev_ssl, int atmost)
385
385
  }
386
386
  }
387
387
  if (n_written) {
388
- evbuffer_drain(output, n_written);
388
+ if (evbuffer_drain(output, n_written))
389
+ return OP_ERR | result;
390
+
389
391
  if (bev_ssl->underlying)
390
392
  BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
391
393
 
@@ -81,11 +81,13 @@
81
81
  #if defined(EVENT__HAVE_SYS_TIMERFD_H) && \
82
82
  defined(EVENT__HAVE_TIMERFD_CREATE) && \
83
83
  defined(HAVE_POSIX_MONOTONIC) && defined(TFD_NONBLOCK) && \
84
- defined(TFD_CLOEXEC)
84
+ defined(TFD_CLOEXEC) && !defined(EVENT__HAVE_EPOLL_PWAIT2)
85
85
  /* Note that we only use timerfd if TFD_NONBLOCK and TFD_CLOEXEC are available
86
86
  and working. This means that we can't support it on 2.6.25 (where timerfd
87
- was introduced) or 2.6.26, since 2.6.27 introduced those flags.
88
- */
87
+ was introduced) or 2.6.26, since 2.6.27 introduced those flags. On recent
88
+ enough systems (with 5.11 and never) and so epoll_pwait2() with nanosecond
89
+ precision for timeouts, timerfd is not needed at all.
90
+ */
89
91
  #define USING_TIMERFD
90
92
  #endif
91
93
 
@@ -253,7 +255,8 @@ epoll_init(struct event_base *base)
253
255
  }
254
256
  #endif
255
257
 
256
- evsig_init_(base);
258
+ if (sigfd_init_(base) < 0)
259
+ evsig_init_(base);
257
260
 
258
261
  return (epollop);
259
262
  }
@@ -459,7 +462,11 @@ epoll_dispatch(struct event_base *base, struct timeval *tv)
459
462
  struct epollop *epollop = base->evbase;
460
463
  struct epoll_event *events = epollop->events;
461
464
  int i, res;
465
+ #if defined(EVENT__HAVE_EPOLL_PWAIT2)
466
+ struct timespec ts = { 0, 0 };
467
+ #else /* no epoll_pwait2() */
462
468
  long timeout = -1;
469
+ #endif /* EVENT__HAVE_EPOLL_PWAIT2 */
463
470
 
464
471
  #ifdef USING_TIMERFD
465
472
  if (epollop->timerfd >= 0) {
@@ -489,12 +496,16 @@ epoll_dispatch(struct event_base *base, struct timeval *tv)
489
496
  } else
490
497
  #endif
491
498
  if (tv != NULL) {
499
+ #if defined(EVENT__HAVE_EPOLL_PWAIT2)
500
+ TIMEVAL_TO_TIMESPEC(tv, &ts);
501
+ #else /* no epoll_pwait2() */
492
502
  timeout = evutil_tv_to_msec_(tv);
493
503
  if (timeout < 0 || timeout > MAX_EPOLL_TIMEOUT_MSEC) {
494
504
  /* Linux kernels can wait forever if the timeout is
495
505
  * too big; see comment on MAX_EPOLL_TIMEOUT_MSEC. */
496
506
  timeout = MAX_EPOLL_TIMEOUT_MSEC;
497
507
  }
508
+ #endif /* EVENT__HAVE_EPOLL_PWAIT2 */
498
509
  }
499
510
 
500
511
  epoll_apply_changes(base);
@@ -502,7 +513,11 @@ epoll_dispatch(struct event_base *base, struct timeval *tv)
502
513
 
503
514
  EVBASE_RELEASE_LOCK(base, th_base_lock);
504
515
 
516
+ #if defined(EVENT__HAVE_EPOLL_PWAIT2)
517
+ res = epoll_pwait2(epollop->epfd, events, epollop->nevents, tv ? &ts : NULL, NULL);
518
+ #else /* no epoll_pwait2() */
505
519
  res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout);
520
+ #endif /* EVENT__HAVE_EPOLL_PWAIT2 */
506
521
 
507
522
  EVBASE_ACQUIRE_LOCK(base, th_base_lock);
508
523