summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYounho Park <younho.park@samsung.com>2017-09-14 20:38:47 +0900
committerYounho Park <younho.park@samsung.com>2017-09-15 02:12:23 +0000
commit6a8ee442d1a752cf8feb72b1322cd0a83200a053 (patch)
tree084d4ee6d971e5757375dad9a6c135ec05310c83
parent557e7dd528fb0fe02ecf9b84a0c1c1e7cd6792da (diff)
downloadpush-tizen.tar.gz
push-tizen.tar.bz2
push-tizen.zip
modified internal delegate to private to avoid deletion by GCtizen
Change-Id: Idf4430cc7b872c908a1d2d99deb0c5c88db737f6 Signed-off-by: Younho Park <younho.park@samsung.com>
-rw-r--r--Tizen.Messaging.Push/Tizen.Messaging.Push.csproj2
-rw-r--r--Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs8
-rw-r--r--packaging/csapi-push.spec2
3 files changed, 7 insertions, 5 deletions
diff --git a/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj b/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj
index 263c6b7..54c1909 100644
--- a/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj
+++ b/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Version>1.0.5</Version>
+ <Version>1.0.6</Version>
<Authors>Samsung Electronics</Authors>
<Copyright>© Samsung Electronics Co., Ltd All Rights Reserved</Copyright>
<Description>Push API for Tizen .NET</Description>
diff --git a/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs b/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs
index 2c49734..1ae0a2c 100644
--- a/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs
+++ b/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs
@@ -26,6 +26,8 @@ namespace Tizen.Messaging.Push
{
private static readonly object _lock = new object();
private static PushImpl _instance;
+ private Interop.PushClient.VoidResultCallback registerResult;
+ private Interop.PushClient.VoidResultCallback unregisterResult;
internal static PushImpl Instance
{
@@ -157,7 +159,7 @@ namespace Tizen.Messaging.Push
{
Log.Info(Interop.PushClient.LogTag, "Register Called");
var task = new TaskCompletionSource<ServerResponse>();
- Interop.PushClient.VoidResultCallback registerResult = (Interop.PushClient.Result regResult, IntPtr msgPtr, IntPtr userData) =>
+ registerResult = (Interop.PushClient.Result regResult, IntPtr msgPtr, IntPtr userData) =>
{
Log.Info(Interop.PushClient.LogTag, "Register Callback Called");
string msg = "";
@@ -186,7 +188,7 @@ namespace Tizen.Messaging.Push
internal async Task<ServerResponse> PushServerUnregister()
{
var task = new TaskCompletionSource<ServerResponse>();
- Interop.PushClient.VoidResultCallback registerResult = (Interop.PushClient.Result regResult, IntPtr msgPtr, IntPtr userData) =>
+ unregisterResult = (Interop.PushClient.Result regResult, IntPtr msgPtr, IntPtr userData) =>
{
Log.Info(Interop.PushClient.LogTag, "Unregister Callback Called");
string msg = "";
@@ -202,7 +204,7 @@ namespace Tizen.Messaging.Push
Log.Error(Interop.PushClient.LogTag, "Unable to set the Result for Unregister");
}
};
- Interop.PushClient.ServiceError result = Interop.PushClient.ServiceDeregister(_connection, registerResult, IntPtr.Zero);
+ Interop.PushClient.ServiceError result = Interop.PushClient.ServiceDeregister(_connection, unregisterResult, IntPtr.Zero);
if (result != Interop.PushClient.ServiceError.None)
{
task.SetException(PushExceptionFactory.CreateResponseException(result));
diff --git a/packaging/csapi-push.spec b/packaging/csapi-push.spec
index 4542ebe..058d865 100644
--- a/packaging/csapi-push.spec
+++ b/packaging/csapi-push.spec
@@ -1,6 +1,6 @@
Name: csapi-push
Summary: Tizen Push API for C#
-Version: 1.0.5
+Version: 1.0.6
Release: 1
Group: Development/Libraries
License: Apache-2.0