8 Commits
Author SHA1 Message Date
Hamish Coleman d2bafa716d Fix API initialisation to actually ignore invalid packets or passwords 2023-10-24 11:20:13 +01:00
Hamish Coleman 473b89c963 Simplify build system by using standard macro
Most environments have predefined macros that identify the environment
to the source code.  If we use these macros instead of defining our own
then there is one less parameter difference to keep track of with
different builds

cf:
    http://web.archive.org/web/20191012035921/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
    https://sourceforge.net/p/predef/wiki/OperatingSystems/
2023-07-01 19:08:43 +08:00
Hamish Coleman 21ac30c121 Use the correct modern windows sockets header
As suggested in a PR from @Legend-Master (this change is basically
unrelated to the main point of his PR, so extracted here)

Windows is a confusing and disappointing development environment.  They
completely replaced all the definitions in winsock.h with exact
equivalents in winsock2.h (except for a small number of deprecated
functions).

However they didnt make them mutually exclusive - so if you include
both, you get errors.  They also automatically include winsock.h from
windows.h, so you must remember to include winsock2.h first.  They also
didnt just remove winsock.h and replace it with the new contents.

(Probably in the name of "compatibility", whilst swearing that the new
winsock is the same as the old one - because if you cannot believe two
inconsistent things simultaneously, you shouldnt be a windows
programmer)

All these things are totally nuts.  Thanks, windows dev environment,
for not noticing that this is nuts
2023-06-25 02:46:03 +08:00
Hamish Coleman a7fc1c2bbc Merge branch 'dev' into iwyu 2023-06-18 12:31:58 +01:00
TonyandGitHub 76cbff370e Fix purgeable is always false on supernode peer list (#1117)
* Fix purgeable is always false on sn peer list
- And change sn_purge to bool

* Change all keep_on_running to bool

* Fix wrong `keep_running` type
2023-06-18 08:58:49 +01:00
Hamish Coleman 796ca2cb97 iwyu: management.h 2023-06-16 08:36:28 +01:00
Logan oos EvenandGitHub 95cfbca5a9 more sockaddr generalization (#1028) 2022-06-27 22:21:03 +02:00
Hamish Coleman d81908d6a2 Move as much as simply possible from edge_management into shared code 2022-04-17 00:25:04 +01:00