ruby-libvirt-catphish 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/ext/libvirt/domain.c +29 -6
  4. metadata +4 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d948d21ff17c11eabeda92a5adf74958b30886ac523518468c9014ed256f73b0
4
- data.tar.gz: 5722d1ecae4f9e1413127ac8ac999dbb8baad904a94362aeb21a5463088a7fc9
3
+ metadata.gz: 4698f3de22d3cd6f3140541ae6060b20acbbaa29e2d333bc7ef9f0e5c60e83ab
4
+ data.tar.gz: 9e8615cc43a0441945e57434e235dd47f8d812ee29da31e32da73187df09f56c
5
5
  SHA512:
6
- metadata.gz: 88bbb099714f1b4c4cdb5f707552ecf47a34cab89af0822b5175b0ec887c621f01324f873c1984cb59b3ef1364bbec5ce51340a1f2b2b9a13fa91135cb135ad9
7
- data.tar.gz: caac5b19c651e6f67eda1612284d70107de2db33c5a1f0e035094e9862bd3d0516ff103733efd3a84e9e3d989b4dd3fae7691e9e7234644bfae37461957c5ee9
6
+ metadata.gz: 8f85023e1274681434cc04d6bd992acc7a17a237e2192caae410704d8dce2d91429db4c8fb3541b51bfff22b8be9100b31d3c44759c7795f37ba2d9ccb517f50
7
+ data.tar.gz: fc7dc419880f212c23651a570496d37e2b5b00ca706c3a9ebba5ab3495944dba8122499ad26de630c09e3873ec61b3e22eca875ad01a9dc9e857438bcd7fa821
data/Rakefile CHANGED
@@ -20,8 +20,8 @@ require 'rake/testtask'
20
20
  require 'rubygems/package_task'
21
21
  require 'rbconfig'
22
22
 
23
- PKG_NAME='ruby-libvirt'
24
- PKG_VERSION='0.7.1'
23
+ PKG_NAME='ruby-libvirt-catphish'
24
+ PKG_VERSION='0.7.2'
25
25
 
26
26
  EXT_CONF='ext/libvirt/extconf.rb'
27
27
  MAKEFILE="ext/libvirt/Makefile"
@@ -22,6 +22,7 @@
22
22
  #include <stdint.h>
23
23
  #include <unistd.h>
24
24
  #include <ruby.h>
25
+ #include <ruby/thread.h>
25
26
  /* we need to include st.h since ruby 1.8 needs it for RHash */
26
27
  #include <st.h>
27
28
  #include <libvirt/libvirt.h>
@@ -125,6 +126,25 @@ static void domain_input_to_fixnum_and_flags(VALUE in, VALUE *hash, VALUE *flags
125
126
  }
126
127
  }
127
128
 
129
+ struct params_wgvl_virDomainMigrate {
130
+ virDomainPtr domain;
131
+ virConnectPtr dconn;
132
+ unsigned long flags;
133
+ const char * dname;
134
+ const char * uri;
135
+ unsigned long bandwidth;
136
+ };
137
+
138
+ void * wgvl_virDomainMigrate(void * p) {
139
+ struct params_wgvl_virDomainMigrate * params = p;
140
+ return virDomainMigrate(params->domain,
141
+ params->dconn,
142
+ params->flags,
143
+ params->dname,
144
+ params->uri,
145
+ params->bandwidth);
146
+ }
147
+
128
148
  /*
129
149
  * call-seq:
130
150
  * dom.migrate(dconn, flags=0, dname=nil, uri=nil, bandwidth=0) -> Libvirt::Domain
@@ -135,18 +155,21 @@ static void domain_input_to_fixnum_and_flags(VALUE in, VALUE *hash, VALUE *flags
135
155
  */
136
156
  static VALUE libvirt_domain_migrate(int argc, VALUE *argv, VALUE d)
137
157
  {
158
+ struct params_wgvl_virDomainMigrate params;
138
159
  VALUE dconn, flags, dname, uri, bandwidth;
139
160
  virDomainPtr ddom = NULL;
140
161
 
141
162
  rb_scan_args(argc, argv, "14", &dconn, &flags, &dname, &uri,
142
163
  &bandwidth);
143
164
 
144
- ddom = virDomainMigrate(ruby_libvirt_domain_get(d),
145
- ruby_libvirt_connect_get(dconn),
146
- ruby_libvirt_value_to_ulong(flags),
147
- ruby_libvirt_get_cstring_or_null(dname),
148
- ruby_libvirt_get_cstring_or_null(uri),
149
- ruby_libvirt_value_to_ulong(bandwidth));
165
+ params.domain = ruby_libvirt_domain_get(d);
166
+ params.dconn = ruby_libvirt_connect_get(dconn);
167
+ params.flags = ruby_libvirt_value_to_ulong(flags);
168
+ params.dname = ruby_libvirt_get_cstring_or_null(dname);
169
+ params.uri = ruby_libvirt_get_cstring_or_null(uri);
170
+ params.bandwidth = ruby_libvirt_value_to_ulong(bandwidth);
171
+
172
+ ddom = rb_thread_call_without_gvl(wgvl_virDomainMigrate, &params, NULL, NULL);
150
173
 
151
174
  ruby_libvirt_raise_error_if(ddom == NULL, e_Error, "virDomainMigrate",
152
175
  ruby_libvirt_connect_get(d));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-libvirt-catphish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
- - David Lutterkort, Chris Lalancette, Charlie Smurthwaite
7
+ - David Lutterkort, Chris Lalancette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-21 00:00:00.000000000 Z
11
+ date: 2020-09-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby bindings for libvirt.
14
14
  email: libvir-list@redhat.com
@@ -76,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubyforge_project: None
80
- rubygems_version: 2.7.8
79
+ rubygems_version: 3.0.8
81
80
  signing_key:
82
81
  specification_version: 4
83
82
  summary: Ruby bindings for LIBVIRT