mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Merge pull request #20245 from ANR2MERefork/adhoc_socket
[Adhoc] Partially fixes multiplayer regression on GTA games.
This commit is contained in:
2 files changed
-12
No files matched your search
@@ -424,10 +424,6 @@ void deleteAllAdhocSockets() {
|
||||
|
||||
if (fd > 0) {
|
||||
// Close Socket
|
||||
struct linger sl {};
|
||||
sl.l_onoff = 1; // non-zero value enables linger option in kernel
|
||||
sl.l_linger = 0; // timeout interval in seconds
|
||||
setsockopt(fd, SOL_SOCKET, SO_LINGER, (const char*)&sl, sizeof(sl));
|
||||
shutdown(fd, SD_RECEIVE);
|
||||
closesocket(fd);
|
||||
}
|
||||
|
||||
@@ -2175,10 +2175,6 @@ int NetAdhocPdp_Delete(int id, int unknown) {
|
||||
// Valid Socket
|
||||
if (sock != NULL && sock->type == SOCK_PDP) {
|
||||
// Close Connection
|
||||
struct linger sl {};
|
||||
sl.l_onoff = 1; // non-zero value enables linger option in kernel
|
||||
sl.l_linger = 0; // timeout interval in seconds
|
||||
setsockopt(sock->data.pdp.id, SOL_SOCKET, SO_LINGER, (const char*)&sl, sizeof(sl));
|
||||
shutdown(sock->data.pdp.id, SD_RECEIVE);
|
||||
closesocket(sock->data.pdp.id);
|
||||
|
||||
@@ -3873,10 +3869,6 @@ int NetAdhocPtp_Close(int id, int unknown) {
|
||||
// Valid Socket
|
||||
if (socket != NULL && socket->type == SOCK_PTP) {
|
||||
// Close Connection
|
||||
struct linger sl {};
|
||||
sl.l_onoff = 1; // non-zero value enables linger option in kernel
|
||||
sl.l_linger = 0; // timeout interval in seconds
|
||||
setsockopt(socket->data.ptp.id, SOL_SOCKET, SO_LINGER, (const char*)&sl, sizeof(sl));
|
||||
shutdown(socket->data.ptp.id, SD_RECEIVE);
|
||||
closesocket(socket->data.ptp.id);
|
||||
|
||||
|
||||
Reference in new issue
Block a user