REST: fallback to default port
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 29 Apr 2019 15:44:10 +0000 (17:44 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 29 Apr 2019 15:44:10 +0000 (17:44 +0200)
src/rest/gnunet-rest-server.c
src/rest/rest.conf

index 8135254049de774fa6a09d24e7f1834c3c169e9f..ba1d595fd8c6b10b7b21f2909c17cf056aa30dc0 100644 (file)
@@ -824,14 +824,13 @@ run (void *cls,
 
   /* Get port to bind to */
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, "rest",
-                                                          "PORT",
+                                                          "HTTP_PORT",
                                                           &port))
   {
     //No address specified
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Don't know what port to use...\n");
-    GNUNET_SCHEDULER_shutdown ();
-    return;
+                "Using default port...\n");
+    port = GNUNET_REST_SERVICE_PORT;
   }
 
   /* Get address to bind to */
index dfeedd26cd5e24472454b85ef12da16c58514d46..71fef8aa106168b0688d533b011222e6bd73dca0 100644 (file)
@@ -2,6 +2,7 @@
 UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-rest.sock
 BINARY=gnunet-rest-server
 IMMEDIATE_START=YES
+HTTP_PORT=7776
 BIND_TO=127.0.0.1
 BIND_TO6=::1
 REST_ALLOW_HEADERS=Authorization,Accept,Content-Type