slyphon-zookeeper 0.2.10-java → 0.2.11-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.2.tar.gz
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
- if (strings_ctx->values != NULL) {
165
- int k;
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
- free(strings_ctx->values);
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
- if (strings_stat_ctx->values != NULL) {
175
- int k;
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
- free(strings_stat_ctx->values);
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
  }
@@ -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
- # when connectivity with the server is lost, on reconnection it's possible
58
- # to receive duplicate responses. If we've already handled a response for a
59
- # given req_id, this value will be nil, and we just ignore it.
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
 
@@ -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.10'
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: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 10
10
- version: 0.2.10
9
+ - 11
10
+ version: 0.2.11
11
11
  platform: java
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-02-08 00:00:00 Z
23
+ date: 2012-03-27 00:00:00 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec