From 3a4d5709c73fa0495138857f7bdb7a49e9e8a80a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 13 Jun 2024 18:03:26 +0300 Subject: NETLIBBIND to be able to open UDP external ports --- src/mir_app/src/netlib_bind.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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() -- cgit v1.2.3