hiredis 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/hiredis_ext/connection.c +12 -2
- data/lib/hiredis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f77b981784a483844d0f71fb48594a0a79fced
|
4
|
+
data.tar.gz: e6c6f088e0feb373de9097838de379870413791b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc1f73b803eab73504898440c7cbe001abacad798e94b21d683178ec7d6b12a6104b5a5a6f53949dc571625a5a8ccca3576c04a700478d25a3da0e82577e546
|
7
|
+
data.tar.gz: e89b77e064f841199206d5ced3f272120ac59e2234d79e947fdfe25fb61370407b215682e857785ae3b46681d3398f37bf54a2a7afe24e0218e6010f44aaed94
|
@@ -110,16 +110,20 @@ static int __wait_readable(int fd, const struct timeval *timeout, int *isset) {
|
|
110
110
|
struct timeval *toptr = NULL;
|
111
111
|
|
112
112
|
_fdset_t fds;
|
113
|
+
|
114
|
+
/* Be cautious: a call to rb_fd_init to initialize the rb_fdset_t structure
|
115
|
+
* must be paired with a call to rb_fd_term to free it. */
|
113
116
|
_fd_init(&fds);
|
114
117
|
_fd_set(fd, &fds);
|
115
118
|
|
116
|
-
/*
|
119
|
+
/* rb_thread_{fd_,}select modifies the passed timeval, so we pass a copy */
|
117
120
|
if (timeout != NULL) {
|
118
121
|
memcpy(&to, timeout, sizeof(to));
|
119
122
|
toptr = &to;
|
120
123
|
}
|
121
124
|
|
122
125
|
if (_thread_fd_select(fd + 1, &fds, NULL, NULL, toptr) < 0) {
|
126
|
+
_fd_term(&fds);
|
123
127
|
return -1;
|
124
128
|
}
|
125
129
|
|
@@ -127,6 +131,7 @@ static int __wait_readable(int fd, const struct timeval *timeout, int *isset) {
|
|
127
131
|
*isset = 1;
|
128
132
|
}
|
129
133
|
|
134
|
+
_fd_term(&fds);
|
130
135
|
return 0;
|
131
136
|
}
|
132
137
|
|
@@ -135,16 +140,20 @@ static int __wait_writable(int fd, const struct timeval *timeout, int *isset) {
|
|
135
140
|
struct timeval *toptr = NULL;
|
136
141
|
|
137
142
|
_fdset_t fds;
|
143
|
+
|
144
|
+
/* Be cautious: a call to rb_fd_init to initialize the rb_fdset_t structure
|
145
|
+
* must be paired with a call to rb_fd_term to free it. */
|
138
146
|
_fd_init(&fds);
|
139
147
|
_fd_set(fd, &fds);
|
140
148
|
|
141
|
-
/*
|
149
|
+
/* rb_thread_{fd_,}select modifies the passed timeval, so we pass a copy */
|
142
150
|
if (timeout != NULL) {
|
143
151
|
memcpy(&to, timeout, sizeof(to));
|
144
152
|
toptr = &to;
|
145
153
|
}
|
146
154
|
|
147
155
|
if (_thread_fd_select(fd + 1, NULL, &fds, NULL, toptr) < 0) {
|
156
|
+
_fd_term(&fds);
|
148
157
|
return -1;
|
149
158
|
}
|
150
159
|
|
@@ -152,6 +161,7 @@ static int __wait_writable(int fd, const struct timeval *timeout, int *isset) {
|
|
152
161
|
*isset = 1;
|
153
162
|
}
|
154
163
|
|
164
|
+
_fd_term(&fds);
|
155
165
|
return 0;
|
156
166
|
}
|
157
167
|
|
data/lib/hiredis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiredis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pieter Noordhuis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|