Skip to content

Commit

Permalink
Merge pull request #3260 from telefonicaid/bug/3256_segfauls_get_all_…
Browse files Browse the repository at this point in the history
…subscriptions-release-1.5.0

Fix for bug 3256 segfauls get all subscriptions (release/1.5.0 branch)
  • Loading branch information
AlvaroVega authored Aug 6, 2018
2 parents 46e3127 + e373ddf commit 2bd8ed1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions rpm/SPECS/contextBroker.spec
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ if [ "$1" == "0" ]; then
fi

%changelog
* Mon Aug 06 2018 Fermin Galan <[email protected]> 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 <[email protected]> 1.15.0-1
- Add: upsert option for the POST /v2/entities operation (#3215)
- Add: transient entities functionality (new NGSIv2 builtin attribute: dateExpires) (#3000)
Expand Down
2 changes: 1 addition & 1 deletion src/app/contextBroker/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@



#define ORION_VERSION "1.15.0"
#define ORION_VERSION "1.15.1"

#endif // SRC_APP_CONTEXTBROKER_VERSION_H_
5 changes: 4 additions & 1 deletion src/lib/apiTypesV2/Subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/common/defaultValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_

0 comments on commit 2bd8ed1

Please sign in to comment.