[gupnp-tools] av-cp: Make it possible to change User-Agent
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-tools] av-cp: Make it possible to change User-Agent
- Date: Sat, 27 Oct 2018 18:47:51 +0000 (UTC)
commit f3aac70cc46366fcb235d81dd92d27d80d787695
Author: Jens Georg <mail jensge org>
Date: Sat Oct 27 20:24:06 2018 +0200
av-cp: Make it possible to change User-Agent
src/av-cp/main.c | 6 ++++++
1 file changed, 6 insertions(+)
---
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]