Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gnome-software
Commits
9bf4ecef
Commit
9bf4ecef
authored
Feb 16, 2018
by
Richard Hughes
Browse files
trivial: Include the fwupd version in the useragent
See
https://blogs.gnome.org/hughsie/2018/02/16/
for more details.
parent
47520845
Changes
2
Show whitespace changes
Inline
Side-by-side
src/Makefile.am
View file @
9bf4ecef
...
...
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
$(PACKAGEKIT_CFLAGS)
\
$(GNOME_DESKTOP_CFLAGS)
\
$(POLKIT_CFLAGS)
\
$(FWUPD_CFLAGS)
\
$(LIBSECRET_CFLAGS)
\
-DG_LOG_DOMAIN
=
\"
Gs
\"
\
-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE
\
...
...
src/gs-utils.c
View file @
9bf4ecef
...
...
@@ -29,6 +29,10 @@
#include
<polkit/polkit.h>
#endif
#ifdef HAVE_FIRMWARE
#include
<fwupd.h>
#endif
#include
"gs-app.h"
#include
"gs-utils.h"
#include
"gs-plugin.h"
...
...
@@ -409,7 +413,20 @@ gs_utils_get_file_age (GFile *file)
const
gchar
*
gs_user_agent
(
void
)
{
#ifdef HAVE_FIRMWARE
static
gchar
*
user_agent
=
NULL
;
if
(
user_agent
==
NULL
)
{
user_agent
=
g_strdup_printf
(
"%s/%s fwupd/%i.%i.%i"
,
PACKAGE_NAME
,
PACKAGE_VERSION
,
FWUPD_MAJOR_VERSION
,
FWUPD_MINOR_VERSION
,
FWUPD_MICRO_VERSION
);
}
return
user_agent
;
#else
return
PACKAGE_NAME
"/"
PACKAGE_VERSION
;
#endif
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment