[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] branch master updated: move port to config
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] branch master updated: move port to config |
Date: |
Sat, 20 Jan 2018 13:55:20 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository twister.
The following commit(s) were added to refs/heads/master by this push:
new b6501f3 move port to config
b6501f3 is described below
commit b6501f354e106eadbd40d525f6e719426beb8f16
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jan 20 13:55:18 2018 +0100
move port to config
---
src/twister/taler-twister.c | 39 ++++++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 11 deletions(-)
diff --git a/src/twister/taler-twister.c b/src/twister/taler-twister.c
index c1accb5..3d7381b 100644
--- a/src/twister/taler-twister.c
+++ b/src/twister/taler-twister.c
@@ -254,11 +254,6 @@ struct HttpRequest
/**
- * The port the proxy is running on (default 7777)
- */
-static unsigned long long port = GNUNET_GNS_PROXY_PORT;
-
-/**
* The cURL download task (curl multi API).
*/
static struct GNUNET_SCHEDULER_Task * curl_download_task;
@@ -1352,6 +1347,9 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
+ unsigned long long port;
+
+
cfg = c;
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
{
@@ -1378,13 +1376,37 @@ run (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (c,
+ "twister",
+ "DESTINATION_BASE_URL",
+ &target_server_base_url))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "twister",
+ "DESTINATION_BASE_URL");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (c,
+ "twister",
+ "HTTP_PORT",
+ &port))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "twister",
+ "HTTP_PORT");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Proxy listens on port %llu\n",
port);
/* start MHD daemon for HTTP */
mhd_daemon = MHD_start_daemon (MHD_USE_DEBUG,
- port,
+ (uint16_t) port,
NULL, NULL,
&create_response, NULL,
MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int)
16,
@@ -1414,11 +1436,6 @@ int
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_option_ulong ('p',
- "port",
- NULL,
- gettext_noop ("listen on specified port
(default: 7777)"),
- &port),
GNUNET_GETOPT_OPTION_END
};
static const char* page =
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-twister] branch master updated: move port to config,
gnunet <=