Commit Graph
102 Commits
Author SHA1 Message Date
Eugene Sandulenko bb58647588 NETWORKING: Fix warning 2017-08-11 22:05:35 +02:00
Eugene Sandulenko addcdd5ae8 NETWORKING: Fix data type cast in comparison. char is usually signed 2017-08-11 22:00:15 +02:00
Torbjörn Andersson 665f5c99b2 JANITORIAL: Silence some more GCC 7 fall through warnings
I think these are the last one that were already flagged as being
deliberate.
2017-08-06 16:54:38 +02:00
Schrijvers Luc a2792531f6 NETWORKING: fix missing SIOCGIFCONF for Haiku (#973) 2017-07-17 21:35:23 +02:00
Eugene Sandulenko 940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Willem Jan Palenstijn 72962ae0f6 CLOUD: Fix whitespace 2017-03-04 15:09:08 +01:00
Eugene Sandulenko cfc83b4a0a BACKENDS: NETWORKING: Fix warning 2017-03-04 14:52:51 +01:00
Alexander 302f6e6bcc CLOUD: Fix LocalWebserver::resolveAddress() on Android
No <ifaddrs.h> available on Android, thus fixed similarly to https://github.com/zlargon/lssdp/commit/9b4568
2017-03-04 19:49:28 +06:00
D G Turner 20e04ad234 CLOUD: Fix Unsigned vs. Signed Comparison Compiler Warning. 2017-01-17 08:27:04 +00:00
D G Turner 7a14f199ea CLOUD: Fix Possible Uninitialized Variable Compiler Warning. 2017-01-16 17:38:26 +00:00
D G Turner c0a40e2e88 CLOUD: Fix Further Variable Shadowing Compiler Warnings. 2017-01-16 13:09:58 +00:00
D G Turner aac2f7518d CLOUD: Fix Compilation Failure.
Cut and Paste Typo.
2017-01-16 13:07:20 +00:00
D G Turner 85a3dad96a CLOUD: Fix Various Variable Shadowing Compiler Warnings. 2017-01-16 13:01:17 +00:00
D G Turner f2e03d2c07 CLOUD: Fix Various Compiler Warnings By Adding Casts. 2017-01-16 12:49:40 +00:00
Thierry Crozat 77357ff71a CLOUD: Fix looking for the wwwroot.zip archive
If the themepath was defined but the wwwroot.zip file was not in
that path, looking for it failed as it never reached the part of the
code using SearchMan to look for it.
2016-09-05 23:39:59 +01:00
Thierry Crozat a2a985368c BUILD: Tie the SDL_net version to the SDL version
This means that when using SDL 1.2 we use SDL_net 1.2, but when
using SDL 2 we now use SLD_net 2 as well. Both versions work
properly and there is not code change needed in ScummVM.

This change is because SDL_net depends on SDL, and using
SDL_net 1.2 with SDL 2 means we can end up needing to link with
both the SDL and SDL2 libraries.
2016-09-03 23:07:21 +01:00
Eugene Sandulenko fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Bastien Bouclet 25bf68c39a BACKENDS: Remove extra line returns in warnings 2016-09-03 07:14:16 +02:00
Alexander Tkachev f8fe150130 CLOUD: Fix Webserver's usage of DefaultSaveFileManager
concatWithSavesPath() is only defined when curl is used, but was used in
Webserver even when curl is unavailable.
2016-08-30 21:08:02 +06:00
Alexander Tkachev 97cf2be7ef CLOUD: Update LocalWebserver
Reader now reads headers into stream, and some checks are added there
and in UploadFileClientHandler, so if headers are too long, they are
treated as bad request.
2016-08-24 16:07:55 +06:00
Alexander Tkachev dc02a789b6 CLOUD: Use forbidden combinations
I accidentally tried "folder../" instead "folder/../" and understood
that I made "folder../" forbidden too, though it's a valid folder name.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 8a1cca896e CLOUD: Update handlers
Now if there is no "rootpath" specified, it's not even listed by
FilesPageHandler and ListAjaxHandler. And, of course, not available to
use anywhere else.
2016-08-24 16:07:55 +06:00
Alexander Tkachev acfa1d1f10 CLOUD: Handle paths in marked places
Paths containing '../' are forbidden to use in Files Manager. There is
also a special inner black list of paths which are not used and a check
that specified path is under "savepath" or "rootpath" (from "cloud"
domain).
2016-08-24 16:07:55 +06:00
Alexander Tkachev dd9e5a95dc CLOUD: Mark places where path handling is needed 2016-08-24 16:07:55 +06:00
Alexander Tkachev 126fe9c845 CLOUD: Add "minimal mode" in LocalWebserver
StorageWizardDialog now runs LocalWebserver in "minimal mode" for
security reasons. In this mode server uses only those handlers which
state to support it.

There are two handlers which support minimal mode: IndexPageHandler
(which handles `code` requests needed by StorageWizardDialog) and
ResourceHandler (which provides inner resources like `style.css` or
`logo.png` from `wwwroot.zip` archive).
2016-08-24 16:07:55 +06:00
Peter Bozsó a1de322c18 CLOUD: Use overriden handle() instead of ClientHandlerCallback in page handlers
Using a dedicated callback object for this was an unnecessary overhead.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 712410496e CLOUD: Fix UploadFileClientHandler
It now redirects user on success not only when file was the last field
in the content, but also when it was uploaded already and Handler worked
further to search for more files.
2016-08-24 16:07:55 +06:00
Peter Bozsó 64b361b335 CLOUD: Move determineMimeType to ResourceHandler 2016-08-24 16:07:55 +06:00
Peter Bozsó b68bd78b44 CLOUD: Remove unused removePathHandler(), make addPathHandler() private 2016-08-24 16:07:55 +06:00
Alexander Tkachev 2c34864a06 CLOUD: Fix UploadFileClientHandler
A few possible memory leaks about `_contentStream` there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 15c6772ff7 ALL: Fix debug, warning and error usage
Added prefixes, used debug(9).
2016-08-24 16:07:55 +06:00
Eugene Sandulenko d57fca4665 CLOUD: JANITORIAL: Fix code formatting 2016-08-24 16:07:55 +06:00
Alexander Tkachev 7c9912e3d8 CLOUD: Fix IndexPageHandler warning 2016-08-24 16:07:55 +06:00
Peter Bozsó 9254df2d96 CLOUD: Fix code formatting 2016-08-24 16:07:55 +06:00
Alexander Tkachev 438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 01161ae7dd CLOUD: Do some refactoring/cleanup in Networking 2016-08-24 16:07:55 +06:00
Alexander Tkachev 85f4c69fc9 CLOUD: Update StorageWizardDialog
It now hides code fields not just when built with SDL_Net, but also when
LocalWebserver's using default port.

So that's why NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is defined
in localwebserver.h now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 39865e6e6c CLOUD: Add port override for LocalWebserver
It's enabled only when NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is
defined.

It's not defined, because override means we have to reconfigure our
redirect links somehow to use the override port.
2016-08-24 16:07:55 +06:00
Alexander Tkachev e833c8f65c CLOUD: Add OSD warning when can't start LocalWebserver 2016-08-24 16:07:55 +06:00
Alexander Tkachev 36b381e411 CLOUD: Make "/create" support AJAX
Now creating directories doesn't refresh the "/filesAJAX" page.
2016-08-24 16:07:55 +06:00
Alexander Tkachev da229dd84c CLOUD: Add "ajax" parameter for "/create" and "/upload"
If it's set, these redirect to "/filesAJAX" instead of "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev e6caa482e1 CLOUD: Add messages in "/filesAJAX" 2016-08-24 16:07:55 +06:00
Alexander Tkachev 09ae2f7593 CLOUD: Add "/filesAJAX" sketch
It works already, but still requires some polishing.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 5163fb4e02 CLOUD: Add ListAjaxHandler
"/list" now returns JSON with directory information. Would be used in
AJAX-based Files Manager.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 6c0f491c4f CLOUD: Add "Index of" label in server's "/files" 2016-08-24 16:07:55 +06:00
Alexander Tkachev 06ccfd4b9a CLOUD: Add icons in "/files" list 2016-08-24 16:07:55 +06:00
Alexander Tkachev 0a43dad629 CLOUD: Redirect to "/files" from "/"
"/" is used to receive "?code", but when there is no such parameter
passed, it's safe to redirect user to the "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev 5c60cd14c2 CLOUD: Add LocalWebserver::resolveAddress()
Works on Linux too. And, well, I'm bad in adding backends, so it's just
#ifdefed there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 389c669a47 CLOUD: Add "directory" form for webserver "/upload"
The attribute is Chrome-only.
2016-08-24 16:07:55 +06:00