What's new
Fix: BCAT schedule download (always showed "write error")
Root cause: The HTTPS client was calling sslConnectionSetSocketDescriptor (raw IPC) directly. The libnx documentation explicitly warns: "Do not use directly, use socketSslConnectionSetSocketDescriptor instead." The raw call failed with error 0xe87b (module 123, description 116) before any HTTP header was received. This caused net_https_get_to_file to return with status = 0, which the BCAT installer mistakenly treated as success, then tried to extract an empty zip — producing the "write error" the user saw.
Fix: Replaced sslConnectionSetSocketDescriptor with socketSslConnectionSetSocketDescriptor in both net_https_get and net_https_get_to_file. The wrapper correctly transfers the BSD socket file descriptor to the SSL service via the proper IPC mechanism.
Also fixed: status = 0 from a failed connection is no longer silently treated as HTTP 200; it now maps to a network error, preventing misleading "write error" fallback messages.
Improved diagnostics
- Per-phase error codes in the HTTPS client (connect / socket / handshake / write) for clearer failure reporting.
g_net_ssl_rcglobal records the last libnx SSLResultfor quick diagnosis of future SSL issues.