Compare commits

...

3 Commits

Author SHA1 Message Date
Slava Monich
6509e5dac8 Version 1.0.6 2018-09-21 21:16:29 +03:00
Slava Monich
6b956c0d3c Merge pull request #6 from monich/ref_count
Fix GBinderServiceManager lifecycle management
2018-09-21 21:14:01 +03:00
Slava Monich
3b10a08bad [gbinder] Fixed GBinderServiceManager lifecycle management. Fixes JB#43018
Dispose callback is invoked with refcount 1
2018-09-21 20:27:40 +03:00
4 changed files with 9 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ all: debug release pkgconfig
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_RELEASE = 5
VERSION_RELEASE = 6
# Version for pkg-config
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
libgbinder (1.0.6) unstable; urgency=low
* Fixed GBinderServiceManager lifecycle management
-- Slava Monich <slava.monich@jolla.com> Fri, 21 Sep 2018 21:15:28 +0300
libgbinder (1.0.5) unstable; urgency=low
* Added double and float support

View File

@@ -1,5 +1,5 @@
Name: libgbinder
Version: 1.0.5
Version: 1.0.6
Release: 0
Summary: Binder client library
Group: Development/Libraries

View File

@@ -475,7 +475,7 @@ gbinder_servicemanager_dispose(
* gbinder_servicemanager_finalize() will not be called
* this time around.
*/
if (klass->table && object->ref_count == 0) {
if (klass->table && g_atomic_int_get(&object->ref_count) <= 1) {
g_hash_table_remove(klass->table, self->dev);
if (g_hash_table_size(klass->table) == 0) {
g_hash_table_unref(klass->table);