https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa2d2139be17a99f9e9c2…
commit aa2d2139be17a99f9e9c2387934b4a43e75aa79f
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Fri Aug 18 00:51:36 2023 +0200
Commit: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
CommitDate: Fri Aug 18 00:51:36 2023 +0200
[FREELDR] Convert ntfs.c to UTF-8 without BOM
Addendum to f0d73e0 (and ab3bd82).
---
boot/freeldr/freeldr/lib/fs/ntfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/freeldr/freeldr/lib/fs/ntfs.c b/boot/freeldr/freeldr/lib/fs/ntfs.c
index 9361f526932..fb4db082cd8 100644
--- a/boot/freeldr/freeldr/lib/fs/ntfs.c
+++ b/boot/freeldr/freeldr/lib/fs/ntfs.c
@@ -1,7 +1,7 @@
/*
* FreeLoader NTFS support
* Copyright (C) 2004 Filip Navara <xnavara(a)volny.cz>
- * Copyright (C) 2009-2010 Herv� Poussineau
+ * Copyright (C) 2009-2010 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=442f5dfab50da48700a20…
commit 442f5dfab50da48700a20d4bdc6917e48105ad86
Author: Julio Carchi <juliocarchi(a)yahoo.com>
AuthorDate: Thu Aug 17 16:13:13 2023 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Aug 17 23:13:13 2023 +0200
[MSAFD] Fix non-blocking sockets support for recv() (#5575) CORE-14486
Currently ReactOS' winsock2 implementation lacks of non-blocking sockets support for recv() apicall, this causes that applications that make use of this feature can lead to unexpected behaviors, one of them is Nginx web server, which uses non-blocking sockets when serving pages through Https protocol.
CORE-14486
It also brings us significantly closer in master head to running Firefox 52, Mypal 29.3.0 and New Moon 28 browser, where the latter allows to connect to mattermost from within ReactOS.
In master head an additional reg file is needed to stop us from exporting specific NT6+ APIs, but in older releases all that should work out of the box with this brilliant patch.
Co-authored-by: Julio Carchi Ruiz <julcar(a)informaticos.com>
Co-authored-by: Stanislav Motylkov <x86corez(a)gmail.com>
---
dll/win32/msafd/misc/dllmain.c | 32 ++++++++++++++++++--------------
dll/win32/msafd/misc/sndrcv.c | 7 +++++++
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/dll/win32/msafd/misc/dllmain.c b/dll/win32/msafd/misc/dllmain.c
index a4cded75c00..79623a142c0 100644
--- a/dll/win32/msafd/misc/dllmain.c
+++ b/dll/win32/msafd/misc/dllmain.c
@@ -1495,22 +1495,25 @@ WSPAccept(
ListenReceiveData = (PAFD_RECEIVED_ACCEPT_DATA)ReceiveBuffer;
/* If this is non-blocking, make sure there's something for us to accept */
- FD_ZERO(&ReadSet);
- FD_SET(Socket->Handle, &ReadSet);
- Timeout.tv_sec=0;
- Timeout.tv_usec=0;
-
- if (WSPSelect(0, &ReadSet, NULL, NULL, &Timeout, lpErrno) == SOCKET_ERROR)
+ if (Socket->SharedData->NonBlocking)
{
- NtClose(SockEvent);
- return SOCKET_ERROR;
- }
+ FD_ZERO(&ReadSet);
+ FD_SET(Socket->Handle, &ReadSet);
+ Timeout.tv_sec=0;
+ Timeout.tv_usec=0;
- if (ReadSet.fd_array[0] != Socket->Handle)
- {
- NtClose(SockEvent);
- if (lpErrno) *lpErrno = WSAEWOULDBLOCK;
- return SOCKET_ERROR;
+ if (WSPSelect(0, &ReadSet, NULL, NULL, &Timeout, lpErrno) == SOCKET_ERROR)
+ {
+ NtClose(SockEvent);
+ return SOCKET_ERROR;
+ }
+
+ if (ReadSet.fd_array[0] != Socket->Handle)
+ {
+ NtClose(SockEvent);
+ if (lpErrno) *lpErrno = WSAEWOULDBLOCK;
+ return SOCKET_ERROR;
+ }
}
/* Send IOCTL */
@@ -1782,6 +1785,7 @@ WSPAccept(
AcceptSocketInfo->SharedData->State = SocketConnected;
AcceptSocketInfo->SharedData->ConnectTime = GetCurrentTimeInSeconds();
+ AcceptSocketInfo->SharedData->NonBlocking = Socket->SharedData->NonBlocking;
/* Return Address in SOCKADDR FORMAT */
if( SocketAddress )
diff --git a/dll/win32/msafd/misc/sndrcv.c b/dll/win32/msafd/misc/sndrcv.c
index 07fe8b1f1c0..06b0afb1d51 100644
--- a/dll/win32/msafd/misc/sndrcv.c
+++ b/dll/win32/msafd/misc/sndrcv.c
@@ -291,6 +291,13 @@ WSPRecv(SOCKET Handle,
NULL,
0);
+ /* Non-blocking sockets must wait until data is available */
+ if (Status == STATUS_PENDING && Socket->SharedData->NonBlocking)
+ {
+ if (lpErrno) *lpErrno = WSAEWOULDBLOCK;
+ return SOCKET_ERROR;
+ }
+
/* Wait for completion of not overlapped */
if (Status == STATUS_PENDING && lpOverlapped == NULL)
{
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab3bd82928b29376a57c7…
commit ab3bd82928b29376a57c70bfa76c51c737f6bcf0
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Aug 17 15:36:54 2023 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Aug 17 15:36:54 2023 +0200
[FREELDR] Convert source files to UTF-8 without BOM
---
boot/freeldr/freeldr/arch/i386/hwdisk.c | 2 +-
boot/freeldr/freeldr/arch/i386/pc/pchw.c | 2 +-
boot/freeldr/freeldr/arch/realmode/pxe.inc | 2 +-
boot/freeldr/freeldr/disk/scsiport.c | 2 +-
boot/freeldr/freeldr/include/arcemul.h | 2 +-
boot/freeldr/freeldr/include/fs/pxe.h | 2 +-
boot/freeldr/freeldr/include/ntoskrnl.h | 2 +-
boot/freeldr/freeldr/lib/fs/fat.c | 2 +-
boot/freeldr/freeldr/lib/fs/iso.c | 2 +-
boot/freeldr/freeldr/lib/fs/pxe.c | 2 +-
boot/freeldr/freeldr/lib/inifile/ini_init.c | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/boot/freeldr/freeldr/arch/i386/hwdisk.c b/boot/freeldr/freeldr/arch/i386/hwdisk.c
index cf23c60ac21..0a7ef8600ae 100644
--- a/boot/freeldr/freeldr/arch/i386/hwdisk.c
+++ b/boot/freeldr/freeldr/arch/i386/hwdisk.c
@@ -2,7 +2,7 @@
* FreeLoader
*
* Copyright (C) 2003, 2004 Eric Kohl
- * Copyright (C) 2009 Herv� Poussineau
+ * Copyright (C) 2009 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/arch/i386/pc/pchw.c b/boot/freeldr/freeldr/arch/i386/pc/pchw.c
index 1dfa46bd120..4e8249dd99f 100644
--- a/boot/freeldr/freeldr/arch/i386/pc/pchw.c
+++ b/boot/freeldr/freeldr/arch/i386/pc/pchw.c
@@ -2,7 +2,7 @@
* FreeLoader
*
* Copyright (C) 2003, 2004 Eric Kohl
- * Copyright (C) 2009 Herv� Poussineau
+ * Copyright (C) 2009 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/arch/realmode/pxe.inc b/boot/freeldr/freeldr/arch/realmode/pxe.inc
index cb56439c980..523c40c6a6a 100644
--- a/boot/freeldr/freeldr/arch/realmode/pxe.inc
+++ b/boot/freeldr/freeldr/arch/realmode/pxe.inc
@@ -1,6 +1,6 @@
/*
* FreeLoader
- * Copyright (C) 2011 Herv� Poussineau
+ * Copyright (C) 2011 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/disk/scsiport.c b/boot/freeldr/freeldr/disk/scsiport.c
index 63d81c3dab8..633facc496c 100644
--- a/boot/freeldr/freeldr/disk/scsiport.c
+++ b/boot/freeldr/freeldr/disk/scsiport.c
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: boot/freeldr/freeldr/disk/scsiport.c
* PURPOSE: Interface for SCSI Emulation
- * PROGRAMMERS: Herv� Poussineau <hpoussin(a)reactos.org>
+ * PROGRAMMERS: Hervé Poussineau <hpoussin(a)reactos.org>
*/
/* INCLUDES *******************************************************************/
diff --git a/boot/freeldr/freeldr/include/arcemul.h b/boot/freeldr/freeldr/include/arcemul.h
index 437fecea28f..2c01ed71a3a 100644
--- a/boot/freeldr/freeldr/include/arcemul.h
+++ b/boot/freeldr/freeldr/include/arcemul.h
@@ -1,6 +1,6 @@
/*
* FreeLoader
- * Copyright (C) 2009 Herv� Poussineau <hpoussin(a)reactos.org>
+ * Copyright (C) 2009 Hervé Poussineau <hpoussin(a)reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/include/fs/pxe.h b/boot/freeldr/freeldr/include/fs/pxe.h
index 5d2cc2abc42..9ac80055505 100644
--- a/boot/freeldr/freeldr/include/fs/pxe.h
+++ b/boot/freeldr/freeldr/include/fs/pxe.h
@@ -1,6 +1,6 @@
/*
* FreeLoader PXE support
- * Copyright (C) 2011 Herv� Poussineau
+ * Copyright (C) 2011 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/include/ntoskrnl.h b/boot/freeldr/freeldr/include/ntoskrnl.h
index c88c5e55eba..393913d2be5 100644
--- a/boot/freeldr/freeldr/include/ntoskrnl.h
+++ b/boot/freeldr/freeldr/include/ntoskrnl.h
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: boot/freeldr/freeldr/include/ntoskrnl.h
* PURPOSE: NTOS glue routines for the MINIHAL library
- * PROGRAMMERS: Herv� Poussineau <hpoussin(a)reactos.org>
+ * PROGRAMMERS: Hervé Poussineau <hpoussin(a)reactos.org>
*/
#include <ntdef.h>
diff --git a/boot/freeldr/freeldr/lib/fs/fat.c b/boot/freeldr/freeldr/lib/fs/fat.c
index a7495f17770..1b5ad239e1f 100644
--- a/boot/freeldr/freeldr/lib/fs/fat.c
+++ b/boot/freeldr/freeldr/lib/fs/fat.c
@@ -3,7 +3,7 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: FAT filesystem driver for FreeLoader
* COPYRIGHT: Copyright 1998-2003 Brian Palmer (brianp(a)sginet.com)
- * Copyright 2009 Herv� Poussineau
+ * Copyright 2009 Hervé Poussineau
* Copyright 2019 Victor Perevertkin (victor.perevertkin(a)reactos.org)
*/
diff --git a/boot/freeldr/freeldr/lib/fs/iso.c b/boot/freeldr/freeldr/lib/fs/iso.c
index ba7c57f38d4..54222b2a160 100644
--- a/boot/freeldr/freeldr/lib/fs/iso.c
+++ b/boot/freeldr/freeldr/lib/fs/iso.c
@@ -1,7 +1,7 @@
/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- * Copyright (C) 2009 Herv� Poussineau <hpoussin(a)reactos.org>
+ * Copyright (C) 2009 Hervé Poussineau <hpoussin(a)reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/lib/fs/pxe.c b/boot/freeldr/freeldr/lib/fs/pxe.c
index 87d06b75e2c..66145a3d328 100644
--- a/boot/freeldr/freeldr/lib/fs/pxe.c
+++ b/boot/freeldr/freeldr/lib/fs/pxe.c
@@ -1,6 +1,6 @@
/*
* FreeLoader
- * Copyright (C) 2011 Herv� Poussineau
+ * Copyright (C) 2011 Hervé Poussineau
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/boot/freeldr/freeldr/lib/inifile/ini_init.c b/boot/freeldr/freeldr/lib/inifile/ini_init.c
index b63a578085a..9992b0b7151 100644
--- a/boot/freeldr/freeldr/lib/inifile/ini_init.c
+++ b/boot/freeldr/freeldr/lib/inifile/ini_init.c
@@ -1,6 +1,6 @@
/*
* FreeLoader
- * Copyright (C) 2009 Herv� Poussineau <hpoussin(a)reactos.org>
+ * Copyright (C) 2009 Hervé Poussineau <hpoussin(a)reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by