Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/pkgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand Down
9 changes: 9 additions & 0 deletions source/pkgi_ps3.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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
{
Expand Down Expand Up @@ -1154,6 +1157,10 @@ void pkgi_curl_init(CURL *curl)
// 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_KEEPALIVE, 1L);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 30L);

// check for proxy settings
memset(&proxy_info, 0, sizeof(proxy_info));
netCtlGetInfo(NET_CTL_INFO_HTTP_PROXY_CONFIG, &proxy_info);
Expand Down Expand Up @@ -1367,6 +1374,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;
Expand Down Expand Up @@ -1395,6 +1403,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;
Expand Down