fix(channelserver): send ACK on empty Raviente register payload

handleMsgSysOperateRegister returned without sending an ACK when the
payload was empty, causing the client to softlock waiting for a response.
Send doAckBufSucceed with nil data on the early-return path to match
the success-path ACK type.

Also update tests to expect error returns instead of panics from
unimplemented Build/Parse stubs (matching prior panic→error refactor),
and mark resolved anti-patterns in docs.
This commit is contained in:
Houmgaor
2026-02-20 20:05:52 +01:00
parent ac59188488
commit a752c5187e
5 changed files with 21 additions and 29 deletions

View File

@@ -1,6 +1,7 @@
package mhfpacket
import (
"strings"
"testing"
"erupe-ce/common/byteframe"
@@ -261,7 +262,8 @@ func TestBuildCoverage_NotImplemented(t *testing.T) {
return
}
// Build returned an error, which is expected for NOT IMPLEMENTED stubs
if err.Error() != "NOT IMPLEMENTED" {
errMsg := err.Error()
if errMsg != "NOT IMPLEMENTED" && !strings.Contains(errMsg, "not implemented") {
t.Errorf("Build() returned unexpected error: %v", err)
}
})