Clean up the server from temporary folder

The server is copied to /data/local/tmp/scrcpy-server.jar and executed
on the device.

As soon as we are connected, we can unlink (rm) it from /data/local/tmp,
to keep the device clean.
This commit is contained in:
Romain Vimont
2018-02-28 15:13:56 +01:00
parent 08d32e3bae
commit 221a7d0826
4 changed files with 31 additions and 6 deletions

View File

@@ -9,13 +9,15 @@ struct server {
socket_t server_socket;
socket_t device_socket;
SDL_bool adb_reverse_enabled;
SDL_bool server_copied_to_device;
};
#define SERVER_INITIALIZER { \
.process = PROCESS_NONE, \
.server_socket = INVALID_SOCKET, \
.device_socket = INVALID_SOCKET, \
.adb_reverse_enabled = SDL_FALSE, \
#define SERVER_INITIALIZER { \
.process = PROCESS_NONE, \
.server_socket = INVALID_SOCKET, \
.device_socket = INVALID_SOCKET, \
.adb_reverse_enabled = SDL_FALSE, \
.server_copied_to_device = SDL_FALSE, \
}
// init default values