eventmachine 1.0.3-x86-mingw32 → 1.2.0.dev.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +84 -1
  3. data/README.md +6 -7
  4. data/ext/binder.cpp +10 -10
  5. data/ext/binder.h +5 -5
  6. data/ext/cmain.cpp +173 -61
  7. data/ext/ed.cpp +262 -127
  8. data/ext/ed.h +50 -30
  9. data/ext/em.cpp +491 -445
  10. data/ext/em.h +101 -36
  11. data/ext/eventmachine.h +67 -51
  12. data/ext/extconf.rb +124 -31
  13. data/ext/fastfilereader/extconf.rb +9 -2
  14. data/ext/fastfilereader/mapper.cpp +3 -1
  15. data/ext/fastfilereader/rubymain.cpp +7 -7
  16. data/ext/kb.cpp +1 -1
  17. data/ext/pipe.cpp +11 -4
  18. data/ext/project.h +26 -6
  19. data/ext/rubymain.cpp +408 -201
  20. data/ext/ssl.cpp +167 -20
  21. data/ext/ssl.h +11 -2
  22. data/java/src/com/rubyeventmachine/EmReactor.java +16 -0
  23. data/java/src/com/rubyeventmachine/EventableChannel.java +2 -0
  24. data/java/src/com/rubyeventmachine/EventableDatagramChannel.java +6 -0
  25. data/java/src/com/rubyeventmachine/EventableSocketChannel.java +55 -10
  26. data/lib/1.9/fastfilereaderext.so +0 -0
  27. data/lib/1.9/rubyeventmachine.so +0 -0
  28. data/lib/2.0/fastfilereaderext.so +0 -0
  29. data/lib/2.0/rubyeventmachine.so +0 -0
  30. data/lib/2.1/fastfilereaderext.so +0 -0
  31. data/lib/2.1/rubyeventmachine.so +0 -0
  32. data/lib/2.2/fastfilereaderext.so +0 -0
  33. data/lib/2.2/rubyeventmachine.so +0 -0
  34. data/lib/2.3/fastfilereaderext.so +0 -0
  35. data/lib/2.3/rubyeventmachine.so +0 -0
  36. data/lib/em/buftok.rb +34 -85
  37. data/lib/em/channel.rb +5 -0
  38. data/lib/em/completion.rb +2 -2
  39. data/lib/em/connection.rb +62 -4
  40. data/lib/em/iterator.rb +30 -48
  41. data/lib/em/pool.rb +1 -1
  42. data/lib/em/protocols/httpclient.rb +31 -11
  43. data/lib/em/protocols/line_and_text.rb +4 -4
  44. data/lib/em/protocols/linetext2.rb +44 -39
  45. data/lib/em/protocols/smtpclient.rb +60 -31
  46. data/lib/em/protocols/smtpserver.rb +32 -9
  47. data/lib/em/pure_ruby.rb +8 -3
  48. data/lib/em/queue.rb +16 -7
  49. data/lib/em/resolver.rb +64 -24
  50. data/lib/em/threaded_resource.rb +2 -2
  51. data/lib/em/tick_loop.rb +19 -19
  52. data/lib/em/version.rb +1 -1
  53. data/lib/eventmachine.rb +96 -49
  54. data/lib/jeventmachine.rb +17 -0
  55. data/rakelib/package.rake +31 -4
  56. data/tests/dhparam.pem +13 -0
  57. data/tests/em_test_helper.rb +87 -0
  58. data/tests/test_attach.rb +25 -0
  59. data/tests/test_basic.rb +27 -38
  60. data/tests/test_channel.rb +14 -1
  61. data/tests/test_completion.rb +1 -0
  62. data/tests/test_connection_count.rb +22 -1
  63. data/tests/test_connection_write.rb +35 -0
  64. data/tests/test_defer.rb +17 -0
  65. data/tests/test_epoll.rb +26 -14
  66. data/tests/test_file_watch.rb +1 -0
  67. data/tests/test_fork.rb +75 -0
  68. data/tests/test_httpclient.rb +43 -0
  69. data/tests/test_idle_connection.rb +6 -4
  70. data/tests/test_ipv4.rb +125 -0
  71. data/tests/test_ipv6.rb +131 -0
  72. data/tests/test_iterator.rb +115 -0
  73. data/tests/test_kb.rb +19 -25
  74. data/tests/test_ltp2.rb +20 -0
  75. data/tests/test_many_fds.rb +22 -0
  76. data/tests/test_pause.rb +29 -0
  77. data/tests/test_pool.rb +2 -0
  78. data/tests/test_process_watch.rb +2 -0
  79. data/tests/test_processes.rb +7 -7
  80. data/tests/test_queue.rb +14 -0
  81. data/tests/test_resolver.rb +56 -7
  82. data/tests/test_set_sock_opt.rb +2 -0
  83. data/tests/test_smtpclient.rb +20 -0
  84. data/tests/test_ssl_args.rb +2 -2
  85. data/tests/test_ssl_dhparam.rb +83 -0
  86. data/tests/test_ssl_ecdh_curve.rb +79 -0
  87. data/tests/test_ssl_extensions.rb +49 -0
  88. data/tests/test_ssl_methods.rb +22 -5
  89. data/tests/test_ssl_protocols.rb +246 -0
  90. data/tests/test_ssl_verify.rb +103 -59
  91. data/tests/test_system.rb +4 -0
  92. data/tests/test_threaded_resource.rb +8 -0
  93. data/tests/test_unbind_reason.rb +5 -1
  94. metadata +173 -107
  95. data/.gitignore +0 -21
  96. data/.travis.yml +0 -12
  97. data/.yardopts +0 -7
  98. data/Gemfile +0 -2
  99. data/Rakefile +0 -20
  100. data/eventmachine.gemspec +0 -36
  101. data/rakelib/cpp.rake_example +0 -77
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 199fa0af2fdede2b8d9d66fdd724c6d836043b44
4
+ data.tar.gz: ec3160e659a2f1b3903ea9be5474652832e9c6d0
5
+ SHA512:
6
+ metadata.gz: 41e15ef05fa420324f82802580a076935018159263f95c2ffd344e7b13d28ccf9461610ce64bfd1d006cce56c7408f91260fad103396f7f603f0ba52bf30c1cb
7
+ data.tar.gz: db2886956369bb59177e1bc3c2b0c2c6ee1557f61c518fce4bf0b9a018acd4751ac391f6c230a4d0a791a5d1157b7dd5a48a079b7e393704973ff6ae042636be
@@ -1,6 +1,89 @@
1
1
  # Changelog
2
2
 
3
- ## 1.0.x
3
+ ## 1.0.9.1 (January 14, 2016)
4
+ * Fix EPROTO not defined on Windows [#676]
5
+ * Fix missing cast to struct sockaddr * [#671]
6
+ * Fix bug in OpenSSL path detection [#675]
7
+
8
+ ## 1.0.9 (January 13, 2016)
9
+ * Try more ways to detect OpenSSL [#602, #643, #661, #663, #668, #669]
10
+ * Use WSAGetLastError in pipe.cpp same as ed.cpp [#659]
11
+ * Test compiler flags with the C++ compiler and add them to CXXFLAGS [#634, #651]
12
+ * Restore silent-fail on unsupported EM.epoll and EM.kqueue [#638, #649]
13
+ * getDescriptorByFileno deprecated in JRuby 1.7.x, removed in JRuby 9000 [#642, #648]
14
+ * Add -Wno-address always-true because on Windows rb_fd_select [#578]
15
+ * Remove the WITHOUT_SSL constant [#578]
16
+ * Fix SSL error when the server replies a TLS Alert to our ClientHello [#544, #653]
17
+ * Use WSAStringToAddress in lieu of inet_pton for IPv6 address detection on Windows [#595, #632]
18
+ * Fix nasty TCP/IPv6 bug [#595, #632]
19
+ * Use select_large_fdset on Solaris [#611, #625]
20
+ * Detect the Solaris Studio compiler [#611, #625]
21
+ * Throw a message with strerror included [#136, #621]
22
+
23
+ ## 1.0.8 (August 6, 2015)
24
+ * fix kqueue assertion failed, postpone ArmKqueueWriter until all events are processed [#51, #176, #372, #401, #619]
25
+ * fix Rubinius GC, crank the machine from Ruby space when running Rubinius [#201, #202, #617]
26
+ * test to show that LineText2 preserves whitespace and newlines [#32, #622]
27
+ * bump up compiler warnings and resolve them [#616]
28
+ * fix Windows x64 use uintptr_t instead of unsigned long for binding pointers [#612, #615]
29
+ * fix linetext2 unroll tail recursion to avoid stack level too deep [#609]
30
+ * fix for compilation with SSL on windows [#601]
31
+ * open file descriptors and sockets with O_CLOEXEC where possible [#298, #488, #591]
32
+ * fix SmtpClient: send second EHLO after STARTTLS. [#589]
33
+ * fix nul-terminated strings in C, use StringValueCStr instead of StringValuePtr
34
+
35
+ ## 1.0.7 (February 10, 2015)
36
+ * fix delay in kqueue/epoll reactor shutdown when timers exist [#587]
37
+ * fix memory leak introduced in v1.0.5 [#586]
38
+ * expose EM.set_simultaneous_accept_count [#420]
39
+ * fix busy loop when EM.run and EM.next_tick are invoked from exception handler [#452]
40
+
41
+ ## 1.0.6 (February 3, 2015)
42
+ * add support for Rubinius Process::Status [#568]
43
+ * small bugfixes for SmtpServer [#449]
44
+ * update buftok.rb [#547]
45
+ * fix assertion on Write() [#525]
46
+ * work around mkmf.rb bug preventing gem installation [#574]
47
+ * add pause/resume support to jruby reactor [#556]
48
+ * fix pure ruby reactor to use 127.0.0.1 instead of localhost [#439]
49
+ * fix compilation under macruby [#243]
50
+ * add chunked encoding to http client [#111]
51
+ * fix errors on win32 when dealing with pipes [1ea45498] [#105]
52
+
53
+ ## 1.0.5 (February 2, 2015)
54
+ * use monotonic clocks on Linux, OS X, Solaris, and Windows [#563]
55
+ * use the rb_fd_* API to get autosized fd_sets [#502]
56
+ * add basic tests that the DNS resolver isn't leaking timers [#571]
57
+ * update to test-unit 2.x and improve various unit tests [#551]
58
+ * remove EventMachine_t::Popen code marked by ifdef OBSOLETE [#551]
59
+ * ruby 2.0 may fail at Queue.pop, so rescue and complain to $stderr [#551]
60
+ * set file handle to INVALID_HANDLE_VALUE after closing the file [#565]
61
+ * use `defined?` instead of rescuing NameError for flow control [#535]
62
+ * fix closing files and sockets on Windows [#564]
63
+ * fix file uploads in Windows [#562]
64
+ * catch failure to fork [#539]
65
+ * use chunks for SSL write [#545]
66
+
67
+ ## 1.0.4 (December 19, 2014)
68
+ * add starttls_options to smtp server [#552]
69
+ * fix closesocket on windows [#497]
70
+ * fix build on ruby 2.2 [#503]
71
+ * fix build error on ruby 1.9 [#508]
72
+ * fix timer leak during dns resolution [#489]
73
+ * add concurrency validation to EM::Iterator [#468]
74
+ * add get_file_descriptor to get fd for a signature [#467]
75
+ * add EM.attach_server and EM.attach_socket_server [#465, #466]
76
+ * calling pause from receive_data takes effect immediately [#464]
77
+ * reactor_running? returns false after fork [#455]
78
+ * fix infinite loop on double close [edc4d0e6, #441, #445]
79
+ * fix compilation issue on llvm [#433]
80
+ * fix socket error codes on win32 [ff811a81]
81
+ * fix EM.stop latency when timers exist [8b613d05, #426]
82
+ * fix infinite loop when system time changes [1427a2c80, #428]
83
+ * fix crash when callin attach/detach in the same tick [#427]
84
+ * fix compilation issue on solaris [#416]
85
+
86
+ ## 1.0.3 (March 8, 2013)
4
87
  * EM.system was broken in 1.0.2 release [#413]
5
88
 
6
89
  ## 1.0.2 (March 8, 2013)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # About EventMachine #
1
+ # About EventMachine [![Code Climate](https://codeclimate.com/github/eventmachine/eventmachine.svg)](https://codeclimate.com/github/eventmachine/eventmachine)
2
2
 
3
3
 
4
4
  ## What is EventMachine ##
@@ -18,7 +18,7 @@ This unique combination makes EventMachine a premier choice for designers of cri
18
18
  applications, including Web servers and proxies, email and IM production systems, authentication/authorization
19
19
  processors, and many more.
20
20
 
21
- EventMachine has been around since the early 2000s and is a mature and battle tested library.
21
+ EventMachine has been around since the early 2000s and is a mature and battle-tested library.
22
22
 
23
23
 
24
24
  ## What EventMachine is good for? ##
@@ -32,7 +32,7 @@ EventMachine has been around since the early 2000s and is a mature and battle te
32
32
 
33
33
  ## What platforms are supported by EventMachine? ##
34
34
 
35
- EventMachine supports Ruby 1.8.7, 1.9.2, REE, JRuby and **works well on Windows** as well
35
+ EventMachine supports Ruby >= 1.8.7 and <= 2.2 REE, JRuby and **works well on Windows** as well
36
36
  as many operating systems from the Unix family (Linux, Mac OS X, BSD flavors).
37
37
 
38
38
 
@@ -75,7 +75,7 @@ Here's a fully-functional echo server written with EventMachine:
75
75
 
76
76
  def unbind
77
77
  puts "-- someone disconnected from the echo server!"
78
- end
78
+ end
79
79
  end
80
80
 
81
81
  # Note that this will block current thread.
@@ -86,7 +86,7 @@ Here's a fully-functional echo server written with EventMachine:
86
86
 
87
87
  ## EventMachine documentation ##
88
88
 
89
- Currently we only have [reference documentation](http://eventmachine.rubyforge.org) and a [wiki](https://github.com/eventmachine/eventmachine/wiki).
89
+ Currently we only have [reference documentation](http://rdoc.info/github/eventmachine/eventmachine/frames) and a [wiki](https://github.com/eventmachine/eventmachine/wiki).
90
90
 
91
91
 
92
92
  ## Community and where to get help ##
@@ -105,5 +105,4 @@ Copyright: (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
105
105
 
106
106
  ## Alternatives ##
107
107
 
108
- If you are unhappy with EventMachine and want to use Ruby, check out [Cool.io](http://coolio.github.com/).
109
- One caveat: by May 2011, it did not support JRuby and Windows.
108
+ If you are unhappy with EventMachine and want to use Ruby, check out [Celluloid](https://celluloid.io/).
@@ -22,17 +22,17 @@ See the file COPYING for complete licensing information.
22
22
  #define DEV_URANDOM "/dev/urandom"
23
23
 
24
24
 
25
- map<unsigned long, Bindable_t*> Bindable_t::BindingBag;
25
+ map<uintptr_t, Bindable_t*> Bindable_t::BindingBag;
26
26
 
27
27
 
28
28
  /********************************
29
29
  STATIC Bindable_t::CreateBinding
30
30
  ********************************/
31
31
 
32
- unsigned long Bindable_t::CreateBinding()
32
+ uintptr_t Bindable_t::CreateBinding()
33
33
  {
34
- static unsigned long num = 0;
35
- while(BindingBag[++num]);
34
+ static uintptr_t num = 0;
35
+ while(BindingBag[++num]) {}
36
36
  return num;
37
37
  }
38
38
 
@@ -90,13 +90,13 @@ string Bindable_t::CreateBinding()
90
90
  STATIC: Bindable_t::GetObject
91
91
  *****************************/
92
92
 
93
- Bindable_t *Bindable_t::GetObject (const unsigned long binding)
93
+ Bindable_t *Bindable_t::GetObject (const uintptr_t binding)
94
94
  {
95
- map<unsigned long, Bindable_t*>::const_iterator i = BindingBag.find (binding);
96
- if (i != BindingBag.end())
97
- return i->second;
98
- else
99
- return NULL;
95
+ map<uintptr_t, Bindable_t*>::const_iterator i = BindingBag.find (binding);
96
+ if (i != BindingBag.end())
97
+ return i->second;
98
+ else
99
+ return NULL;
100
100
  }
101
101
 
102
102
 
@@ -24,18 +24,18 @@ See the file COPYING for complete licensing information.
24
24
  class Bindable_t
25
25
  {
26
26
  public:
27
- static unsigned long CreateBinding();
28
- static Bindable_t *GetObject (const unsigned long);
29
- static map<unsigned long, Bindable_t*> BindingBag;
27
+ static uintptr_t CreateBinding();
28
+ static Bindable_t *GetObject (const uintptr_t);
29
+ static map<uintptr_t, Bindable_t*> BindingBag;
30
30
 
31
31
  public:
32
32
  Bindable_t();
33
33
  virtual ~Bindable_t();
34
34
 
35
- const unsigned long GetBinding() {return Binding;}
35
+ const uintptr_t GetBinding() {return Binding;}
36
36
 
37
37
  private:
38
- unsigned long Binding;
38
+ uintptr_t Binding;
39
39
  };
40
40
 
41
41
 
@@ -29,8 +29,7 @@ See the file COPYING for complete licensing information.
29
29
  #endif
30
30
 
31
31
  static EventMachine_t *EventMachine;
32
- static int bUseEpoll = 0;
33
- static int bUseKqueue = 0;
32
+ static Poller_t Poller = Poller_Default;
34
33
 
35
34
  extern "C" void ensure_eventmachine (const char *caller = "unknown caller")
36
35
  {
@@ -58,11 +57,8 @@ extern "C" void evma_initialize_library (EMCallback cb)
58
57
  #else
59
58
  throw std::runtime_error ("eventmachine already initialized: evma_initialize_library");
60
59
  #endif
61
- EventMachine = new EventMachine_t (cb);
62
- if (bUseEpoll)
63
- EventMachine->_UseEpoll();
64
- if (bUseKqueue)
65
- EventMachine->_UseKqueue();
60
+
61
+ EventMachine = new EventMachine_t (cb, Poller);
66
62
  }
67
63
 
68
64
 
@@ -78,6 +74,17 @@ extern "C" void evma_release_library()
78
74
  }
79
75
 
80
76
 
77
+ /*********************
78
+ evma_run_machine_once
79
+ *********************/
80
+
81
+ extern "C" bool evma_run_machine_once()
82
+ {
83
+ ensure_eventmachine("evma_run_machine_once");
84
+ return EventMachine->RunOnce();
85
+ }
86
+
87
+
81
88
  /****************
82
89
  evma_run_machine
83
90
  ****************/
@@ -93,7 +100,7 @@ extern "C" void evma_run_machine()
93
100
  evma_install_oneshot_timer
94
101
  **************************/
95
102
 
96
- extern "C" const unsigned long evma_install_oneshot_timer (int seconds)
103
+ extern "C" const uintptr_t evma_install_oneshot_timer (int seconds)
97
104
  {
98
105
  ensure_eventmachine("evma_install_oneshot_timer");
99
106
  return EventMachine->InstallOneshotTimer (seconds);
@@ -104,7 +111,7 @@ extern "C" const unsigned long evma_install_oneshot_timer (int seconds)
104
111
  evma_connect_to_server
105
112
  **********************/
106
113
 
107
- extern "C" const unsigned long evma_connect_to_server (const char *bind_addr, int bind_port, const char *server, int port)
114
+ extern "C" const uintptr_t evma_connect_to_server (const char *bind_addr, int bind_port, const char *server, int port)
108
115
  {
109
116
  ensure_eventmachine("evma_connect_to_server");
110
117
  return EventMachine->ConnectToServer (bind_addr, bind_port, server, port);
@@ -114,7 +121,7 @@ extern "C" const unsigned long evma_connect_to_server (const char *bind_addr, in
114
121
  evma_connect_to_unix_server
115
122
  ***************************/
116
123
 
117
- extern "C" const unsigned long evma_connect_to_unix_server (const char *server)
124
+ extern "C" const uintptr_t evma_connect_to_unix_server (const char *server)
118
125
  {
119
126
  ensure_eventmachine("evma_connect_to_unix_server");
120
127
  return EventMachine->ConnectToUnixServer (server);
@@ -124,7 +131,7 @@ extern "C" const unsigned long evma_connect_to_unix_server (const char *server)
124
131
  evma_attach_fd
125
132
  **************/
126
133
 
127
- extern "C" const unsigned long evma_attach_fd (int file_descriptor, int watch_mode)
134
+ extern "C" const uintptr_t evma_attach_fd (int file_descriptor, int watch_mode)
128
135
  {
129
136
  ensure_eventmachine("evma_attach_fd");
130
137
  return EventMachine->AttachFD (file_descriptor, watch_mode ? true : false);
@@ -134,7 +141,7 @@ extern "C" const unsigned long evma_attach_fd (int file_descriptor, int watch_mo
134
141
  evma_detach_fd
135
142
  **************/
136
143
 
137
- extern "C" int evma_detach_fd (const unsigned long binding)
144
+ extern "C" int evma_detach_fd (const uintptr_t binding)
138
145
  {
139
146
  ensure_eventmachine("evma_detach_fd");
140
147
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -153,7 +160,7 @@ extern "C" int evma_detach_fd (const unsigned long binding)
153
160
  evma_get_file_descriptor
154
161
  ************************/
155
162
 
156
- extern "C" int evma_get_file_descriptor (const unsigned long binding)
163
+ extern "C" int evma_get_file_descriptor (const uintptr_t binding)
157
164
  {
158
165
  ensure_eventmachine("evma_get_file_descriptor");
159
166
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -172,7 +179,7 @@ extern "C" int evma_get_file_descriptor (const unsigned long binding)
172
179
  evma_is_notify_readable
173
180
  ***********************/
174
181
 
175
- extern "C" int evma_is_notify_readable (const unsigned long binding)
182
+ extern "C" int evma_is_notify_readable (const uintptr_t binding)
176
183
  {
177
184
  ConnectionDescriptor *cd = dynamic_cast <ConnectionDescriptor*> (Bindable_t::GetObject (binding));
178
185
  if (cd)
@@ -184,7 +191,7 @@ extern "C" int evma_is_notify_readable (const unsigned long binding)
184
191
  evma_set_notify_readable
185
192
  ************************/
186
193
 
187
- extern "C" void evma_set_notify_readable (const unsigned long binding, int mode)
194
+ extern "C" void evma_set_notify_readable (const uintptr_t binding, int mode)
188
195
  {
189
196
  ConnectionDescriptor *cd = dynamic_cast <ConnectionDescriptor*> (Bindable_t::GetObject (binding));
190
197
  if (cd)
@@ -195,7 +202,7 @@ extern "C" void evma_set_notify_readable (const unsigned long binding, int mode)
195
202
  evma_is_notify_writable
196
203
  ***********************/
197
204
 
198
- extern "C" int evma_is_notify_writable (const unsigned long binding)
205
+ extern "C" int evma_is_notify_writable (const uintptr_t binding)
199
206
  {
200
207
  ConnectionDescriptor *cd = dynamic_cast <ConnectionDescriptor*> (Bindable_t::GetObject (binding));
201
208
  if (cd)
@@ -207,7 +214,7 @@ extern "C" int evma_is_notify_writable (const unsigned long binding)
207
214
  evma_set_notify_writable
208
215
  ************************/
209
216
 
210
- extern "C" void evma_set_notify_writable (const unsigned long binding, int mode)
217
+ extern "C" void evma_set_notify_writable (const uintptr_t binding, int mode)
211
218
  {
212
219
  ConnectionDescriptor *cd = dynamic_cast <ConnectionDescriptor*> (Bindable_t::GetObject (binding));
213
220
  if (cd)
@@ -218,7 +225,7 @@ extern "C" void evma_set_notify_writable (const unsigned long binding, int mode)
218
225
  evma_pause
219
226
  **********/
220
227
 
221
- extern "C" int evma_pause (const unsigned long binding)
228
+ extern "C" int evma_pause (const uintptr_t binding)
222
229
  {
223
230
  EventableDescriptor *cd = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
224
231
  if (cd)
@@ -231,7 +238,7 @@ extern "C" int evma_pause (const unsigned long binding)
231
238
  evma_resume
232
239
  ***********/
233
240
 
234
- extern "C" int evma_resume (const unsigned long binding)
241
+ extern "C" int evma_resume (const uintptr_t binding)
235
242
  {
236
243
  EventableDescriptor *cd = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
237
244
  if (cd)
@@ -244,7 +251,7 @@ extern "C" int evma_resume (const unsigned long binding)
244
251
  evma_is_paused
245
252
  **************/
246
253
 
247
- extern "C" int evma_is_paused (const unsigned long binding)
254
+ extern "C" int evma_is_paused (const uintptr_t binding)
248
255
  {
249
256
  EventableDescriptor *cd = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
250
257
  if (cd)
@@ -259,6 +266,7 @@ evma_num_close_scheduled
259
266
 
260
267
  extern "C" int evma_num_close_scheduled ()
261
268
  {
269
+ ensure_eventmachine("evma_num_close_scheduled");
262
270
  return EventMachine->NumCloseScheduled;
263
271
  }
264
272
 
@@ -266,7 +274,7 @@ extern "C" int evma_num_close_scheduled ()
266
274
  evma_create_tcp_server
267
275
  **********************/
268
276
 
269
- extern "C" const unsigned long evma_create_tcp_server (const char *address, int port)
277
+ extern "C" const uintptr_t evma_create_tcp_server (const char *address, int port)
270
278
  {
271
279
  ensure_eventmachine("evma_create_tcp_server");
272
280
  return EventMachine->CreateTcpServer (address, port);
@@ -276,17 +284,27 @@ extern "C" const unsigned long evma_create_tcp_server (const char *address, int
276
284
  evma_create_unix_domain_server
277
285
  ******************************/
278
286
 
279
- extern "C" const unsigned long evma_create_unix_domain_server (const char *filename)
287
+ extern "C" const uintptr_t evma_create_unix_domain_server (const char *filename)
280
288
  {
281
289
  ensure_eventmachine("evma_create_unix_domain_server");
282
290
  return EventMachine->CreateUnixDomainServer (filename);
283
291
  }
284
292
 
293
+ /***********************
294
+ evma_attach_sd
295
+ ************************/
296
+
297
+ extern "C" const uintptr_t evma_attach_sd (int sd)
298
+ {
299
+ ensure_eventmachine("evma_attach_sd");
300
+ return EventMachine->AttachSD (sd);
301
+ }
302
+
285
303
  /*************************
286
304
  evma_open_datagram_socket
287
305
  *************************/
288
306
 
289
- extern "C" const unsigned long evma_open_datagram_socket (const char *address, int port)
307
+ extern "C" const uintptr_t evma_open_datagram_socket (const char *address, int port)
290
308
  {
291
309
  ensure_eventmachine("evma_open_datagram_socket");
292
310
  return EventMachine->OpenDatagramSocket (address, port);
@@ -296,7 +314,7 @@ extern "C" const unsigned long evma_open_datagram_socket (const char *address, i
296
314
  evma_open_keyboard
297
315
  ******************/
298
316
 
299
- extern "C" const unsigned long evma_open_keyboard()
317
+ extern "C" const uintptr_t evma_open_keyboard()
300
318
  {
301
319
  ensure_eventmachine("evma_open_keyboard");
302
320
  return EventMachine->OpenKeyboard();
@@ -306,7 +324,7 @@ extern "C" const unsigned long evma_open_keyboard()
306
324
  evma_watch_filename
307
325
  *******************/
308
326
 
309
- extern "C" const unsigned long evma_watch_filename (const char *fname)
327
+ extern "C" const uintptr_t evma_watch_filename (const char *fname)
310
328
  {
311
329
  ensure_eventmachine("evma_watch_filename");
312
330
  return EventMachine->WatchFile(fname);
@@ -316,7 +334,7 @@ extern "C" const unsigned long evma_watch_filename (const char *fname)
316
334
  evma_unwatch_filename
317
335
  *********************/
318
336
 
319
- extern "C" void evma_unwatch_filename (const unsigned long sig)
337
+ extern "C" void evma_unwatch_filename (const uintptr_t sig)
320
338
  {
321
339
  ensure_eventmachine("evma_unwatch_file");
322
340
  EventMachine->UnwatchFile(sig);
@@ -326,7 +344,7 @@ extern "C" void evma_unwatch_filename (const unsigned long sig)
326
344
  evma_watch_pid
327
345
  **************/
328
346
 
329
- extern "C" const unsigned long evma_watch_pid (int pid)
347
+ extern "C" const uintptr_t evma_watch_pid (int pid)
330
348
  {
331
349
  ensure_eventmachine("evma_watch_pid");
332
350
  return EventMachine->WatchPid(pid);
@@ -336,7 +354,7 @@ extern "C" const unsigned long evma_watch_pid (int pid)
336
354
  evma_unwatch_pid
337
355
  ****************/
338
356
 
339
- extern "C" void evma_unwatch_pid (const unsigned long sig)
357
+ extern "C" void evma_unwatch_pid (const uintptr_t sig)
340
358
  {
341
359
  ensure_eventmachine("evma_unwatch_pid");
342
360
  EventMachine->UnwatchPid(sig);
@@ -346,7 +364,7 @@ extern "C" void evma_unwatch_pid (const unsigned long sig)
346
364
  evma_send_data_to_connection
347
365
  ****************************/
348
366
 
349
- extern "C" int evma_send_data_to_connection (const unsigned long binding, const char *data, int data_length)
367
+ extern "C" int evma_send_data_to_connection (const uintptr_t binding, const char *data, int data_length)
350
368
  {
351
369
  ensure_eventmachine("evma_send_data_to_connection");
352
370
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -359,7 +377,7 @@ extern "C" int evma_send_data_to_connection (const unsigned long binding, const
359
377
  evma_send_datagram
360
378
  ******************/
361
379
 
362
- extern "C" int evma_send_datagram (const unsigned long binding, const char *data, int data_length, const char *address, int port)
380
+ extern "C" int evma_send_datagram (const uintptr_t binding, const char *data, int data_length, const char *address, int port)
363
381
  {
364
382
  ensure_eventmachine("evma_send_datagram");
365
383
  DatagramDescriptor *dd = dynamic_cast <DatagramDescriptor*> (Bindable_t::GetObject (binding));
@@ -373,7 +391,7 @@ extern "C" int evma_send_datagram (const unsigned long binding, const char *data
373
391
  evma_close_connection
374
392
  *********************/
375
393
 
376
- extern "C" void evma_close_connection (const unsigned long binding, int after_writing)
394
+ extern "C" void evma_close_connection (const uintptr_t binding, int after_writing)
377
395
  {
378
396
  ensure_eventmachine("evma_close_connection");
379
397
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -385,7 +403,7 @@ extern "C" void evma_close_connection (const unsigned long binding, int after_wr
385
403
  evma_report_connection_error_status
386
404
  ***********************************/
387
405
 
388
- extern "C" int evma_report_connection_error_status (const unsigned long binding)
406
+ extern "C" int evma_report_connection_error_status (const uintptr_t binding)
389
407
  {
390
408
  ensure_eventmachine("evma_report_connection_error_status");
391
409
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -398,7 +416,7 @@ extern "C" int evma_report_connection_error_status (const unsigned long binding)
398
416
  evma_stop_tcp_server
399
417
  ********************/
400
418
 
401
- extern "C" void evma_stop_tcp_server (const unsigned long binding)
419
+ extern "C" void evma_stop_tcp_server (const uintptr_t binding)
402
420
  {
403
421
  ensure_eventmachine("evma_stop_tcp_server");
404
422
  AcceptorDescriptor::StopAcceptor (binding);
@@ -415,12 +433,21 @@ extern "C" void evma_stop_machine()
415
433
  EventMachine->ScheduleHalt();
416
434
  }
417
435
 
436
+ /*****************
437
+ evma_stopping
438
+ *****************/
439
+
440
+ extern "C" bool evma_stopping()
441
+ {
442
+ ensure_eventmachine("evma_stopping");
443
+ return EventMachine->Stopping();
444
+ }
418
445
 
419
446
  /**************
420
447
  evma_start_tls
421
448
  **************/
422
449
 
423
- extern "C" void evma_start_tls (const unsigned long binding)
450
+ extern "C" void evma_start_tls (const uintptr_t binding)
424
451
  {
425
452
  ensure_eventmachine("evma_start_tls");
426
453
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -432,12 +459,12 @@ extern "C" void evma_start_tls (const unsigned long binding)
432
459
  evma_set_tls_parms
433
460
  ******************/
434
461
 
435
- extern "C" void evma_set_tls_parms (const unsigned long binding, const char *privatekey_filename, const char *certchain_filename, int verify_peer)
462
+ extern "C" void evma_set_tls_parms (const uintptr_t binding, const char *privatekey_filename, const char *certchain_filename, int verify_peer, int fail_if_no_peer_cert, const char *sni_hostname, const char *cipherlist, const char *ecdh_curve, const char *dhparam, int ssl_version)
436
463
  {
437
464
  ensure_eventmachine("evma_set_tls_parms");
438
465
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
439
466
  if (ed)
440
- ed->SetTlsParms (privatekey_filename, certchain_filename, (verify_peer == 1 ? true : false));
467
+ ed->SetTlsParms (privatekey_filename, certchain_filename, (verify_peer == 1 ? true : false), (fail_if_no_peer_cert == 1 ? true : false), sni_hostname, cipherlist, ecdh_curve, dhparam, ssl_version);
441
468
  }
442
469
 
443
470
  /******************
@@ -445,7 +472,7 @@ evma_get_peer_cert
445
472
  ******************/
446
473
 
447
474
  #ifdef WITH_SSL
448
- extern "C" X509 *evma_get_peer_cert (const unsigned long binding)
475
+ extern "C" X509 *evma_get_peer_cert (const uintptr_t binding)
449
476
  {
450
477
  ensure_eventmachine("evma_get_peer_cert");
451
478
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -455,12 +482,72 @@ extern "C" X509 *evma_get_peer_cert (const unsigned long binding)
455
482
  }
456
483
  #endif
457
484
 
485
+ /******************
486
+ evma_get_cipher_bits
487
+ ******************/
488
+
489
+ #ifdef WITH_SSL
490
+ extern "C" int evma_get_cipher_bits (const uintptr_t binding)
491
+ {
492
+ ensure_eventmachine("evma_get_cipher_bits");
493
+ EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
494
+ if (ed)
495
+ return ed->GetCipherBits();
496
+ return -1;
497
+ }
498
+ #endif
499
+
500
+ /******************
501
+ evma_get_cipher_name
502
+ ******************/
503
+
504
+ #ifdef WITH_SSL
505
+ extern "C" const char *evma_get_cipher_name (const uintptr_t binding)
506
+ {
507
+ ensure_eventmachine("evma_get_cipher_name");
508
+ EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
509
+ if (ed)
510
+ return ed->GetCipherName();
511
+ return NULL;
512
+ }
513
+ #endif
514
+
515
+ /******************
516
+ evma_get_cipher_protocol
517
+ ******************/
518
+
519
+ #ifdef WITH_SSL
520
+ extern "C" const char *evma_get_cipher_protocol (const uintptr_t binding)
521
+ {
522
+ ensure_eventmachine("evma_get_cipher_protocol");
523
+ EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
524
+ if (ed)
525
+ return ed->GetCipherProtocol();
526
+ return NULL;
527
+ }
528
+ #endif
529
+
530
+ /******************
531
+ evma_get_sni_hostname
532
+ ******************/
533
+
534
+ #ifdef WITH_SSL
535
+ extern "C" const char *evma_get_sni_hostname (const uintptr_t binding)
536
+ {
537
+ ensure_eventmachine("evma_get_sni_hostname");
538
+ EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
539
+ if (ed)
540
+ return ed->GetSNIHostname();
541
+ return NULL;
542
+ }
543
+ #endif
544
+
458
545
  /********************
459
546
  evma_accept_ssl_peer
460
547
  ********************/
461
548
 
462
549
  #ifdef WITH_SSL
463
- extern "C" void evma_accept_ssl_peer (const unsigned long binding)
550
+ extern "C" void evma_accept_ssl_peer (const uintptr_t binding)
464
551
  {
465
552
  ensure_eventmachine("evma_accept_ssl_peer");
466
553
  ConnectionDescriptor *cd = dynamic_cast <ConnectionDescriptor*> (Bindable_t::GetObject (binding));
@@ -473,7 +560,7 @@ extern "C" void evma_accept_ssl_peer (const unsigned long binding)
473
560
  evma_get_peername
474
561
  *****************/
475
562
 
476
- extern "C" int evma_get_peername (const unsigned long binding, struct sockaddr *sa, socklen_t *len)
563
+ extern "C" int evma_get_peername (const uintptr_t binding, struct sockaddr *sa, socklen_t *len)
477
564
  {
478
565
  ensure_eventmachine("evma_get_peername");
479
566
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -488,7 +575,7 @@ extern "C" int evma_get_peername (const unsigned long binding, struct sockaddr *
488
575
  evma_get_sockname
489
576
  *****************/
490
577
 
491
- extern "C" int evma_get_sockname (const unsigned long binding, struct sockaddr *sa, socklen_t *len)
578
+ extern "C" int evma_get_sockname (const uintptr_t binding, struct sockaddr *sa, socklen_t *len)
492
579
  {
493
580
  ensure_eventmachine("evma_get_sockname");
494
581
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -503,10 +590,10 @@ extern "C" int evma_get_sockname (const unsigned long binding, struct sockaddr *
503
590
  evma_get_subprocess_pid
504
591
  ***********************/
505
592
 
506
- extern "C" int evma_get_subprocess_pid (const unsigned long binding, pid_t *pid)
593
+ #ifdef OS_UNIX
594
+ extern "C" int evma_get_subprocess_pid (const uintptr_t binding, pid_t *pid)
507
595
  {
508
596
  ensure_eventmachine("evma_get_subprocess_pid");
509
- #ifdef OS_UNIX
510
597
  PipeDescriptor *pd = dynamic_cast <PipeDescriptor*> (Bindable_t::GetObject (binding));
511
598
  if (pd) {
512
599
  return pd->GetSubprocessPid (pid) ? 1 : 0;
@@ -517,16 +604,19 @@ extern "C" int evma_get_subprocess_pid (const unsigned long binding, pid_t *pid)
517
604
  }
518
605
  else
519
606
  return 0;
520
- #else
607
+ }
608
+ #else
609
+ extern "C" int evma_get_subprocess_pid (const uintptr_t binding UNUSED, pid_t *pid UNUSED)
610
+ {
521
611
  return 0;
522
- #endif
523
612
  }
613
+ #endif
524
614
 
525
615
  /**************************
526
616
  evma_get_subprocess_status
527
617
  **************************/
528
618
 
529
- extern "C" int evma_get_subprocess_status (const unsigned long binding, int *status)
619
+ extern "C" int evma_get_subprocess_status (const uintptr_t binding UNUSED, int *status)
530
620
  {
531
621
  ensure_eventmachine("evma_get_subprocess_status");
532
622
  if (status) {
@@ -563,7 +653,7 @@ extern "C" void evma_signal_loopbreak()
563
653
  evma_get_comm_inactivity_timeout
564
654
  ********************************/
565
655
 
566
- extern "C" float evma_get_comm_inactivity_timeout (const unsigned long binding)
656
+ extern "C" float evma_get_comm_inactivity_timeout (const uintptr_t binding)
567
657
  {
568
658
  ensure_eventmachine("evma_get_comm_inactivity_timeout");
569
659
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -578,7 +668,7 @@ extern "C" float evma_get_comm_inactivity_timeout (const unsigned long binding)
578
668
  evma_set_comm_inactivity_timeout
579
669
  ********************************/
580
670
 
581
- extern "C" int evma_set_comm_inactivity_timeout (const unsigned long binding, float value)
671
+ extern "C" int evma_set_comm_inactivity_timeout (const uintptr_t binding, float value)
582
672
  {
583
673
  ensure_eventmachine("evma_set_comm_inactivity_timeout");
584
674
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -594,7 +684,7 @@ extern "C" int evma_set_comm_inactivity_timeout (const unsigned long binding, fl
594
684
  evma_get_pending_connect_timeout
595
685
  ********************************/
596
686
 
597
- extern "C" float evma_get_pending_connect_timeout (const unsigned long binding)
687
+ extern "C" float evma_get_pending_connect_timeout (const uintptr_t binding)
598
688
  {
599
689
  ensure_eventmachine("evma_get_pending_connect_timeout");
600
690
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -610,7 +700,7 @@ extern "C" float evma_get_pending_connect_timeout (const unsigned long binding)
610
700
  evma_set_pending_connect_timeout
611
701
  ********************************/
612
702
 
613
- extern "C" int evma_set_pending_connect_timeout (const unsigned long binding, float value)
703
+ extern "C" int evma_set_pending_connect_timeout (const uintptr_t binding, float value)
614
704
  {
615
705
  ensure_eventmachine("evma_set_pending_connect_timeout");
616
706
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -642,7 +732,6 @@ extern "C" int evma_get_max_timer_count()
642
732
  return EventMachine_t::GetMaxTimerCount();
643
733
  }
644
734
 
645
-
646
735
  /************************
647
736
  evma_set_max_timer_count
648
737
  ************************/
@@ -660,6 +749,21 @@ extern "C" void evma_set_max_timer_count (int ct)
660
749
  EventMachine_t::SetMaxTimerCount (ct);
661
750
  }
662
751
 
752
+ /******************
753
+ evma_get/set_simultaneous_accept_count
754
+ ******************/
755
+
756
+ extern "C" void evma_set_simultaneous_accept_count (int count)
757
+ {
758
+ EventMachine_t::SetSimultaneousAcceptCount(count);
759
+ }
760
+
761
+ extern "C" int evma_get_simultaneous_accept_count()
762
+ {
763
+ return EventMachine_t::GetSimultaneousAcceptCount();
764
+ }
765
+
766
+
663
767
  /******************
664
768
  evma_setuid_string
665
769
  ******************/
@@ -675,7 +779,7 @@ extern "C" void evma_setuid_string (const char *username)
675
779
  evma_popen
676
780
  **********/
677
781
 
678
- extern "C" const unsigned long evma_popen (char * const*cmd_strings)
782
+ extern "C" const uintptr_t evma_popen (char * const*cmd_strings)
679
783
  {
680
784
  ensure_eventmachine("evma_popen");
681
785
  return EventMachine->Socketpair (cmd_strings);
@@ -686,7 +790,7 @@ extern "C" const unsigned long evma_popen (char * const*cmd_strings)
686
790
  evma_get_outbound_data_size
687
791
  ***************************/
688
792
 
689
- extern "C" int evma_get_outbound_data_size (const unsigned long binding)
793
+ extern "C" int evma_get_outbound_data_size (const uintptr_t binding)
690
794
  {
691
795
  ensure_eventmachine("evma_get_outbound_data_size");
692
796
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
@@ -700,7 +804,10 @@ evma_set_epoll
700
804
 
701
805
  extern "C" void evma_set_epoll (int use)
702
806
  {
703
- bUseEpoll = !!use;
807
+ if (use)
808
+ Poller = Poller_Epoll;
809
+ else
810
+ Poller = Poller_Default;
704
811
  }
705
812
 
706
813
  /***************
@@ -709,7 +816,10 @@ evma_set_kqueue
709
816
 
710
817
  extern "C" void evma_set_kqueue (int use)
711
818
  {
712
- bUseKqueue = !!use;
819
+ if (use)
820
+ Poller = Poller_Kqueue;
821
+ else
822
+ Poller = Poller_Default;
713
823
  }
714
824
 
715
825
 
@@ -727,7 +837,7 @@ extern "C" int evma_set_rlimit_nofile (int nofiles)
727
837
  evma_send_file_data_to_connection
728
838
  *********************************/
729
839
 
730
- extern "C" int evma_send_file_data_to_connection (const unsigned long binding, const char *filename)
840
+ extern "C" int evma_send_file_data_to_connection (const uintptr_t binding, const char *filename)
731
841
  {
732
842
  /* This is a sugaring over send_data_to_connection that reads a file into a
733
843
  * locally-allocated buffer, and sends the file data to the remote peer.
@@ -751,8 +861,11 @@ extern "C" int evma_send_file_data_to_connection (const unsigned long binding, c
751
861
 
752
862
  ensure_eventmachine("evma_send_file_data_to_connection");
753
863
 
864
+ #if defined(OS_WIN32)
865
+ int Fd = open (filename, O_RDONLY|O_BINARY);
866
+ #else
754
867
  int Fd = open (filename, O_RDONLY);
755
-
868
+ #endif
756
869
  if (Fd < 0)
757
870
  return errno;
758
871
  // From here on, all early returns MUST close Fd.
@@ -774,7 +887,6 @@ extern "C" int evma_send_file_data_to_connection (const unsigned long binding, c
774
887
  return -1;
775
888
  }
776
889
 
777
-
778
890
  r = read (Fd, data, filesize);
779
891
  if (r != filesize) {
780
892
  int e = errno;
@@ -792,7 +904,7 @@ extern "C" int evma_send_file_data_to_connection (const unsigned long binding, c
792
904
  evma_start_proxy
793
905
  *****************/
794
906
 
795
- extern "C" void evma_start_proxy (const unsigned long from, const unsigned long to, const unsigned long bufsize, const unsigned long length)
907
+ extern "C" void evma_start_proxy (const uintptr_t from, const uintptr_t to, const unsigned long bufsize, const unsigned long length)
796
908
  {
797
909
  ensure_eventmachine("evma_start_proxy");
798
910
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
@@ -805,7 +917,7 @@ extern "C" void evma_start_proxy (const unsigned long from, const unsigned long
805
917
  evma_stop_proxy
806
918
  ****************/
807
919
 
808
- extern "C" void evma_stop_proxy (const unsigned long from)
920
+ extern "C" void evma_stop_proxy (const uintptr_t from)
809
921
  {
810
922
  ensure_eventmachine("evma_stop_proxy");
811
923
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
@@ -817,7 +929,7 @@ extern "C" void evma_stop_proxy (const unsigned long from)
817
929
  evma_proxied_bytes
818
930
  *******************/
819
931
 
820
- extern "C" unsigned long evma_proxied_bytes (const unsigned long from)
932
+ extern "C" unsigned long evma_proxied_bytes (const uintptr_t from)
821
933
  {
822
934
  ensure_eventmachine("evma_proxied_bytes");
823
935
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
@@ -832,7 +944,7 @@ extern "C" unsigned long evma_proxied_bytes (const unsigned long from)
832
944
  evma_get_last_activity_time
833
945
  ****************************/
834
946
 
835
- extern "C" uint64_t evma_get_last_activity_time(const unsigned long from)
947
+ extern "C" uint64_t evma_get_last_activity_time(const uintptr_t from)
836
948
  {
837
949
  ensure_eventmachine("evma_get_last_activity_time");
838
950
  EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));