taf2-curb 0.3.0.0 → 0.3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/ext/curb.h +3 -3
  2. data/ext/curb_multi.c +6 -3
  3. data/ext/extconf.rb +3 -0
  4. metadata +2 -2
data/ext/curb.h CHANGED
@@ -20,11 +20,11 @@
20
20
  #include "curb_macros.h"
21
21
 
22
22
  // These should be managed from the Rake 'release' task.
23
- #define CURB_VERSION "0.3.0.0"
24
- #define CURB_VER_NUM 300
23
+ #define CURB_VERSION "0.3.5.0"
24
+ #define CURB_VER_NUM 350
25
25
  #define CURB_VER_MAJ 0
26
26
  #define CURB_VER_MIN 3
27
- #define CURB_VER_MIC 0
27
+ #define CURB_VER_MIC 5
28
28
  #define CURB_VER_PATCH 0
29
29
 
30
30
 
data/ext/curb_multi.c CHANGED
@@ -298,20 +298,23 @@ static VALUE ruby_curl_multi_perform(VALUE self) {
298
298
  raise_curl_multi_error_exception(mcode);
299
299
  }
300
300
 
301
+ #ifdef HAVE_CURL_MULTI_TIMEOUT
301
302
  /* get the curl suggested time out */
302
303
  mcode = curl_multi_timeout(rbcm->handle, &timeout);
303
304
  if (mcode != CURLM_OK) {
304
305
  raise_curl_multi_error_exception(mcode);
305
306
  }
307
+ #else
308
+ /* libcurl doesn't have a timeout method defined... make a wild guess */
309
+ timeout = 1; /* wait a second */
310
+ #endif
306
311
 
307
312
  if (timeout == 0) { /* no delay */
308
313
  rb_curl_multi_run( self, rbcm->handle, &(rbcm->running) );
309
314
  continue;
310
315
  }
311
316
  else if (timeout == -1) {
312
- timeout = 1; /* You must not wait too long
313
- (more than a few seconds perhaps) before
314
- you call curl_multi_perform() again */
317
+ timeout = 1; /* wait a second */
315
318
  }
316
319
 
317
320
  if (rb_block_given_p()) {
data/ext/extconf.rb CHANGED
@@ -81,6 +81,9 @@ have_constant "curlmopt_maxconnects"
81
81
  # centos 4.5 build of libcurl
82
82
  have_constant "curlm_bad_socket"
83
83
  have_constant "curlm_unknown_option"
84
+ have_func("curl_multi_timeout")
85
+ have_func("curl_multi_fdset")
86
+ have_func("curl_multi_perform")
84
87
 
85
88
  if try_compile('int main() { return 0; }','-Wall')
86
89
  $CFLAGS << ' -Wall'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taf2-curb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.0
4
+ version: 0.3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Bamford
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-08 00:00:00 -07:00
13
+ date: 2009-06-09 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16