summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-06-13 18:03:26 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-06-13 18:03:26 +0300
commit3a4d5709c73fa0495138857f7bdb7a49e9e8a80a (patch)
treed29499ee8454a6c795475a18bf35cd7d09696885 /src
parent004f3d1f49c54bc62743a838161ac157ffc37e41 (diff)
NETLIBBIND to be able to open UDP external ports
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/netlib_bind.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mir_app/src/netlib_bind.cpp b/src/mir_app/src/netlib_bind.cpp
index c9cc9f3a0e..49cd9bf829 100644
--- a/src/mir_app/src/netlib_bind.cpp
+++ b/src/mir_app/src/netlib_bind.cpp
@@ -306,15 +306,16 @@ LBL_Error:
/////////////////////////////////////////////////////////////////////////////////////////
-NetlibBoundPort::NetlibBoundPort(HNETLIBUSER _nlu, NETLIBBIND *nlb)
- : handleType(NLH_BOUNDPORT),
+NetlibBoundPort::NetlibBoundPort(HNETLIBUSER _nlu, NETLIBBIND *nlb) :
+ handleType(NLH_BOUNDPORT),
nlu(_nlu)
{
pfnNewConnection = nlb->pfnNewConnection;
pExtra = nlb->pExtra;
- s = socket(PF_INET, SOCK_STREAM, 0);
- s6 = socket(PF_INET6, SOCK_STREAM, 0);
+ int type = (nlb->iType) ? nlb->iType : SOCK_STREAM;
+ s = socket(PF_INET, type, 0);
+ s6 = socket(PF_INET6, type, 0);
}
void NetlibBoundPort::close()