mirror of
https://github.com/coturn/coturn.git
synced 2025-12-24 17:31:00 +01:00
This commit changes the server's default behavior to omit STUN error reason phrases in responses. A new option, `--send-error-reason` (and corresponding config file setting `send-error-reason`), is introduced to enable the inclusion of these reason phrases if desired. This change aims to reduce response size by default, while still allowing you to enable more verbose error messages for debugging. Changes include: - Renamed `no_error_reason` to `send_error_reason` in `turn_params_t`. - Default for `send_error_reason` is now `false` (reasons omitted). - Command-line option changed to `--send-error-reason` to enable reasons. - Updated `mainrelay.c` for new option name, logic, and usage string. - Updated all `turnserver.conf` files (`examples/etc/turnserver.conf`, `docker/coturn/turnserver.conf`) to reflect the new option and default. - Adjusted conceptual test cases for the new default behavior. - Partially updated `ns_turn_server.c` to use the new `send_error_reason` flag. Due to some limitations I encountered, a full update to `ns_turn_server.c` could not be reliably completed and will require your manual review and completion to ensure all error generation sites correctly adhere to the `send_error_reason` flag (sending reasons only when it's true).