mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
indentation
This commit is contained in:
@@ -157,33 +157,33 @@ main (int argc, char *const *argv)
|
||||
{
|
||||
struct MHD_Daemon *TLS_daemon;
|
||||
|
||||
if (argc == 3){
|
||||
/* TODO check if this is truly necessary - disallow usage of the blocking /dev/random */
|
||||
/* gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0); */
|
||||
TLS_daemon = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG
|
||||
| MHD_USE_SSL, atoi (argv[1]),
|
||||
NULL,
|
||||
NULL, &http_ahc,
|
||||
NULL, MHD_OPTION_CONNECTION_TIMEOUT, 256,
|
||||
MHD_OPTION_HTTPS_MEM_KEY, key_pem,
|
||||
MHD_OPTION_HTTPS_MEM_CERT, cert_pem,
|
||||
|
||||
MHD_OPTION_END);
|
||||
}
|
||||
else {
|
||||
printf
|
||||
("Usage : %s HTTP-PORT SECONDS-TO-RUN\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 3)
|
||||
{
|
||||
/* TODO check if this is truly necessary - disallow usage of the blocking /dev/random */
|
||||
/* gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0); */
|
||||
TLS_daemon =
|
||||
MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG |
|
||||
MHD_USE_SSL, atoi (argv[1]), NULL, NULL, &http_ahc,
|
||||
NULL, MHD_OPTION_CONNECTION_TIMEOUT, 256,
|
||||
MHD_OPTION_HTTPS_MEM_KEY, key_pem,
|
||||
MHD_OPTION_HTTPS_MEM_CERT, cert_pem,
|
||||
MHD_OPTION_END);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("Usage: %s HTTP-PORT SECONDS-TO-RUN\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (TLS_daemon == NULL)
|
||||
{
|
||||
printf ("Error: failed to start TLS_daemon");
|
||||
fprintf (stderr, "Error: failed to start TLS_daemon\n");
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
printf ("MHD daemon listening on port %d\n", atoi (argv[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("MHD daemon listening on port %d\n", atoi (argv[1]));
|
||||
}
|
||||
|
||||
sleep (atoi (argv[2]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user