aboutsummaryrefslogtreecommitdiff
path: root/src/rest/gnunet-rest-server.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-15 15:28:41 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-15 15:28:41 +0100
commit5d6ed5fbda01a324d8d9b800928339d4a90343c3 (patch)
treeb52f65dfc01e42f989df7aa2569ae69695fd9a54 /src/rest/gnunet-rest-server.c
parent294393abdca9f482321696e9aaec64b1a0488607 (diff)
downloadgnunet-5d6ed5fbda01a324d8d9b800928339d4a90343c3.tar.gz
gnunet-5d6ed5fbda01a324d8d9b800928339d4a90343c3.zip
Still porting to new getopt API.
Diffstat (limited to 'src/rest/gnunet-rest-server.c')
-rw-r--r--src/rest/gnunet-rest-server.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c
index b115deb20..0b6c18267 100644
--- a/src/rest/gnunet-rest-server.c
+++ b/src/rest/gnunet-rest-server.c
@@ -66,7 +66,7 @@ static struct GNUNET_SCHEDULER_Task *httpd_task;
66/** 66/**
67 * The port the service is running on (default 7776) 67 * The port the service is running on (default 7776)
68 */ 68 */
69static unsigned long port = GNUNET_REST_SERVICE_PORT; 69static unsigned long long port = GNUNET_REST_SERVICE_PORT;
70 70
71/** 71/**
72 * The listen socket of the service for IPv4 72 * The listen socket of the service for IPv4
@@ -748,7 +748,7 @@ run (void *cls,
748 return; 748 return;
749 } 749 }
750 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 750 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
751 "Service listens on port %lu\n", 751 "Service listens on port %llu\n",
752 port); 752 port);
753 httpd = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_NO_LISTEN_SOCKET, 753 httpd = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_NO_LISTEN_SOCKET,
754 0, 754 0,
@@ -783,10 +783,12 @@ run (void *cls,
783int 783int
784main (int argc, char *const *argv) 784main (int argc, char *const *argv)
785{ 785{
786 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 786 struct GNUNET_GETOPT_CommandLineOption options[] = {
787 {'p', "port", NULL, 787 GNUNET_GETOPT_OPTION_SET_ULONG ('p',
788 gettext_noop ("listen on specified port (default: 7776)"), 1, 788 "port",
789 &GNUNET_GETOPT_set_ulong, &port}, 789 "PORT",
790 gettext_noop ("listen on specified port (default: 7776)"),
791 &port),
790 GNUNET_GETOPT_OPTION_END 792 GNUNET_GETOPT_OPTION_END
791 }; 793 };
792 static const char* err_page = 794 static const char* err_page =