sm64coopdx/src/pc/network
fefux 87f87b5dc9
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
Ns_socket_get_id generates always empty string on linux (#1248)
This pr fixes an issue on linux where the function ns_socket_get_id_str always returns empty string.
See glibc implementation of vsnprintf : [vsnprintf implementation](https://elixir.bootlin.com/glibc/glibc-2.36/source/libio/vsnprintf.c#L112). First string parameter is "emptied" before starting the copy.

And I suspect the original snprintf to rewrite twice the same value in id_str (except if I missed something) so we can just remove it.

This issue gives moderator access to all players when they connect/reconnect after adding one player as moderator because all players have the same id : "".

How to reproduce : 
Host server (via socket, not coopnet) on sm64coopdx linux version
Add moderator to one player
All new connected or reconnected player are promoted to moderator
2026-05-18 07:58:46 +10:00
..
coopnet reset coopnet callbacks on shutdown [build] 2025-03-09 14:46:40 +10:00
packets Fix sync valid packet issues for the server (#1228) 2026-05-07 11:23:57 -04:00
socket Ns_socket_get_id generates always empty string on linux (#1248) 2026-05-18 07:58:46 +10:00
ban_list.c Palette system overhaul and preset rewrite 2024-05-21 17:09:59 -04:00
ban_list.h Added chat commands: /kick /ban /permban /players 2022-02-12 15:23:05 -08:00
lag_compensation.c Expose more lag compensation things to Lua 2024-12-01 16:46:05 -05:00
lag_compensation.h Document lag_compensation.h (54.31%) 2024-12-08 18:16:12 -05:00
moderator_list.c Palette system overhaul and preset rewrite 2024-05-21 17:09:59 -04:00
moderator_list.h Moderator cleanup 2022-05-09 23:20:07 -07:00
network.c Change romhack camera options (#1247) 2026-05-16 22:07:51 -04:00
network.h add stayInLevelAfterStar constants (#1210) 2026-04-30 12:24:57 +10:00
network_player.c mario object get optimizations (#840) 2025-06-09 20:04:24 +10:00
network_player.h Document more functions! (83%) 2025-04-25 17:03:41 -04:00
network_utils.c Stop the gameplay from advancing a single frame on the pause screen in singleplayer (#596) 2024-12-31 08:01:49 -05:00
network_utils.h Document some more files (69.61%) 2024-12-22 21:53:54 -05:00
sync_object.c Fix oob read/write caused to sync_object_init_field (#1117) 2026-03-02 19:25:22 +01:00
sync_object.h Fix oob read/write caused to sync_object_init_field (#1117) 2026-03-02 19:25:22 +01:00
version.c Add version info (Windows) + Smart update checker (#1069) 2026-05-01 22:05:42 -04:00
version.h Add version info (Windows) + Smart update checker (#1069) 2026-05-01 22:05:42 -04:00