repo.or.cz
/
mruby.git
/
commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
raw
|
patch
|
inline
|
side by side
(parent:
ab54185
)
Set protocol of AddrInfo
author
Tomoyuki Sahara
<
[email protected]
>
Fri, 16 Mar 2018 08:05:37 +0000
(16 17:05 +0900)
committer
Tomoyuki Sahara
<
[email protected]
>
Fri, 16 Mar 2018 08:05:37 +0000
(16 17:05 +0900)
backport https://github.com/mruby/mruby/pull/3891
src/socket.c
patch
|
blob
|
blame
|
history
diff --git
a/src/socket.c
b/src/socket.c
index
758d3a3
..
d0df1c2
100644
(file)
--- a/
src/socket.c
+++ b/
src/socket.c
@@
-141,6
+141,10
@@
mrb_addrinfo_getaddrinfo(mrb_state *mrb, mrb_value klass)
hints.ai_socktype = mrb_fixnum(socktype);
}
+ if (mrb_fixnum_p(protocol)) {
+ hints.ai_protocol = mrb_fixnum(protocol);
+ }
+
lastai = mrb_cv_get(mrb, klass, mrb_intern_lit(mrb, "_lastai"));
if (mrb_cptr_p(lastai)) {
freeaddrinfo(mrb_cptr(lastai));