mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-18 23:41:38 +00:00
Whitespace and indention cleanups to the HTTP download code.
This commit is contained in:
parent
0ad406a95f
commit
cd1b67e489
1 changed files with 15 additions and 15 deletions
|
@ -72,7 +72,7 @@ static size_t CL_HTTP_Recv(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||
// Since this is used for paclists only we assume that the
|
||||
// file cannot be longer then 256k. Everythings else is
|
||||
// considered malicious or a broken server.
|
||||
if (length < 1 || length > 262144)
|
||||
if (length < 1 || length > 262144)
|
||||
{
|
||||
length = 262144.0f;
|
||||
}
|
||||
|
@ -328,16 +328,16 @@ static void CL_CheckAndQueueDownload(char *path)
|
|||
// Make sure that there're no evil pathes in the filelist. Most
|
||||
// of these should be pretty okay with YQ2 since we've got a much
|
||||
// better filesystem as other clients but let's stay consistent.
|
||||
//
|
||||
//
|
||||
// .. -> Don't change to upper dirs.
|
||||
// // -> Should be okay
|
||||
// \\ -> May fuck some string functions and CURL up. They
|
||||
// aren't valid URL characters anyways.
|
||||
// aren't valid URL characters anyways.
|
||||
//
|
||||
// !pak && !strchr (path, '/') -> Plain files are always loaded
|
||||
// from and into subdirs.
|
||||
// (pak && strchr(path, '/') -> Paks are always loaded from and
|
||||
// into the toplevel dir.
|
||||
// from and into subdirs.
|
||||
// (pak && strchr(path, '/') -> Paks are always loaded from and
|
||||
// into the toplevel dir.
|
||||
if (strstr (path, "..") || strstr(path, "//") || strchr (path, '\\') ||
|
||||
(!pak && !strchr(path, '/')) || (pak && strchr(path, '/')))
|
||||
{
|
||||
|
@ -509,7 +509,7 @@ static void CL_FinishHTTPDownload(void)
|
|||
|
||||
// Some files aren't saved but read
|
||||
// into memory buffers. This is used
|
||||
// for filelists only.
|
||||
// for filelists only.
|
||||
if (dl->file)
|
||||
{
|
||||
isFile = true;
|
||||
|
@ -596,7 +596,7 @@ static void CL_FinishHTTPDownload(void)
|
|||
remove (dl->filePath);
|
||||
}
|
||||
|
||||
// ...and the handle from CURLs mutihandle.
|
||||
// ...and the handle from CURLs mutihandle.
|
||||
curl_multi_remove_handle (multi, dl->curl);
|
||||
|
||||
// Special case: We're already aborting HTTP downloading,
|
||||
|
@ -607,7 +607,7 @@ static void CL_FinishHTTPDownload(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
// Abort all HTTP downloads.
|
||||
// Abort all HTTP downloads.
|
||||
CL_CancelHTTPDownloads (true);
|
||||
|
||||
continue;
|
||||
|
@ -624,7 +624,7 @@ static void CL_FinishHTTPDownload(void)
|
|||
remove (dl->filePath);
|
||||
}
|
||||
|
||||
// ...and the handle from CURLs mutihandle.
|
||||
// ...and the handle from CURLs mutihandle.
|
||||
curl_multi_remove_handle (multi, dl->curl);
|
||||
|
||||
continue;
|
||||
|
@ -894,7 +894,7 @@ qboolean CL_QueueHTTPDownload(const char *quakePath)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Mkay, now that the first download is queued we want
|
||||
// Mkay, now that the first download is queued we want
|
||||
// the generic(!) filelist.
|
||||
qboolean needList = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue