slyphon-zookeeper 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +1 -5
- data/ext/zookeeper_lib.c +8 -12
- data/lib/zookeeper/common.rb +6 -3
- data/slyphon-zookeeper.gemspec +1 -1
- metadata +4 -4
data/Manifest
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
CHANGELOG
|
2
|
-
Gemfile
|
3
2
|
LICENSE
|
4
3
|
Manifest
|
5
4
|
README
|
6
5
|
Rakefile
|
7
|
-
Session.vim
|
8
6
|
examples/cloud_config.rb
|
9
7
|
ext/extconf.rb
|
10
|
-
ext/zkc-3.3.
|
8
|
+
ext/zkc-3.3.4.tar.gz
|
11
9
|
ext/zookeeper_base.rb
|
12
10
|
ext/zookeeper_c.c
|
13
11
|
ext/zookeeper_lib.c
|
@@ -23,11 +21,9 @@ lib/zookeeper/stat.rb
|
|
23
21
|
spec/log4j.properties
|
24
22
|
spec/spec_helper.rb
|
25
23
|
spec/zookeeper_spec.rb
|
26
|
-
tags
|
27
24
|
test/test_basic.rb
|
28
25
|
test/test_callback1.rb
|
29
26
|
test/test_close.rb
|
30
27
|
test/test_esoteric.rb
|
31
28
|
test/test_watcher1.rb
|
32
29
|
test/test_watcher2.rb
|
33
|
-
zookeeper.gemspec
|
data/ext/zookeeper_lib.c
CHANGED
@@ -161,26 +161,22 @@ void zkrb_event_free(zkrb_event_t *event) {
|
|
161
161
|
}
|
162
162
|
case ZKRB_STRINGS: {
|
163
163
|
struct zkrb_strings_completion *strings_ctx = event->completion.strings_completion;
|
164
|
-
|
165
|
-
|
164
|
+
int k;
|
165
|
+
if (strings_ctx->values)
|
166
166
|
for (k = 0; k < strings_ctx->values->count; ++k) free(strings_ctx->values->data[k]);
|
167
|
-
|
168
|
-
}
|
167
|
+
free(strings_ctx->values);
|
169
168
|
free(strings_ctx);
|
170
169
|
break;
|
171
170
|
}
|
172
171
|
case ZKRB_STRINGS_STAT: {
|
173
172
|
struct zkrb_strings_stat_completion *strings_stat_ctx = event->completion.strings_stat_completion;
|
174
|
-
|
175
|
-
|
173
|
+
int k;
|
174
|
+
if (strings_stat_ctx->values)
|
176
175
|
for (k = 0; k < strings_stat_ctx->values->count; ++k) free(strings_stat_ctx->values->data[k]);
|
177
|
-
|
178
|
-
}
|
179
|
-
|
180
|
-
if (strings_stat_ctx->stat != NULL) {
|
181
|
-
free(strings_stat_ctx->stat);
|
182
|
-
}
|
176
|
+
free(strings_stat_ctx->values);
|
183
177
|
|
178
|
+
if (strings_stat_ctx->stat)
|
179
|
+
free(strings_stat_ctx->stat);
|
184
180
|
free(strings_stat_ctx);
|
185
181
|
break;
|
186
182
|
}
|
data/lib/zookeeper/common.rb
CHANGED
@@ -54,9 +54,12 @@ protected
|
|
54
54
|
|
55
55
|
callback_context = is_completion ? get_completion(hash[:req_id]) : get_watcher(hash[:req_id])
|
56
56
|
|
57
|
-
#
|
58
|
-
# to
|
59
|
-
#
|
57
|
+
# When connectivity to the server has been lost (as indicated by SESSION_EVENT)
|
58
|
+
# we want to rerun the callback at a later time when we eventually do have
|
59
|
+
# a valid response.
|
60
|
+
if hash[:type] == ZookeeperConstants::ZOO_SESSION_EVENT
|
61
|
+
is_completion ? setup_completion(hash[:req_id], callback_context) : setup_watcher(hash[:req_id], callback_context)
|
62
|
+
end
|
60
63
|
if callback_context
|
61
64
|
callback = is_completion ? callback_context[:callback] : callback_context[:watcher]
|
62
65
|
|
data/slyphon-zookeeper.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "slyphon-zookeeper"
|
6
|
-
s.version = '0.2.
|
6
|
+
s.version = '0.2.11'
|
7
7
|
|
8
8
|
s.authors = ["Phillip Pearson", "Eric Maland", "Evan Weaver", "Brian Wickman", "Neil Conway", "Jonathan D. Simms"]
|
9
9
|
s.email = ["slyphon@gmail.com"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slyphon-zookeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 11
|
10
|
+
version: 0.2.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Phillip Pearson
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2012-
|
23
|
+
date: 2012-03-27 00:00:00 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|