Compare commits

...

3 Commits

Author SHA1 Message Date
coah
52d36a1840 match(NHTTP_thread): NHTTPi_RecvProxyConnectHeader init order
Set cursor/index before ended so MWCC emits li r4 then li r5.
2026-10-01 17:08:22 -05:00
coah
feb7ba400d cleanup(Contest): rename NHTTP callback error; drop dead locals (#504)
param_1 → error in sNHTTPReqCallback; remove unused Ghidra locals
from IPLContestInitialize.
2026-10-01 17:07:39 -05:00
coah
20f4af8beb cleanup(NakamuraTest): rename Ghidra locals (#503)
iVar8 → nupResult, iVar7 → startupErr; drop unused iVar1 in conntestthread.
2026-10-01 17:06:56 -05:00
3 changed files with 10 additions and 18 deletions

View File

@@ -371,9 +371,9 @@ static BOOL NHTTPi_RecvProxyConnectHeader(NHTTPThreadContext* context)
response->httpStatus = NHTTPi_strToInt(header + 9, 3);
if (NHTTPi_strnicmp(header, "HTTP/", 5) == 0 && header[8] == ' '
&& response->httpStatus == 200) accepted = TRUE;
ended = FALSE;
cursor = header;
index = 0;
ended = FALSE;
while (index < used)
{
if (index > 1 && cursor[-1] == '\r' && *cursor == '\r') ended = TRUE;

View File

@@ -53,16 +53,10 @@ void iplContest_813D54F8(BOOL success, NAT nat);
void* IPLContestAlloc(int size);
void IPLContestFree(void* block, u32 _unused);
void sNHTTPReqCallback(int param_1, NHTTPResponse* httpRes);
void sNHTTPReqCallback(int error, NHTTPResponse* httpRes);
void sNHTTPCleanupCallback();
void IPLContestInitialize(void* heapBuf, NCDProxyProfile* proxy) {
char* pcVar1;
char cVar2;
char* pcVar3;
char* pcVar4;
int iVar5;
g_session.heapBuf = heapBuf;
g_session.heap = MEMCreateExpHeapEx(heapBuf, 0x10000, 0);
OSInitMutex(&g_session.mutex);
@@ -416,9 +410,9 @@ void IPLContestFree(void* block, u32 _unused) {
OSUnlockMutex(&g_session.mutex);
}
void sNHTTPReqCallback(int param_1, NHTTPResponse* httpRes) {
void sNHTTPReqCallback(int error, NHTTPResponse* httpRes) {
g_session.httpResponse = httpRes;
if (param_1 == 0) {
if (error == 0) {
switch (NHTTPGetResultCode(httpRes)) {
case 200: {
g_session.httpTestState = HTTP_TEST_RESPONSE_RECEIVED;
@@ -440,7 +434,7 @@ void sNHTTPReqCallback(int param_1, NHTTPResponse* httpRes) {
}
g_session.httpTestState = HTTP_TEST_RESPONSE_ERRORED;
switch (param_1) {
switch (error) {
case 0x4: {
g_session.errCode = g_session.errCode != 0 ? g_session.errCode : -52100;
break;

View File

@@ -234,10 +234,10 @@ namespace ipl {
OSReport("NUP region code : %s\n", productAreaString);
const char* isoCountryCode = SCUTILGetISOCountryCodeA2();
OSReport("NUP country code : %s\n", isoCountryCode);
int iVar8 = NUP_Start(mpNUPInstance, nus, isoCountryCode, productAreaString, 0);
int nupResult = NUP_Start(mpNUPInstance, nus, isoCountryCode, productAreaString, 0);
OSReport("NUP_Start()\n");
if (iVar8 < 0) {
switch (iVar8) {
if (nupResult < 0) {
switch (nupResult) {
case -5000: {
OSReport("FAIL ALLOC\n");
}
@@ -426,8 +426,8 @@ namespace ipl {
int val;
int len = 4;
if (SOGetInterfaceOpt(NULL, SO_SOL_CONFIG, SO_CONFIG_ERROR, &val, &len) == 0 && val == -111) {
int iVar7 = NETGetStartupErrorCode(-111);
mNetSetupLastErr = (-iVar7 / 100) * 100;
int startupErr = NETGetStartupErrorCode(-111);
mNetSetupLastErr = (-startupErr / 100) * 100;
mNetSetupLastErr = mNetSetup.getconntype();
}
Setting* settingScene = (Setting*)System::getScene(SCENE_SETTING);
@@ -451,8 +451,6 @@ namespace ipl {
}
void* NakamuraTest::conntestthread(void*) {
int iVar1;
IPLContestStart();
while (true) {
switch (IPLContestProcess()) {