Goober5000 and Claude Opus 4.6
3f85d6172a
use std::move() for local variables that are copied but not reused ( #7308 )
...
* use std::move() for local variables that are copied but not reused
Addresses ~140 Coverity "Variable copied when it could be moved"
defects across 74 files. Every std::move() targets a local variable
whose value is consumed by push_back, emplace, assignment, lambda
capture, or a function call and is never read again afterward.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected] >
* clang: use std::make_shared
* clang: use std::make_unique
* address feedback
---------
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected] >
2026-05-07 14:40:38 +09:00
Taylor Richards
85b37e098e
remove "safe" versions of FD_SET/FD_ISSET ( #6918 )
...
The socket is a value to be assigned, not an index to be used. As such there
is no safety check to be done here and doing so just breaks things.
Fixes networking on Windows.
2025-08-08 20:43:34 -04:00
Goober5000
ceee045b35
coverity: move instead of copy
2025-05-10 01:15:46 -04:00
BMagnu
68f3fa6d8c
Actually compile with proper optimizations in a release build. ( #6336 )
...
* Change optimization to O3 and enable LTO
* Remove ODR violations
# Conflicts:
# code/menuui/playermenu.cpp
# code/osapi/osregistry.cpp
* Fix uninitialized structs
* Remove negative alloc warning
* O3 for mac
* Remove GCC13 warnings
* Fix warning
* Properly fix weapon alloc size
* Try to placate GCC9's Psnet_socket estimation
* remove warnin
* Fix safe fd set check
2024-11-25 20:10:38 +01:00
Goober5000
37a24b2a14
handle connection speed in a user-friendly way
...
1. Use a sensible default for the connection speed
2. Remove the `Psnet_connection` variable which is now obsolete: "its only purpose now is to change the default object update value for a player if it's set to dialup, and that's easily done in-game already"
The "You must define your connection speed" popup will now no longer appear unless it has been explicitly set to an invalid value.
Applies recommendations from, and fixes, #6402 .
2024-11-03 23:09:32 -05:00
Goober5000
37c344a127
a few build fixes
...
1. use `SIZE_T_ARG` instead of `"%lu"`; should fix format warning in #5780
2. since `HeapAllocator::checkRangesMerged()` has no effect unless running in debug, `#ifdef` out the function; should fix CI warning in #5778
2023-11-07 17:51:55 -05:00
Sébastien Noel
f149c36b44
Fix a few typos ( #5598 )
2023-10-24 20:33:45 -04:00
Taylor Richards
bf1a9f192a
fix memset() on nullptr in psnet_get_addr()
...
"addr" is optional and allowed to be null, so we've got to check
it before zeroing
2022-07-08 13:24:58 -04:00
Taylor Richards
20094df4cd
address issues causing network connectivity failures on macOS ( #4473 )
2022-07-07 03:15:27 -04:00
Taylor Richards
7fb8e64434
log non-psnet packets for debugging ( #4339 )
...
Previously, debug builds would assert if a packet was not a psnet packet
type. Port scans and general traffic checks could trigger this for any
public server. So we should just log these events instead, taking into
account that some of this traffic could be malicious in nature.
2022-06-03 14:16:49 -04:00
Taylor Richards
6d932df744
add options to prefer either IPv4 or IPv6
...
This really only applies to DNS lookups, setting the preference to either
be for IPv4 or IPv6 addresses. This makes for a far less error prone
troubleshooting method than disabling one of them outright.
2022-01-22 19:40:48 -05:00
Taylor Richards
6e3b75c613
silence valgrind errors in SENDTO()
2021-12-29 07:07:02 -05:00
Goober5000
a3c5186635
add missing newlines in several mprintf statements ( #3409 )
...
Fixes #3407 , and I used a regex search to find what I hope are all other examples.
2021-05-02 23:53:40 -04:00
Taylor Richards
cd5e1c297b
replace old multicast code with mdns/dns-sd
2020-11-21 00:57:03 -05:00
Taylor Richards
424840eabf
fix issues with psnet init
2020-10-18 05:31:24 -04:00
Taylor Richards
46bc4e2e8c
fix memory error which broke reliable sockets
2020-09-20 20:49:25 -04:00
Taylor Richards
b14122425a
use newer define for multicast group joining
2020-09-19 06:35:19 -04:00
Taylor Richards
3e04e955a4
fix build issues on FreeBSD
2020-09-01 14:36:10 -04:00
Taylor Richards
d30c0a2024
fix various errors from travis/appveyor
2020-08-30 00:03:14 -04:00
Taylor Richards
ff01dc02a7
adjust data type to avoid header conflict
2020-08-30 00:03:14 -04:00
Taylor Richards
e401f96cc3
add option to prefer IPv4 DNS addresses
2020-08-30 00:03:14 -04:00
Taylor Richards
9bb9aedc2a
add a more robust filter for traffic from ourselves
2020-08-30 00:03:14 -04:00
Taylor Richards
dd376b19d9
handle IPv4+IPv6 capable machines in a better way
2020-08-30 00:03:14 -04:00
Taylor Richards
52721dec06
report whether psnet socket is IPv6-only or dual-stack
2020-08-30 00:03:14 -04:00
Taylor Richards
459263b35f
fix issues with reliable socket logging
...
- better error handling for ip string
- port number in proper byte order
- anonymize ip address
2020-08-30 00:03:14 -04:00
Taylor Richards
72dd631520
anonymize logged IP addresses
2020-08-30 00:03:14 -04:00
Taylor Richards
83d6d0fd53
bind psnet socket to any address
...
fixes issue where an IPv6 internet connection would fail
to connect properly if socket is only bound to a local
IPv4 interface
2020-08-30 00:03:14 -04:00
Taylor Richards
01ee4d077b
make sure we are dual-stack by default (everywhere else)
2020-08-30 00:03:14 -04:00
Taylor Richards
90dbc8f2c3
deal with compiler errors and warnings on Windows
2020-08-30 00:03:14 -04:00
Taylor Richards
db0d0efd55
port PXO tracker client code to IPv6
2020-08-30 00:01:00 -04:00
Taylor Richards
92be33ad9c
first pass at IPv6 support
2020-08-30 00:01:00 -04:00
Taylor Richards
e9cf9ac10d
deal with type warnings on Windows
2019-11-18 12:00:26 -05:00
Taylor Richards
29ce72f66f
switch to using winsock2
...
also removes some obsolete win32 #ifdef's and
cleans up some windows #include's
2019-11-15 23:33:35 -05:00
asarium
fe0c6a629a
Do not allow failure for Windows Travis builds anymore
2019-08-22 17:36:28 +02:00
plieblang
b1881a700d
Fix copy/paste error when closing socket
2018-06-07 12:12:54 -07:00
asarium
eeed22b91a
Enable misc-unused-parameters
...
clang-tidy was used for fixing the warnings. It is not clear if this is
actually an improvement so this may still be disabled later.
2018-04-25 11:57:55 +02:00
asarium
dcac9e7223
Enable more misc- checks
2018-04-25 11:12:41 +02:00
asarium
0b4ca71eba
Enable modernize-deprecated-headers
2018-04-25 11:12:41 +02:00
asarium
9b5710e8c3
Fix various issues detected by MinGW
...
This fixes various issues I found while trying to compile FSO in a cross
compilation setup using MinGW. This is a prerequisite for merging Tea-CI
support.
2018-04-21 15:13:25 +02:00
asarium
e8fe940287
Cleanup config.h
2016-08-22 22:17:34 +02:00
asarium
2d4d0081cd
Merge branch 'master' into antipodes_/sync
...
Conflicts:
code/cmdline/cmdline.cpp
code/io/timer.cpp
code/network/multi.cpp
configure.ac
projects/MSVC_2005/Fred2.vcproj
projects/MSVC_2005/Freespace2.sln
projects/MSVC_2005/Freespace2.vcproj
projects/MSVC_2005/code.vcproj
projects/MSVC_2008/Fred2.vcproj
projects/MSVC_2008/Freespace2.doxproj
projects/MSVC_2008/Freespace2.vcproj
projects/MSVC_2008/code.vcproj
projects/MSVC_2010/Fred2.vcxproj
projects/MSVC_2012/Fred2.vcxproj
projects/MSVC_2012/Freespace2.vcxproj
projects/MSVC_2012/code.vcxproj
projects/MSVC_2012/code.vcxproj.filters
projects/Xcode4/FS2_Open.xcodeproj/project.pbxproj
projects/Xcode4/Frameworks.tgz
projects/Xcode4/Info.plist
2016-03-11 12:36:52 +01:00
jg18
1adb64e39d
Remove IPX support.
...
Remove support for the IPX protocol. The IPX selector button in the multi
options menu is now hidden, and the TCP button is disabled since there is no other option.
2016-02-25 10:28:49 -08:00
asarium
5f23381c07
Merge branch 'master' into antipodes_/sync
...
Conflicts:
code/cmdline/cmdline.cpp
code/globalincs/pstypes.h
code/globalincs/windebug.cpp
code/graphics/2d.cpp
code/windows_stub/stubs.cpp
2015-10-31 17:18:29 +01:00
Goober5000
ccc71a8e8b
looks like we'll need them in these three other files too
2015-10-25 21:20:57 -04:00
Goober5000
b82d0c579d
convert qsort to std::sort
2015-10-25 19:16:36 -04:00
asarium
b500e072da
Use cross-platform compatible struct
2015-08-28 11:46:10 +02:00
Cliff Gordon
6e0f9c1cd2
[fix/nat_multiplayer] Simplify the new psnet check.
2015-06-29 16:51:49 -05:00
Cliff Gordon
5311ea4f7a
[fix/nat_multiplayer] Vestigare's submitted patch for allowing multiple users behind a NAT to connect to a remote standalone.
2015-06-29 16:50:06 -05:00
niffiwan
01629bd946
Redo 9903 - this is a more robust solution
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9905 387891d4-d844-0410-90c0-e4c51a9137d3
2013-10-07 20:02:32 +10:00
niffiwan
7348b9b08d
remove gcc warnings [-Wunused-but-set-variable] in network/psnet2.cpp
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9904 387891d4-d844-0410-90c0-e4c51a9137d3
2013-10-07 20:02:32 +10:00