Added basic file transfer

This commit is contained in:
2020-12-20 16:47:40 +01:00
parent f0338209f5
commit 00abf345b9
7 changed files with 192 additions and 38 deletions

View File

@ -80,6 +80,7 @@ void destroy() {
if (kills > 0) {
fprintf(stderr, ERR_STR "Killed %i child process(es)" CLR_STR "\n", kills);
}
cache_unload();
exit(2);
}
@ -137,6 +138,7 @@ void terminate() {
} else {
fprintf(stderr, "Goodbye\n");
}
cache_unload();
exit(0);
}
@ -239,7 +241,9 @@ int main(int argc, const char *argv[]) {
signal(SIGINT, terminate);
signal(SIGTERM, terminate);
cache_init();
if (cache_init() != 0) {
return 1;
}
openssl_init();
client.ctx = SSL_CTX_new(TLS_server_method());