diff options
author | Jens Georg <mail@jensge.org> | 2018-10-27 20:24:06 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2018-10-27 20:24:06 +0200 |
commit | f3aac70cc46366fcb235d81dd92d27d80d787695 (patch) | |
tree | 05fbd10b0c0ab3bc4ba3191fd5267c51c4f8b67c | |
parent | 1d470c9d2abd85085d488b476df24eee60ca42ac (diff) | |
download | gupnp-tools-f3aac70cc46366fcb235d81dd92d27d80d787695.tar.gz |
av-cp: Make it possible to change User-Agent
-rw-r--r-- | src/av-cp/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/av-cp/main.c b/src/av-cp/main.c index df10862..7badf29 100644 --- a/src/av-cp/main.c +++ b/src/av-cp/main.c @@ -42,11 +42,13 @@ static int upnp_port = 0; static char **interfaces = NULL; +static char *user_agent = NULL; static GOptionEntry entries[] = { { "port", 'p', 0, G_OPTION_ARG_INT, &upnp_port, N_("Network PORT to use for UPnP"), "PORT" }, { "interface", 'i', 0, G_OPTION_ARG_STRING_ARRAY, &interfaces, N_("Network interfaces to use for UPnP communication"), "INTERFACE" }, + { "user-agent", 'u', 0, G_OPTION_ARG_STRING, &user_agent, N_("Application part of the User-Agent header to use for UPnP communication"), "USER-AGENT" }, { NULL } }; @@ -230,6 +232,10 @@ main (gint argc, return -4; } + if (user_agent != NULL) { + g_set_prgname (user_agent); + } + if (!init_ui ()) { return -2; } |