WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
tv, wrs, wws,
&do_httpd, NULL);
-
+
}
if (NULL != wrs)
GNUNET_NETWORK_fdset_destroy (wrs);
cfg = c;
plugin_map = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
+ /* Get port to bind to */
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, "rest",
+ "PORT",
+ &port))
+ {
+ //No address specified
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Don't know what port to use...\n");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
+
/* Get address to bind to */
if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "rest",
"BIND_TO",
//No address specified
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Don't know what to bind to...\n");
- GNUNET_free (addr_str);
GNUNET_SCHEDULER_shutdown ();
return;
}
//No address specified
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Don't know what to bind6 to...\n");
- GNUNET_free (addr_str);
GNUNET_SCHEDULER_shutdown ();
return;
}
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_option_ulong ('p',
- "port",
- "PORT",
- gettext_noop ("listen on specified port (default: 7776)"),
- &port),
GNUNET_GETOPT_OPTION_END
};
static const char* err_page =