summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2013-03-24 22:13:48 -0700
committerDavid Schleef <ds@schleef.org>2013-03-24 22:13:48 -0700
commit09dab7ea6ba00cb29ca8d6938d28722de903af16 (patch)
tree66593f1d53f5c8f10d4f19375ec9a5e0c48ed466 /tools
parent254fb440e8faaaf858320e52c49e16bfbd278a5b (diff)
server: make http-port and https-port construct-only
Diffstat (limited to 'tools')
-rw-r--r--tools/gss-server.c11
-rw-r--r--tools/vts-server.c11
2 files changed, 18 insertions, 4 deletions
diff --git a/tools/gss-server.c b/tools/gss-server.c
index f7afe9b..2d01508 100644
--- a/tools/gss-server.c
+++ b/tools/gss-server.c
@@ -48,6 +48,9 @@
gboolean verbose = TRUE;
gboolean cl_verbose;
gboolean enable_daemon = FALSE;
+int http_port = 0;
+int https_port = 0;
+char *config_file = NULL;
void ew_stream_server_notify_url (const char *s, void *priv);
@@ -59,6 +62,10 @@ static void add_program (GssServer * server, int i);
static GOptionEntry entries[] = {
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &cl_verbose, "Be verbose", NULL},
{"daemon", 'd', 0, G_OPTION_ARG_NONE, &enable_daemon, "Daemonize", NULL},
+ {"http-port", 0, 0, G_OPTION_ARG_INT, &http_port, "HTTP port", NULL},
+ {"https-port", 0, 0, G_OPTION_ARG_INT, &https_port, "HTTPS port", NULL},
+ {"config-file", 0, 0, G_OPTION_ARG_STRING, &config_file, "Configuration file",
+ NULL},
{NULL}
@@ -153,8 +160,8 @@ main (int argc, char *argv[])
gss_init ();
- server = gss_server_new ();
- gss_object_set_name (GSS_OBJECT (server), "admin.server");
+ server = g_object_new (GSS_TYPE_SERVER, "name", "admin.server",
+ "http-port", http_port, "https-port", https_port, NULL);
if (enable_daemon)
daemonize ();
diff --git a/tools/vts-server.c b/tools/vts-server.c
index 12a88b1..6d9f2d8 100644
--- a/tools/vts-server.c
+++ b/tools/vts-server.c
@@ -56,6 +56,9 @@
gboolean verbose = TRUE;
gboolean cl_verbose;
gboolean enable_daemon = FALSE;
+int http_port = 0;
+int https_port = 0;
+char *config_file = NULL;
static GssProgram *gss_vts_new (GssServer * server, const char *name);
void ew_stream_server_notify_url (const char *s, void *priv);
@@ -71,6 +74,10 @@ handle_pipeline_message (GstBus * bus, GstMessage * message,
static GOptionEntry entries[] = {
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &cl_verbose, "Be verbose", NULL},
{"daemon", 'd', 0, G_OPTION_ARG_NONE, &enable_daemon, "Daemonize", NULL},
+ {"http-port", 0, 0, G_OPTION_ARG_INT, &http_port, "HTTP port", NULL},
+ {"https-port", 0, 0, G_OPTION_ARG_INT, &https_port, "HTTPS port", NULL},
+ {"config-file", 0, 0, G_OPTION_ARG_STRING, &config_file,
+ "Configuration file"},
{NULL}
@@ -164,8 +171,8 @@ main (int argc, char *argv[])
gss_init ();
- server = gss_server_new ();
- gss_object_set_name (GSS_OBJECT (server), "admin.server");
+ server = g_object_new (GSS_TYPE_SERVER, "name", "admin.server",
+ "http-port", http_port, "https-port", https_port, NULL);
if (enable_daemon)
daemonize ();