feat(libSceNpSessionSignaling): answer connection status queries offline #4695

Closed
p3n1cillin wants to merge 1 commit from upstream-pr/4695 into main
p3n1cillin commented 2026-10-12 19:11:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-12T19:11:21Z.


What

Implements sceNpSessionSignalingGetConnectionStatus for the library's offline model, in which no session ever activates (sceNpSessionSignalingActivateSession already fails). Every connection id answers SCE_NP_SESSION_SIGNALING_ERROR_CONN_NOT_FOUND (0x8055330C, from shadPS4's np_error.h) without writing the status, peer address or peer port; a null status answers INVALID_ARGUMENT, as the library's other queries do.

The signature (context id, connection id, int32* status, peer address*, uint16* peer port) is the one already declared, matching PS4's sceNpSignalingGetConnectionStatus. ASTRO BOT (PPSA21564, 01.007.000) imports this function. The assumptions are recorded in docs/dev/debt/libSceNpSessionSignaling.md.

guest_np_session_signaling now checks the null-status error, the not-found answer with and without peer outputs, and that no output is written.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), BUILD_TESTING=ON: guest_np_session_signaling passes. python tools/check_conventions.py --base origin/main passes. Not tested in a title: the import was found with the registry relinker --registry wrote for PPSA21564.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4833892093 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4695). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-12T19:11:21Z. --- ### What Implements `sceNpSessionSignalingGetConnectionStatus` for the library's offline model, in which no session ever activates (`sceNpSessionSignalingActivateSession` already fails). Every connection id answers `SCE_NP_SESSION_SIGNALING_ERROR_CONN_NOT_FOUND` (0x8055330C, from [shadPS4's np_error.h](https://github.com/shadps4-emu/shadPS4/blob/64d198190fa05d37cbb1fa29c50f967c376fce55/src/core/libraries/np/np_error.h)) without writing the status, peer address or peer port; a null status answers `INVALID_ARGUMENT`, as the library's other queries do. The signature `(context id, connection id, int32* status, peer address*, uint16* peer port)` is the one already declared, matching PS4's `sceNpSignalingGetConnectionStatus`. ASTRO BOT (PPSA21564, 01.007.000) imports this function. The assumptions are recorded in `docs/dev/debt/libSceNpSessionSignaling.md`. `guest_np_session_signaling` now checks the null-status error, the not-found answer with and without peer outputs, and that no output is written. ### Tested Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), `BUILD_TESTING=ON`: `guest_np_session_signaling` passes. `python tools/check_conventions.py --base origin/main` passes. Not tested in a title: the import was found with the registry `relinker --registry` wrote for PPSA21564. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-12 19:11:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T19:11:37Z.


Thank you for your contribution! Authors with no pull requests merged into main can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130880274 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4695#issuecomment-6130880274). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T19:11:37Z. --- Thank you for your contribution! Authors with no pull requests merged into `main` can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!4695
No description provided.