ovirt-engine-sdk 4.1.6 → 4.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8d3c58ff70eecb169d5103a4eeb2f7f9fed5a77
4
- data.tar.gz: 302c8ab4c8c915eac19558b9813f91831d634687
3
+ metadata.gz: 27913e03ff0dc57c90c99d86c48c049f1551757d
4
+ data.tar.gz: dc4ac1d281d2e5a7f810478604d98786b409164a
5
5
  SHA512:
6
- metadata.gz: 508ab6b1baa739ef1837e0ca7548075d2874d98b4ba887ab1e2ffcc85c60370516d4a7e7e7c67ffd2a49bc669eeaa5a8581c98989d0611ad7a0d3372eefaac0a
7
- data.tar.gz: 098cec88d486935c3b5aecb9b2435cd669f9369a700ca197824d7ce81e211d249335919aa87ad9144aff21e41bb752e785139fbd837cb422589133b868ea83f1
6
+ metadata.gz: d05904f538cca1dace00f332714350d72e23e53fe33f6ecf9b4dbfae1d7cc524a7618b2a5c876a1cbc7c9ac649ee279087e3ca5dca0f93a2e658ed12dfbf3cc7
7
+ data.tar.gz: bdeed8e97cc3da5204bc382cf43ad51d6ae95b8e8f67f08a689cb28de3616d5e42220cab07b9db48fb10dae542226ed66e958c093cc0b715ccae4542ab0c81d3
data/CHANGES.adoc CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This document describes the relevant changes between releases of the SDK.
4
4
 
5
+ == 4.1.7 / Jun 2 2017
6
+
7
+ Bug fixes:
8
+
9
+ * Fix missing `curl_multi_wait` symbol when using libcurl older
10
+ than 7.28.0.
11
+
5
12
  == 4.1.6 / May 31 2017
6
13
 
7
14
  Update to model 4.1.35:
@@ -23,6 +23,8 @@ limitations under the License.
23
23
  #include <stdbool.h>
24
24
  #include <stdlib.h>
25
25
  #include <string.h>
26
+ #include <sys/time.h>
27
+ #include <sys/select.h>
26
28
 
27
29
  #include "ov_module.h"
28
30
  #include "ov_error.h"
@@ -630,21 +632,43 @@ static void* ov_http_client_wait_task(void* data) {
630
632
  int pending;
631
633
  long timeout;
632
634
  ov_http_client_wait_context* context_ptr;
635
+ #if LIBCURL_VERSION_NUM < 0x071c00
636
+ fd_set fd_read;
637
+ fd_set fd_write;
638
+ fd_set fd_error;
639
+ int fd_count;
640
+ struct timeval tv;
641
+ #endif
633
642
 
634
643
  /* The passed data is the wait context: */
635
644
  context_ptr = data;
636
645
 
637
- /* Get the timeout preferred by libcurl, or one second by default: */
646
+ /* Get the timeout preferred by libcurl, or one 100 ms by default: */
638
647
  curl_multi_timeout(context_ptr->handle, &timeout);
639
648
  if (timeout < 0) {
640
- timeout = 1000;
649
+ timeout = 100;
641
650
  }
642
651
 
652
+ #if LIBCURL_VERSION_NUM >= 0x071c00
643
653
  /* Wait till there is activity: */
644
654
  context_ptr->code = curl_multi_wait(context_ptr->handle, NULL, 0, timeout, NULL);
645
655
  if (context_ptr->code != CURLE_OK) {
646
656
  return NULL;
647
657
  }
658
+ #else
659
+ /* Versions of libcurl older than 7.28.0 don't provide the 'curl_multi_wait' function, so we need to get the file
660
+ descriptors used by libcurl, and explicitly use the 'select' system call: */
661
+ FD_ZERO(&fd_read);
662
+ FD_ZERO(&fd_write);
663
+ FD_ZERO(&fd_error);
664
+ context_ptr->code = curl_multi_fdset(context_ptr->handle, &fd_read, &fd_write, &fd_error, &fd_count);
665
+ if (context_ptr->code != CURLE_OK) {
666
+ return NULL;
667
+ }
668
+ tv.tv_sec = timeout / 1000;
669
+ tv.tv_usec = (timeout % 1000) * 1000;
670
+ select(fd_count + 1, &fd_read, &fd_write, &fd_error, &tv);
671
+ #endif
648
672
 
649
673
  /* Let libcurl do its work, even if no file descriptor needs attention. This is necessary because some of its
650
674
  activities can't be monitored using file descriptors. */
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module OvirtSDK4
19
- VERSION = '4.1.6'.freeze
19
+ VERSION = '4.1.7'.freeze
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ovirt-engine-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.6
4
+ version: 4.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Hernandez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-31 00:00:00.000000000 Z
11
+ date: 2017-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake