From de2d9f3caddae9f80a18c21b2ae3c67327bedcfd Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Wed, 1 Aug 2018 11:50:03 +0200 Subject: [PATCH 1/2] FIX GET /v2/subscriptions and GET /v2/subscriptions/{id} crashes for permanent subscriptions created before version 1.13.0 Conflicts: CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 1 + src/lib/apiTypesV2/Subscription.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index e69de29bb2..54343d2fdf 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -0,0 +1 @@ +- Fix: GET /v2/subscriptions and GET /v2/subscriptions/{id} crashes for permanent subscriptions created before version 1.13.0 (#3256) diff --git a/src/lib/apiTypesV2/Subscription.cpp b/src/lib/apiTypesV2/Subscription.cpp index 79bbb3efe8..de34bd2b24 100644 --- a/src/lib/apiTypesV2/Subscription.cpp +++ b/src/lib/apiTypesV2/Subscription.cpp @@ -72,7 +72,10 @@ std::string Subscription::toJson(void) jh.addString("description", this->description); } - if (this->expires != PERMANENT_EXPIRES_DATETIME) + // Orion versions previous to 1.13.0 where using (int64_t) 9e18 as expiration for permanent + // subscriptions. Now we use PERMANENT_EXPIRES_DATETIME, whichs is larger, but we need to be prepared + // for these old documents in DB (more info in issue #3256) + if (this->expires < (int64_t) 9e18) { jh.addDate("expires", this->expires); } From e373ddf4bb5b537de01c1da6df90e80e4c3f3d0c Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Fri, 3 Aug 2018 19:33:27 +0200 Subject: [PATCH 2/2] Step: 1.15.0 -> 1.15.1 --- CHANGES_NEXT_RELEASE | 1 - README.md | 2 +- docker/Dockerfile | 2 +- rpm/SPECS/contextBroker.spec | 3 +++ src/app/contextBroker/version.h | 2 +- src/lib/common/defaultValues.h | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 54343d2fdf..e69de29bb2 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +0,0 @@ -- Fix: GET /v2/subscriptions and GET /v2/subscriptions/{id} crashes for permanent subscriptions created before version 1.13.0 (#3256) diff --git a/README.md b/README.md index 952c309105..800a9a7898 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ release.sh needs to be changed also --> [![License badge](https://img.shields.io/badge/license-AGPL-blue.svg)](https://opensource.org/licenses/AGPL-3.0) -[![Documentation badge](https://readthedocs.org/projects/fiware-orion/badge/?version=1.15.0)](http://fiware-orion.readthedocs.io/en/1.15.0/?badge=1.15.0) +[![Documentation badge](https://readthedocs.org/projects/fiware-orion/badge/?version=1.15.1)](http://fiware-orion.readthedocs.io/en/1.15.1/?badge=1.15.1) [![Docker badge](https://img.shields.io/docker/pulls/fiware/orion.svg)](https://hub.docker.com/r/fiware/orion/) [![Support badge]( https://img.shields.io/badge/support-sof-yellowgreen.svg)](http://stackoverflow.com/questions/tagged/fiware-orion) diff --git a/docker/Dockerfile b/docker/Dockerfile index ce97fea097..4340006996 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ FROM centos:centos7.4.1708 MAINTAINER FIWARE Orion Context Broker Team. Telefónica I+D ENV ORION_USER orion -ENV GIT_REV_ORION 1.15.0 +ENV GIT_REV_ORION 1.15.1 ENV CLEAN_DEV_TOOLS 1 WORKDIR /opt diff --git a/rpm/SPECS/contextBroker.spec b/rpm/SPECS/contextBroker.spec index 94a619cd23..12c3a148c5 100644 --- a/rpm/SPECS/contextBroker.spec +++ b/rpm/SPECS/contextBroker.spec @@ -173,6 +173,9 @@ if [ "$1" == "0" ]; then fi %changelog +* Mon Aug 06 2018 Fermin Galan 1.15.1-1 +- Fix: GET /v2/subscriptions and GET /v2/subscriptions/{id} crashes for permanent subscriptions created before version 1.13.0 (#3256) + * Mon Jul 16 2018 Fermin Galan 1.15.0-1 - Add: upsert option for the POST /v2/entities operation (#3215) - Add: transient entities functionality (new NGSIv2 builtin attribute: dateExpires) (#3000) diff --git a/src/app/contextBroker/version.h b/src/app/contextBroker/version.h index d01778bf38..9131dc5018 100644 --- a/src/app/contextBroker/version.h +++ b/src/app/contextBroker/version.h @@ -28,6 +28,6 @@ -#define ORION_VERSION "1.15.0" +#define ORION_VERSION "1.15.1" #endif // SRC_APP_CONTEXTBROKER_VERSION_H_ diff --git a/src/lib/common/defaultValues.h b/src/lib/common/defaultValues.h index 890810b836..57c63f8622 100644 --- a/src/lib/common/defaultValues.h +++ b/src/lib/common/defaultValues.h @@ -41,6 +41,6 @@ * * API Documentation - The link to the the GEri documentation, either in the gh-pages (.github.io/) inside the fiware organization in GitHub or ReadTheDocs manual. */ -#define API_DOC "https://fiware-orion.readthedocs.org/en/1.15.0/" +#define API_DOC "https://fiware-orion.readthedocs.org/en/1.15.1/" #endif // SRC_LIB_COMMON_DEFAULTVALUES_H_