diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (diff) | |
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp')
| -rw-r--r-- | Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp b/Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp index 4e681354..d38a1bc9 100644 --- a/Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp +++ b/Minecraft.Client/PS3/Network/SonyHttp_PS3.cpp @@ -10,10 +10,10 @@ static const int sc_SSLPoolSize = (512 * 1024U); static const int sc_CookiePoolSize = (256 * 1024U); -void* SonyHttp_PS3::uriPool = nullptr; -void* SonyHttp_PS3::httpPool = nullptr; -void* SonyHttp_PS3::sslPool = nullptr; -void* SonyHttp_PS3::cookiePool = nullptr; +void* SonyHttp_PS3::uriPool = NULL; +void* SonyHttp_PS3::httpPool = NULL; +void* SonyHttp_PS3::sslPool = NULL; +void* SonyHttp_PS3::cookiePool = NULL; CellHttpClientId SonyHttp_PS3::client; CellHttpTransId SonyHttp_PS3::trans; bool SonyHttp_PS3:: bInitialised = false; @@ -22,31 +22,31 @@ bool SonyHttp_PS3:: bInitialised = false; bool SonyHttp_PS3::loadCerts(size_t *numBufPtr, CellHttpsData **caListPtr) { - CellHttpsData *caList = nullptr; + CellHttpsData *caList = NULL; size_t size = 0; int ret = 0; - char *buf = nullptr; + char *buf = NULL; - caList = static_cast<CellHttpsData *>(malloc(sizeof(CellHttpsData) * 2)); - if (nullptr == caList) { + caList = (CellHttpsData *)malloc(sizeof(CellHttpsData)*2); + if (NULL == caList) { app.DebugPrintf("failed to malloc cert data"); return false; } - ret = cellSslCertificateLoader(CELL_SSL_LOAD_CERT_ALL, nullptr, 0, &size); + ret = cellSslCertificateLoader(CELL_SSL_LOAD_CERT_ALL, NULL, 0, &size); if (ret < 0) { app.DebugPrintf("cellSslCertifacateLoader() failed(1): 0x%08x", ret); return ret; } - buf = static_cast<char *>(malloc(size)); - if (nullptr == buf) { + buf = (char*)malloc(size); + if (NULL == buf) { app.DebugPrintf("failed to malloc cert buffer"); free(caList); return false; } - ret = cellSslCertificateLoader(CELL_SSL_LOAD_CERT_ALL, buf, size, nullptr); + ret = cellSslCertificateLoader(CELL_SSL_LOAD_CERT_ALL, buf, size, NULL); if (ret < 0) { app.DebugPrintf("cellSslCertifacateLoader() failed(2): 0x%08x", ret); free(buf); @@ -72,7 +72,7 @@ bool SonyHttp_PS3::init() /*E startup procedures */ httpPool = malloc(sc_HTTPPoolSize); - if (httpPool == nullptr) { + if (httpPool == NULL) { app.DebugPrintf("failed to malloc libhttp memory pool\n"); return false; } @@ -84,7 +84,7 @@ bool SonyHttp_PS3::init() } cookiePool = malloc(sc_CookiePoolSize); - if (cookiePool == nullptr) { + if (cookiePool == NULL) { app.DebugPrintf("failed to malloc ssl memory pool\n"); return false; } @@ -97,7 +97,7 @@ bool SonyHttp_PS3::init() sslPool = malloc(sc_SSLPoolSize); - if (sslPool == nullptr) { + if (sslPool == NULL) { app.DebugPrintf("failed to malloc ssl memory pool\n"); return false; } @@ -109,7 +109,7 @@ bool SonyHttp_PS3::init() } size_t numBuf = 0; - CellHttpsData *caList = nullptr; + CellHttpsData *caList = NULL; if(!loadCerts(&numBuf, &caList)) return false; @@ -153,18 +153,18 @@ bool SonyHttp_PS3::parseUri(const char* szUri, CellHttpUri& parsedUri) { /*E the main part */ size_t poolSize = 0; - int ret = cellHttpUtilParseUri(nullptr, szUri, nullptr, 0, &poolSize); + int ret = cellHttpUtilParseUri(NULL, szUri, NULL, 0, &poolSize); if (0 > ret) { app.DebugPrintf("error parsing URI... (0x%x)\n\n", ret); return false; } - if (nullptr == (uriPool = malloc(poolSize))) + if (NULL == (uriPool = malloc(poolSize))) { app.DebugPrintf("error mallocing uriPool (%d)\n", poolSize); return false; } - ret = cellHttpUtilParseUri(&parsedUri, szUri, uriPool, poolSize, nullptr); + ret = cellHttpUtilParseUri(&parsedUri, szUri, uriPool, poolSize, NULL); if (0 > ret) { free(uriPool); @@ -185,7 +185,7 @@ void* SonyHttp_PS3::getData(const char* url, int* pDataSize) size_t localRecv = 0; if(!parseUri(url, uri)) - return nullptr; + return NULL; app.DebugPrintf(" scheme: %s\n", uri.scheme); app.DebugPrintf(" hostname: %s\n", uri.hostname); @@ -199,10 +199,10 @@ void* SonyHttp_PS3::getData(const char* url, int* pDataSize) if (0 > ret) { app.DebugPrintf("failed to create http transaction... (0x%x)\n\n", ret); - return nullptr; + return NULL; } - ret = cellHttpSendRequest(trans, nullptr, 0, nullptr); + ret = cellHttpSendRequest(trans, NULL, 0, NULL); if (0 > ret) { app.DebugPrintf("failed to complete http transaction... (0x%x)\n\n", ret); @@ -219,7 +219,7 @@ void* SonyHttp_PS3::getData(const char* url, int* pDataSize) app.DebugPrintf("failed to receive http response... (0x%x)\n\n", ret); cellHttpDestroyTransaction(trans); trans = 0; - return nullptr; + return NULL; } app.DebugPrintf("Status Code is %d\n", code); } @@ -232,19 +232,19 @@ void* SonyHttp_PS3::getData(const char* url, int* pDataSize) app.DebugPrintf("Only supporting data that has a content length : CELL_HTTP_ERROR_NO_CONTENT_LENGTH\n", ret); cellHttpDestroyTransaction(trans); trans = 0; - return nullptr; + return NULL; } else { app.DebugPrintf("error in receiving content length... (0x%x)\n\n", ret); cellHttpDestroyTransaction(trans); trans = 0; - return nullptr; + return NULL; } } int bufferSize = length; - char* buffer = static_cast<char *>(malloc(bufferSize + 1)); + char* buffer = (char*)malloc(bufferSize+1); recvd = 0; @@ -261,7 +261,7 @@ void* SonyHttp_PS3::getData(const char* url, int* pDataSize) free(buffer); cellHttpDestroyTransaction(trans); trans = 0; - return nullptr; + return NULL; } else { |
