rage-iodine 3.0.4 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -2
- data/ext/iodine/fio.c +7 -2
- data/ext/iodine/http.c +5 -4
- data/ext/iodine/iodine_caller.c +2 -2
- data/ext/iodine/iodine_caller.h +1 -1
- data/ext/iodine/iodine_http.c +7 -1
- data/lib/iodine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97aba2242f36a1ed75614e9722004d0ae730df41a4bd964d3cc08f3b1c9155a3
|
4
|
+
data.tar.gz: f28d5c5cba986ed39cdb197054879e2d1bcbb16f074b110093f571044da843d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c55356761cf8e8467233a2c73cb866f8956655d9069c827d1c56354b45451e8447d7bdcca66ac6727d035fe4b2b70fa5bb8e76831ba28773a4952b2e58cde42
|
7
|
+
data.tar.gz: d044938f40f8784c42f7b8e6d610b1b975caf41caf8e79f29c739d9d9bfe24fd0d6fda115b6cbb0c37e898f86e997deb117c03f79f89ab5a8ab939270a12de6f
|
data/CHANGELOG.md
CHANGED
@@ -6,11 +6,20 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
6
6
|
|
7
7
|
## Changes:
|
8
8
|
|
9
|
-
#### Change log v.3.0.
|
9
|
+
#### Change log v.3.0.6 (2024-03-14)
|
10
|
+
|
11
|
+
**Fix**: Fix `call_with_block` function's signature.
|
12
|
+
**Fix**: Fix "enumeration values ... not handled in switch" warning.
|
13
|
+
|
14
|
+
#### Change log v.3.0.5 (2024-03-13)
|
15
|
+
|
16
|
+
**Fix**: Fix the "incompatible pointer" compilation warnings.
|
17
|
+
|
18
|
+
#### Change log v.3.0.4 (2024-01-09)
|
10
19
|
|
11
20
|
**Fix**: Delete temp files.
|
12
21
|
|
13
|
-
#### Change log v.3.0.3 (
|
22
|
+
#### Change log v.3.0.3 (2024-01-04)
|
14
23
|
|
15
24
|
**Fix**: Stop closing Rack IO.
|
16
25
|
|
data/ext/iodine/fio.c
CHANGED
@@ -285,6 +285,7 @@ static void deferred_on_shutdown(void *arg, void *arg2);
|
|
285
285
|
static void deferred_on_ready(void *arg, void *arg2);
|
286
286
|
static void deferred_on_data(void *uuid, void *arg2);
|
287
287
|
static void deferred_ping(void *arg, void *arg2);
|
288
|
+
static void deferred_force_close_in_poll(void *uuid, void *arg2);
|
288
289
|
|
289
290
|
/* *****************************************************************************
|
290
291
|
Section Start Marker
|
@@ -531,6 +532,10 @@ static inline void fio_force_close_in_poll(intptr_t uuid) {
|
|
531
532
|
fio_force_close(uuid);
|
532
533
|
}
|
533
534
|
|
535
|
+
static void deferred_force_close_in_poll(void *uuid, void *arg2) {
|
536
|
+
fio_force_close_in_poll((intptr_t)uuid);
|
537
|
+
}
|
538
|
+
|
534
539
|
/* *****************************************************************************
|
535
540
|
Protocol Locking and UUID validation
|
536
541
|
***************************************************************************** */
|
@@ -2065,7 +2070,7 @@ static size_t fio_poll(void) {
|
|
2065
2070
|
(void *)fd2uuid(events[i].data.fd), NULL);
|
2066
2071
|
}
|
2067
2072
|
if (events[i].events & (EPOLLHUP | EPOLLRDHUP)) {
|
2068
|
-
fio_defer_push_task(
|
2073
|
+
fio_defer_push_task(deferred_force_close_in_poll,
|
2069
2074
|
(void *)fd2uuid(events[i].data.fd), NULL);
|
2070
2075
|
}
|
2071
2076
|
}
|
@@ -2202,7 +2207,7 @@ static size_t fio_poll(void) {
|
|
2202
2207
|
NULL);
|
2203
2208
|
}
|
2204
2209
|
if (events[i].flags & (EV_EOF | EV_ERROR)) {
|
2205
|
-
fio_defer_push_task(
|
2210
|
+
fio_defer_push_task(deferred_force_close_in_poll,
|
2206
2211
|
(void *)fd2uuid(events[i].udata), NULL);
|
2207
2212
|
}
|
2208
2213
|
}
|
data/ext/iodine/http.c
CHANGED
@@ -1949,10 +1949,11 @@ static void add_to_params(VALUE params, char *key, size_t key_len, VALUE value)
|
|
1949
1949
|
}
|
1950
1950
|
}
|
1951
1951
|
|
1952
|
-
static inline void cleanup_temp_file(void *
|
1953
|
-
|
1954
|
-
IodineStore.remove(
|
1955
|
-
|
1952
|
+
static inline void cleanup_temp_file(void *path) {
|
1953
|
+
VALUE r_path = (VALUE)path;
|
1954
|
+
IodineStore.remove(r_path);
|
1955
|
+
char *c_path = StringValueCStr(r_path);
|
1956
|
+
unlink(c_path);
|
1956
1957
|
}
|
1957
1958
|
|
1958
1959
|
static VALUE create_temp_file(http_mime_parser_s *parser, char **path) {
|
data/ext/iodine/iodine_caller.c
CHANGED
@@ -31,7 +31,7 @@ typedef struct {
|
|
31
31
|
ID method;
|
32
32
|
int exception;
|
33
33
|
VALUE (*protected_task)(VALUE tsk_);
|
34
|
-
VALUE (*each_func)(VALUE block_arg, VALUE data, int argc, VALUE *argv);
|
34
|
+
VALUE (*each_func)(VALUE block_arg, VALUE data, int argc, const VALUE *argv, VALUE blockarg);
|
35
35
|
VALUE each_udata;
|
36
36
|
} iodine_rb_task_s;
|
37
37
|
|
@@ -160,7 +160,7 @@ static VALUE iodine_call2(VALUE obj, ID method, int argc, VALUE *argv) {
|
|
160
160
|
static VALUE iodine_call_block(VALUE obj, ID method, int argc, VALUE *argv,
|
161
161
|
VALUE udata,
|
162
162
|
VALUE(each_func)(VALUE block_arg, VALUE udata,
|
163
|
-
int argc, VALUE *argv)) {
|
163
|
+
int argc, const VALUE *argv, VALUE blockarg)) {
|
164
164
|
iodine_rb_task_s task = {
|
165
165
|
.obj = obj,
|
166
166
|
.argc = argc,
|
data/ext/iodine/iodine_caller.h
CHANGED
@@ -17,7 +17,7 @@ extern struct IodineCaller_s {
|
|
17
17
|
/** Calls a Ruby method on a given object, protecting against exceptions. */
|
18
18
|
VALUE(*call_with_block)
|
19
19
|
(VALUE obj, ID method, int argc, VALUE *argv, VALUE udata,
|
20
|
-
VALUE (*block_func)(VALUE block_argv1, VALUE udata, int argc, VALUE *argv));
|
20
|
+
VALUE (*block_func)(VALUE block_argv1, VALUE udata, int argc, const VALUE *argv, VALUE blockarg));
|
21
21
|
/** Returns the GVL state flag. */
|
22
22
|
uint8_t (*in_GVL)(void);
|
23
23
|
/** Forces the GVL state flag. */
|
data/ext/iodine/iodine_http.c
CHANGED
@@ -544,7 +544,7 @@ array_style_multi_value:
|
|
544
544
|
|
545
545
|
// writes the body to the response object
|
546
546
|
static VALUE for_each_body_string(VALUE str, VALUE body_, int argc,
|
547
|
-
VALUE *argv) {
|
547
|
+
const VALUE *argv, VALUE blockarg) {
|
548
548
|
// fprintf(stderr, "For_each - body\n");
|
549
549
|
// write body
|
550
550
|
if (TYPE(str) != T_STRING) {
|
@@ -557,6 +557,7 @@ static VALUE for_each_body_string(VALUE str, VALUE body_, int argc,
|
|
557
557
|
return Qtrue;
|
558
558
|
(void)argc;
|
559
559
|
(void)argv;
|
560
|
+
(void)blockarg;
|
560
561
|
}
|
561
562
|
|
562
563
|
static inline int ruby2c_response_send(iodine_http_request_handle_s *handle,
|
@@ -813,6 +814,11 @@ iodine_perform_handle_action(iodine_http_request_handle_s handle) {
|
|
813
814
|
http_send_error(handle.h, handle.h->status);
|
814
815
|
fiobj_free(handle.body);
|
815
816
|
break;
|
817
|
+
case IODINE_HTTP_WAIT:
|
818
|
+
case IODINE_HTTP_DEFERRED:
|
819
|
+
/* these are handled before the `iodine_perform_handle_action` call */
|
820
|
+
FIO_LOG_WARNING("Unexpected handle type in perform_handle_action: %d", handle.type);
|
821
|
+
break;
|
816
822
|
}
|
817
823
|
}
|
818
824
|
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rage-iodine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|