From 4b661819d2c588cb2e325bdce20da26d5ccabd94 Mon Sep 17 00:00:00 2001 From: Matheus Fillipe Date: Fri, 28 Nov 2025 15:45:59 -0300 Subject: [PATCH 1/3] Configure buffers for curl and disk writing --- source/pkgi_ps3.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/pkgi_ps3.c b/source/pkgi_ps3.c index beee4af..1787716 100644 --- a/source/pkgi_ps3.c +++ b/source/pkgi_ps3.c @@ -43,6 +43,9 @@ #define PKGI_USER_AGENT "Mozilla/5.0 (PLAYSTATION 3; 1.00)" +#define PKGI_CURL_BUFFER_SIZE (256 * 1024L) +#define PKGI_FILE_BUFFER_SIZE (256 * 1024) + struct pkgi_http { @@ -1152,6 +1155,12 @@ void pkgi_curl_init(CURL *curl) curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L); // request using SSL for the FTP transfer if available curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY); + + curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, PKGI_CURL_BUFFER_SIZE); + curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1L); + curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L); + curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 60L); + curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 30L); } pkgi_http* pkgi_http_get(const char* url, const char* content, uint64_t offset) @@ -1341,6 +1350,7 @@ void* pkgi_create(const char* path) LOG("cannot create %s, err=0x%08x", path, fd); return NULL; } + setvbuf(fd, NULL, _IOFBF, PKGI_FILE_BUFFER_SIZE); LOG("fopen returned fd=%d", fd); return (void*)fd; @@ -1369,6 +1379,7 @@ void* pkgi_append(const char* path) LOG("cannot append %s, err=0x%08x", path, fd); return NULL; } + setvbuf(fd, NULL, _IOFBF, PKGI_FILE_BUFFER_SIZE); LOG("fopen returned fd=%d", fd); return (void*)fd; From d88868d9c0eb03ef82aaacae58a4c4453c54ebac Mon Sep 17 00:00:00 2001 From: Matheus Fillipe Date: Tue, 16 Dec 2025 18:27:21 +0100 Subject: [PATCH 2/3] Update source/pkgi_ps3.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Damián Parrino --- source/pkgi_ps3.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/pkgi_ps3.c b/source/pkgi_ps3.c index 3fb7a89..8e870b1 100644 --- a/source/pkgi_ps3.c +++ b/source/pkgi_ps3.c @@ -1160,9 +1160,7 @@ void pkgi_curl_init(CURL *curl) curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY); curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, PKGI_CURL_BUFFER_SIZE); - curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1L); curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L); - curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 60L); curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 30L); // check for proxy settings From d9d1aadff8fe824caeef3a51da2cad2e05e527a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Tue, 16 Dec 2025 18:44:16 -0300 Subject: [PATCH 3/3] Change pkgi_security_check placeholder --- source/pkgi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/pkgi.c b/source/pkgi.c index c84f4c7..1106295 100644 --- a/source/pkgi.c +++ b/source/pkgi.c @@ -700,9 +700,9 @@ static void pkgi_load_language(const char* lang) mini18n_set_locale(path); } -static int pkgi_security_check() +static int pkgi_security_check(void) { - return 0; + return 1; } int main(int argc, const char* argv[])