Commit Graph
9 Commits
Author SHA1 Message Date
cozis e73bb3a7d8 Add crash logger 2025-12-04 12:25:19 +01:00
cozis e1fa3729c6 Drop the MAX_CONNS macro and define TCP_CONNECTION_LIMIT, TCP_POLL_CAPACITY, TCP_EVENT_CAPACITY instead 2025-11-22 22:59:32 +01:00
cozis d598ccedb2 Use a default timeout of -1 when metadata_server_step and chunk_server_step don't set an explicit one 2025-11-11 11:38:00 +01:00
cozis e124952fe2 Progress 2025-11-05 14:26:57 +01:00
cozis e135d871c1 Progress 2025-11-03 15:52:25 +01:00
Claude 0d3edf9155 Initialize timeout parameter to -1 in main_server.c
Fixed uninitialized timeout variables in metadata_server_main() and
chunk_server_main() functions by setting default value to -1.

**Changes:**
- metadata_server_main(): Changed `int timeout;` to `int timeout = -1;`
- chunk_server_main(): Changed `int timeout;` to `int timeout = -1;`

This ensures the timeout parameter has a defined default value before
being passed to init functions, which is important for predictable
behavior even though the init functions set the value themselves.

All build targets (tinydfs_server.out, example_client.out,
tinydfs_test.out) compile and run successfully.
2025-11-02 13:07:06 +00:00
Claude dc4fb33be2 Fix compilation errors for non-test builds
Fixed build errors in tinydfs_server and example_client targets caused
by missing timeout parameter and simulation client references.

**Changes:**

**main_server.c:**
- Added int timeout variable declaration in metadata_server_main()
- Added int timeout variable declaration in chunk_server_main()
- Pass &timeout to metadata_server_init() call
- Pass &timeout to metadata_server_step() call
- Pass &timeout to chunk_server_init() call
- Pass &timeout to chunk_server_step() call

**system.c:**
- Guarded simulation_client.h include with #ifdef BUILD_TEST
- Guarded PROCESS_TYPE_CLIENT enum value with #ifdef BUILD_TEST
- Guarded SimulationClient member in Process union with #ifdef BUILD_TEST
- Guarded is_client() function with #ifdef BUILD_TEST
- Guarded client detection logic in spawn_simulated_process()
- Guarded PROCESS_TYPE_CLIENT cases in all switch statements:
  - spawn_simulated_process() init switch
  - free_process() cleanup switch
  - update_simulation() step switch

**Result:**
- tinydfs_server.out now compiles successfully
- example_client.out now compiles successfully
- tinydfs_test.out continues to work correctly
- Simulation client code only included when BUILD_TEST is defined
- All three build targets pass compilation with only pre-existing warnings

The simulation_client code is now properly isolated to test builds only,
preventing linker errors when building the real server and example client.
2025-11-02 13:05:34 +00:00
cozis 7525a93035 Progress 2025-10-29 23:48:45 +01:00
cozis 174f37c6c0 Continue work on DST framework 2025-10-29 21:46:17 +01:00