From d86d8f83d3f0fe41306476c9286c002caacab4bb Mon Sep 17 00:00:00 2001 From: hroederld Date: Thu, 18 Apr 2019 17:16:35 -0700 Subject: [PATCH] 1.3.0 (#21) --- CHANGELOG.md | 4 ++++ ldapi.h | 2 ++ ldnet.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ed9bb..ef64046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the LaunchDarkly C SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). +## [1.3.0] - 2019-04-18 +### Added: +- Version string macro `LD_SDK_VERSION` in `ldapi.h` + ## [1.2.2] - 2019-04-16 ### Fixed: - Ensure `LDSetLogFunction` is properly exported in shared libraries diff --git a/ldapi.h b/ldapi.h index 2cd74db..1c136f4 100755 --- a/ldapi.h +++ b/ldapi.h @@ -1,6 +1,8 @@ #ifndef C_CLIENT_LDIAPI_H #define C_CLIENT_LDIAPI_H +#define LD_SDK_VERSION "1.3.0" + #ifdef _WIN32 #define LD_EXPORT(x) __declspec(dllexport) x #else diff --git a/ldnet.c b/ldnet.c index 82da573..78ce2a4 100755 --- a/ldnet.c +++ b/ldnet.c @@ -8,6 +8,7 @@ #include "ldinternal.h" #define LD_STREAMTIMEOUT 300 +#define LD_USER_AGENT_HEADER "User-Agent: CClient/" LD_SDK_VERSION struct MemoryStruct { char *memory; @@ -123,8 +124,7 @@ prepareShared(const char *const url, const LDConfig *const config, LDi_log(LD_LOG_CRITICAL, "curl_slist_append failed for headerauth"); goto error; } - const char *const headeragent = "User-Agent: CClient/1.2.2"; - if (!(headers = curl_slist_append(headers, headeragent))) { + if (!(headers = curl_slist_append(headers, LD_USER_AGENT_HEADER))) { LDi_log(LD_LOG_CRITICAL, "curl_slist_append failed for headeragent"); goto error; }