Fix jamulus/pollServerList reporting success on invalid directory address#3820
Fix jamulus/pollServerList reporting success on invalid directory address#3820mcfnord wants to merge 2 commits into
Conversation
The jamulus/pollServerList RPC handler set response["error"] when the directory address failed to parse, but then unconditionally set response["result"] = "ok" after the if/else, so an invalid socket address was reported as success (with both "error" and "result" present in the response). Remove the stray unconditional assignment. The success branch already sets result = "ok", matching the error-and-return idiom used by every other handler in this file. Fixes jamulussoftware#3818
ann0see
left a comment
There was a problem hiding this comment.
AI is probably still working...
|
Testing should obviously test the JSON-RPC api... |
The Fable special ended, so today is Opus on X-High Effort. I saw a few examples today of Opus making small errors, but those probably indicate larger errors are more possible, including subtle errors. So in the most complicated instance, I asked Fable to review results. |
|
Note 📡 STAND BY FOR AN LLM-AUTHORED MESSAGE. @ann0see The requested change is in |
Fixes #3818
The
jamulus/pollServerListRPC handler setresponse["error"]when the directory address failed to parse, but then unconditionally setresponse["result"] = "ok"after theif/else. As a result, an invalid socket address was reported as success, with both"error"and"result"present in the response.Fix
Remove the stray unconditional assignment. The success branch already sets
result = "ok", so the handler now reportserroron failure andresulton success — matching the error-path idiom used by every other handler in this file.Testing
clang-format-14clean