[Pkg-owncloud-commits] [owncloud-client] 117/159: Use identical User Agents for csync and the Qt parts
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri May 1 13:05:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit d8275cd4e13a37f94cecd9b79cecf2cb21bf6a1e
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Thu Apr 16 20:56:00 2015 +0200
Use identical User Agents for csync and the Qt parts
Also, use the mirall version for ocsync.
Currently, the csync engine part and the Qt part have different UAs,
and this makes debugging (i.e. reading access logs) difficult. On
top, we haven't increased the ocsync version number in ages. So
as a consequence, I think it would be the best to have ocsync
and the rest share the same version number, and make them identify
with the same user agent.
To ease debugging for our side, we'll still append "(csyncoC)"
for calls made by csync.
---
csync/CMakeLists.txt | 8 +-------
csync/src/csync.h | 2 --
csync/src/csync_owncloud.c | 6 ++++--
csync/src/csync_version.h.in | 17 +----------------
4 files changed, 6 insertions(+), 27 deletions(-)
diff --git a/csync/CMakeLists.txt b/csync/CMakeLists.txt
index 49613ca..114f6f0 100644
--- a/csync/CMakeLists.txt
+++ b/csync/CMakeLists.txt
@@ -3,13 +3,7 @@
# global needed variables
set(APPLICATION_NAME "ocsync")
-set(APPLICATION_VERSION_MAJOR "0")
-set(APPLICATION_VERSION_MINOR "91")
-set(APPLICATION_VERSION_PATCH "5")
-
-set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
-
-set(LIBRARY_VERSION "0.2.1")
+set(LIBRARY_VERSION ${MIRALL_VERSION})
set(LIBRARY_SOVERSION "0")
# add definitions
diff --git a/csync/src/csync.h b/csync/src/csync.h
index f227c78..e426f7e 100644
--- a/csync/src/csync.h
+++ b/csync/src/csync.h
@@ -40,8 +40,6 @@
#include <sys/types.h>
#include <config_csync.h>
-#include "csync_version.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/csync/src/csync_owncloud.c b/csync/src/csync_owncloud.c
index 8276982..0a34024 100644
--- a/csync/src/csync_owncloud.c
+++ b/csync/src/csync_owncloud.c
@@ -26,6 +26,8 @@
#include "csync_private.h"
+#include "csync_version.h"
+
/*
* helper method to build up a user text for SSL problems, called from the
@@ -437,8 +439,8 @@ int dav_connect(CSYNC *csyncCtx, const char *base_url) {
// Should never take more than some seconds, 30 is really a max.
ne_set_connect_timeout(ctx->dav_session.ctx, 30);
- snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) csyncoC/%s",
- csync_owncloud_get_platform(), CSYNC_STRINGIFY( LIBCSYNC_VERSION ));
+ snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) mirall/%s (csyncoC)",
+ CSYNC_STRINGIFY( MIRALL_VERSION ), csync_owncloud_get_platform() );
ne_set_useragent( ctx->dav_session.ctx, uaBuf);
ne_set_server_auth(ctx->dav_session.ctx, authentication_callback_by_neon, ctx);
diff --git a/csync/src/csync_version.h.in b/csync/src/csync_version.h.in
index 41a6b07..9471734 100644
--- a/csync/src/csync_version.h.in
+++ b/csync/src/csync_version.h.in
@@ -28,22 +28,7 @@ extern "C" {
#define CSYNC_STRINGIFY(s) CSYNC_TOSTRING(s)
#define CSYNC_TOSTRING(s) #s
-/* csync version macros */
-#define CSYNC_VERSION_INT(a, b, c) ((a) << 16 | (b) << 8 | (c))
-#define CSYNC_VERSION_DOT(a, b, c) a ##.## b ##.## c
-#define CSYNC_VERSION(a, b, c) CSYNC_VERSION_DOT(a, b, c)
-
-/* csync version */
-#define LIBCSYNC_VERSION_MAJOR @APPLICATION_VERSION_MAJOR@
-#define LIBCSYNC_VERSION_MINOR @APPLICATION_VERSION_MINOR@
-#define LIBCSYNC_VERSION_MICRO @APPLICATION_VERSION_PATCH@
-
-#define LIBCSYNC_VERSION_INT CSYNC_VERSION_INT(LIBCSYNC_VERSION_MAJOR, \
- LIBCSYNC_VERSION_MINOR, \
- LIBCSYNC_VERSION_MICRO)
-#define LIBCSYNC_VERSION CSYNC_VERSION(LIBCSYNC_VERSION_MAJOR, \
- LIBCSYNC_VERSION_MINOR, \
- LIBCSYNC_VERSION_MICRO)
+#define MIRALL_VERSION @MIRALL_VERSION@
#ifdef __cplusplus
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list