Compare commits

..

1 Commits

Author SHA1 Message Date
coah
877704e6ed cleanup(Contest): rename NHTTP callback error; drop dead locals
param_1 → error in sNHTTPReqCallback; remove unused Ghidra locals
from IPLContestInitialize.
2026-10-01 17:03:26 -05:00
6 changed files with 28 additions and 34 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.37% | 87.69% | 61.93% | 91.28% |
| 99.37% | 87.69% | 61.81% | 91.28% |
units 917/1027 complete, functions 12211/12563 matched.
units 916/1027 complete, functions 12211/12563 matched.
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
<!-- progress:end -->

View File

@@ -14994,8 +14994,8 @@ __vt__Q37ext_ead3www14SurfaceManager = .data:0x81643AA0; // type:object size:0xC
@1183 = .data:0x81643AB8; // type:object size:0x21 scope:local data:string
__vt__Q37ext_ead3www9ut_thread = .data:0x81643ADC; // type:object size:0x28
lbl_81643B08 = .data:0x81643B08; // type:object size:0x38
scWwwTexBufFmt = .data:0x81643B40; // type:object size:0x1E data:string
scWwwNoBrowserWin = .data:0x81643B5E; // type:object size:0x24 data:string
lbl_81643B40 = .data:0x81643B40; // type:object size:0x1E data:string
lbl_81643B5E = .data:0x81643B5E; // type:object size:0x24 data:string
lbl_81643B82 = .data:0x81643B82; // type:object size:0x1B data:string
lbl_81643B9D = .data:0x81643B9D; // type:object size:0x2B data:string
lbl_81643BC8 = .data:0x81643BC8; // type:object size:0x12 data:string
@@ -21589,7 +21589,7 @@ lbl_816962DB = .sdata:0x816962DB; // type:object size:0x8 data:string
lbl_816962E3 = .sdata:0x816962E3; // type:object size:0x1
lbl_816962E4 = .sdata:0x816962E4; // type:object size:0x8 data:string
lbl_816962F0 = .sdata:0x816962F0; // type:object size:0x8 data:string
scWwwErrorQ = .sdata:0x816962F8; // type:object size:0x8 data:string
lbl_816962F8 = .sdata:0x816962F8; // type:object size:0x8 data:string
globalNames__Q23www9trasition = .sdata:0x81696300; // type:object size:0x8 scope:local
@1425 = .sdata:0x81696308; // type:object size:0x1 scope:local
gEnableDpd = .sdata:0x81696310; // type:object size:0x4 data:4byte

View File

@@ -12,11 +12,11 @@ namespace ext_ead {
}
}
extern "C" char scWwwErrorQ[] = "ERROR?\n";
extern "C" char scWwwTexBufFmt[] = " TextureBuffer_ %d:%d ptr:%p\n";
extern "C" char scWwwNoBrowserWin[] = "INFO: cannot create browser window\n";
extern "C" char lbl_816962F8[] = "ERROR?\n";
extern "C" char lbl_81643B40[] = " TextureBuffer_ %d:%d ptr:%p\n";
extern "C" char lbl_81643B5E[] = "INFO: cannot create browser window\n";
#define OSReport(...) OSReport(scWwwErrorQ)
#define OSReport(...) OSReport(lbl_816962F8)
#include "iplwww/www_window.h"
#undef OSReport
@@ -76,12 +76,12 @@ namespace ext_ead {
memset(mTexBufArr[i][j], 0, texBufSize);
DCStoreRange(mTexBufArr[i][j], texBufSize);
print::IPLWWWReport(print::WWW_DEBUG, scWwwTexBufFmt, j, i, mTexBufArr[i][j]);
print::IPLWWWReport(print::WWW_DEBUG, lbl_81643B40, j, i, mTexBufArr[i][j]);
}
}
if (WWWCreateBrowserWindow(mpBrowserThread->GetHandle(), &mpWwwWindow, 0)) {
print::IPLWWWReport(print::WWW_WARNING, scWwwNoBrowserWin);
print::IPLWWWReport(print::WWW_WARNING, lbl_81643B5E);
return NULL;
} else {
WWWRect rect = {0, 0, 0, 0};

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

@@ -11,7 +11,7 @@ namespace ipl {
OSMutex NetSetup::sAllocLock;
NetSetup::StaticSOStartupInfo NetSetup::sSOStartupInfo;
void* NetSetup::iSOStartupEXThread(void* connType) {
void* NetSetup::iSOStartupEXThread(void* param_1) {
s32 cfgSetResult;
int soStartupRes;
SOInAddr soAddr;
@@ -61,7 +61,7 @@ namespace ipl {
soStartupRes = SOStartupEx(45000);
if (soStartupRes < 0) {
OSReport("[FAIL] SOStartup() failed.(%d)\n", soStartupRes);
soStartupRes = NETGetStartupErrorCodeEx(soStartupRes, (int)connType);
soStartupRes = NETGetStartupErrorCodeEx(soStartupRes, (int)param_1);
OSReport("<Error Code: %d>\n", -soStartupRes);
sSOStartupInfo.state = NET_SETUP_ERROR;
sSOStartupInfo.lastErr = -soStartupRes;

View File

@@ -459,48 +459,48 @@ namespace ipl {
}
void NCDSetting::setWDPrivacyMode(u16 mode) {
u16 privacyMode;
u16 uVar1;
switch (mode) {
case 0: {
privacyMode = 0;
uVar1 = 0;
break;
}
case 1: {
privacyMode = 1;
uVar1 = 1;
break;
}
case 2: {
privacyMode = 2;
uVar1 = 2;
break;
}
case 4: {
privacyMode = 4;
uVar1 = 4;
break;
}
case 5: {
privacyMode = 5;
uVar1 = 5;
break;
}
case 6: {
privacyMode = 6;
uVar1 = 6;
break;
}
case 7: {
privacyMode = 4;
uVar1 = 4;
break;
}
case 8: {
privacyMode = 1;
uVar1 = 1;
break;
}
default: {
privacyMode = 0;
uVar1 = 0;
break;
}
}
memset(&mConfig.profiles[mID].netif.wireless.config.manual.privacy.wep104, 0, 0x44);
mConfig.profiles[mID].netif.wireless.config.manual.privacy.mode = privacyMode;
mConfig.profiles[mID].netif.wireless.config.manual.privacy.mode = uVar1;
}
void NCDSetting::setPrivacy(u8* newKey, int len) {